Class StripBeforeTransformerConfig
java.lang.Object
com.norconex.importer.handler.BaseLabelableConfig
com.norconex.importer.handler.BaseDocHandlerConfig
com.norconex.importer.handler.transformer.impl.StripBeforeTransformerConfig
- All Implemented Interfaces:
Labelable,ChunkedTextSupport
public class StripBeforeTransformerConfig
extends BaseDocHandlerConfig
implements ChunkedTextSupport
Strips any content found before first match found for given pattern.
This class can be used as a pre-parsing (text content-types only) or post-parsing handlers.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanGets source field matcher for fields to transform.intGets the matcher for the text up to which to strip content.inthashCode()booleanWhether the match itself should be stripped or not.setFieldMatcher(TextMatcher fieldMatcher) Sets source field matcher for fields to transform.setInclusive(boolean inclusive) Whether the match itself should be stripped or not.setMaxReadSize(int maxReadSize) setSourceCharset(Charset sourceCharset) setStripBeforeMatcher(TextMatcher stripBeforeMatcher) Sets the matcher for the text up to which to strip content.toString()Methods inherited from class com.norconex.importer.handler.BaseLabelableConfig
getLabel, setLabel
-
Constructor Details
-
StripBeforeTransformerConfig
public StripBeforeTransformerConfig()
-
-
Method Details
-
getFieldMatcher
Gets source field matcher for fields to transform.- Specified by:
getFieldMatcherin interfaceChunkedTextSupport- Returns:
- field matcher
-
setFieldMatcher
Sets source field matcher for fields to transform.- Parameters:
fieldMatcher- field matcher
-
getStripBeforeMatcher
Gets the matcher for the text up to which to strip content.- Returns:
- text matcher
-
setStripBeforeMatcher
Sets the matcher for the text up to which to strip content.- Parameters:
stripBeforeMatcher- text matcher
-
getMaxReadSize
public int getMaxReadSize()- Specified by:
getMaxReadSizein interfaceChunkedTextSupport
-
getSourceCharset
- Specified by:
getSourceCharsetin interfaceChunkedTextSupport
-
isInclusive
public boolean isInclusive()Whether the match itself should be stripped or not.- Returns:
trueif stripping the matched characters
-
setMaxReadSize
- Returns:
this.
-
setSourceCharset
- Returns:
this.
-
setInclusive
Whether the match itself should be stripped or not.- Parameters:
inclusive-trueto strip the matched characters- Returns:
this.
-
equals
- Overrides:
equalsin classBaseLabelableConfig
-
canEqual
- Overrides:
canEqualin classBaseLabelableConfig
-
hashCode
public int hashCode()- Overrides:
hashCodein classBaseLabelableConfig
-
toString
- Overrides:
toStringin classBaseLabelableConfig
-