Class ForceSingleValueTransformer

java.lang.Object
com.norconex.importer.handler.transformer.impl.ForceSingleValueTransformer
All Implemented Interfaces:
Configurable<ForceSingleValueTransformerConfig>, ConfigurableDocHandler<ForceSingleValueTransformerConfig>, DocHandler

public class ForceSingleValueTransformer extends Object implements ConfigurableDocHandler<ForceSingleValueTransformerConfig>

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: