Class AttributeConfig

    • Constructor Detail

      • AttributeConfig

        public AttributeConfig()
        Creates an empty AttributeConfig.
      • AttributeConfig

        public AttributeConfig​(java.lang.String name,
                               java.lang.String extractorClassName)
        Creates a AttributeConfig with the given attribute and ordered setting.

        Name may begin with an ascii letter [A-Za-z] or digit [0-9] and may contain ascii letters [A-Za-z], digits [0-9] or underscores later on.

        Parameters:
        name - the name given to an attribute that is going to be extracted
        extractorClassName - full class name of the extractor used to extract the value of the attribute
        See Also:
        setName(String), (String)
    • Method Detail

      • getName

        public java.lang.String getName()
        Gets the name of the attribute extracted by the extractor.
        Returns:
        the name of the attribute extracted by the extractor
        See Also:
        setName(String)
      • setName

        public AttributeConfig setName​(java.lang.String name)
        Sets the name of the attribute extracted by the extractor. The name cannot be equal to any of the query constants.
        Parameters:
        name - the name of the attribute extracted by the extractor
        Returns:
        the updated AttributeConfig
        Throws:
        java.lang.IllegalArgumentException - if attribute is null,an empty or inappropriate string
        See Also:
        QueryConstants
      • getExtractorClassName

        public java.lang.String getExtractorClassName()
        Gets the full class name of the extractor in a String format, e.g. com.example.car.SpeedExtractor.
        Returns:
        the full class name of the extractor in a String format
        See Also:
        (String)
      • setExtractorClassName

        public AttributeConfig setExtractorClassName​(java.lang.String extractorClassName)
        Sets the full class name of the extractor in a String format, e.g. com.example.car.SpeedExtractor.
        Parameters:
        extractorClassName - the full class name of the extractor in a String format
        Returns:
        the updated AttributeConfig
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • writeData

        public void writeData​(ObjectDataOutput out)
                       throws java.io.IOException
        Description copied from interface: DataSerializable
        Writes object fields to output stream
        Specified by:
        writeData in interface DataSerializable
        Parameters:
        out - output
        Throws:
        java.io.IOException - if an I/O error occurs. In particular, an IOException may be thrown if the output stream has been closed.
      • readData

        public void readData​(ObjectDataInput in)
                      throws java.io.IOException
        Description copied from interface: DataSerializable
        Reads fields from the input stream
        Specified by:
        readData in interface DataSerializable
        Parameters:
        in - input
        Throws:
        java.io.IOException - if an I/O error occurs. In particular, an IOException may be thrown if the input stream has been closed.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object