Class TextBetweenTransformer

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

public class TextBetweenTransformer extends Object implements ConfigurableDocHandler<TextBetweenTransformerConfig>

Extracts and add values found between a matching start and end strings to a document metadata field. The matching string end-points are defined in pairs and multiple ones can be specified at once. The field specified for a pair of end-points is considered a multi-value field.

If "fieldMatcher" is specified, it will use content from matching fields and storing all text extracted into the target field, multi-value. Else, the document content is used.

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 by supplying a PropertySetter.

This class can be used as a pre-parsing handler on text documents only or a post-parsing handler.

See Also: