Class ConstantTransformerConfig
java.lang.Object
com.norconex.importer.handler.BaseLabelableConfig
com.norconex.importer.handler.BaseDocHandlerConfig
com.norconex.importer.handler.transformer.impl.ConstantTransformerConfig
- All Implemented Interfaces:
Labelable
Define and add constant values to documents. To add multiple constant values under the same constant name, repeat the constant entry with a different value.
Storing values in an existing field
If a target field with the same name already exists for a document,
values will be added to the end of the existing value list.
It is possible to change this default behavior
with setOnSet(PropertySetter).
Can be used both as a pre-parse or post-parse handler.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanGet constants to be added as metadata fields.getOnSet()Default property setter when a constant does not specify one.inthashCode()setConstants(List<Constant> constants) Set constants to be added as metadata fields.setOnSet(PropertySetter onSet) Default property setter when a constant does not specify one.toString()Methods inherited from class com.norconex.importer.handler.BaseLabelableConfig
getLabel, setLabel
-
Constructor Details
-
ConstantTransformerConfig
public ConstantTransformerConfig()
-
-
Method Details
-
getConstants
Get constants to be added as metadata fields.- Returns:
- list of constants
-
setConstants
Set constants to be added as metadata fields.- Parameters:
constants- list of constants- Returns:
- this instance
-
getOnSet
Default property setter when a constant does not specify one. -
setOnSet
Default property setter when a constant does not specify one.- Returns:
this.
-
equals
- Overrides:
equalsin classBaseLabelableConfig
-
canEqual
- Overrides:
canEqualin classBaseLabelableConfig
-
hashCode
public int hashCode()- Overrides:
hashCodein classBaseLabelableConfig
-
toString
- Overrides:
toStringin classBaseLabelableConfig
-