Class IdentityProcessor

All Implemented Interfaces:,<>, FieldProcessor

public class IdentityProcessor extends Object implements FieldProcessor
A FieldProcessor which converts the field name and value into a feature with a value of FEATURE_VALUE.
  • Field Details


      public static final double FEATURE_VALUE
      The value of the emitted features.
      See Also:
  • Constructor Details

    • IdentityProcessor

      public IdentityProcessor(String fieldName)
      Constructs a field processor which emits a single feature with a specific value and uses the field name and field value as the feature name.
      fieldName - The field name to read.
  • Method Details

    • getFieldName

      public String getFieldName()
      Description copied from interface: FieldProcessor
      Gets the field name this FieldProcessor uses.
      Specified by:
      getFieldName in interface FieldProcessor
      The field name.
    • process

      public List<ColumnarFeature> process(String value)
      Description copied from interface: FieldProcessor
      Processes the field value and generates a (possibly empty) list of ColumnarFeatures.
      Specified by:
      process in interface FieldProcessor
      value - The field value to process.
      A list of ColumnarFeatures.
    • getFeatureType

      public FieldProcessor.GeneratedFeatureType getFeatureType()
      Description copied from interface: FieldProcessor
      Returns the feature type this FieldProcessor generates.
      Specified by:
      getFeatureType in interface FieldProcessor
      The feature type.
    • copy

      public IdentityProcessor copy(String newFieldName)
      Description copied from interface: FieldProcessor
      Returns a copy of this FieldProcessor bound to the supplied newFieldName.
      Specified by:
      copy in interface FieldProcessor
      newFieldName - The new field name for the copy.
      A copy of this FieldProcessor.
    • toString

      public String toString()
      toString in class Object
    • getProvenance

      public getProvenance()
      Specified by:
      getProvenance in interface<>