Class ForceSingleValueTransformerConfig
java.lang.Object
com.norconex.importer.handler.BaseLabelableConfig
com.norconex.importer.handler.BaseDocHandlerConfig
com.norconex.importer.handler.transformer.impl.ForceSingleValueTransformerConfig
- All Implemented Interfaces:
Labelable
Forces a metadata field to be single-value. The action can be one of the following:
Can be used both as a pre-parse or post-parse handler.
keepFirst Keeps the first occurrence found.
keepLast Keeps the first occurrence found.
mergeWith:<sep> Merges all occurrences, joining them with the
specified separator (<sep>).
If you do not specify any action, the default behavior is to merge all occurrences, joining values with a comma.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanThe action.Gets field matcher.inthashCode()The action.setFieldMatcher(TextMatcher fieldMatcher) Sets field matcher.toString()Methods inherited from class com.norconex.importer.handler.BaseLabelableConfig
getLabel, setLabel
-
Constructor Details
-
ForceSingleValueTransformerConfig
public ForceSingleValueTransformerConfig()
-
-
Method Details
-
getFieldMatcher
Gets field matcher.- Returns:
- field matcher
-
setFieldMatcher
Sets field matcher.- Parameters:
fieldMatcher- field matcher
-
getAction
The action. One of: keepFirst, keepLast, or mergeWith:<sep>.- Returns:
- action action to be performed
-
setAction
The action. One of: keepFirst, keepLast, or mergeWith:<sep>.- Parameters:
action- action to be performed- Returns:
this.
-
equals
- Overrides:
equalsin classBaseLabelableConfig
-
canEqual
- Overrides:
canEqualin classBaseLabelableConfig
-
hashCode
public int hashCode()- Overrides:
hashCodein classBaseLabelableConfig
-
toString
- Overrides:
toStringin classBaseLabelableConfig
-