Class StripAfterTransformerConfig
java.lang.Object
com.norconex.importer.handler.BaseLabelableConfig
com.norconex.importer.handler.BaseDocHandlerConfig
com.norconex.importer.handler.transformer.impl.StripAfterTransformerConfig
- All Implemented Interfaces:
Labelable,ChunkedTextSupport
Strips any content found after 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 of text after which to strip.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) setStripAfterMatcher(TextMatcher stripAfterMatcher) Sets the matcher of text after which to strip.toString()Methods inherited from class com.norconex.importer.handler.BaseLabelableConfig
getLabel, setLabel
-
Constructor Details
-
StripAfterTransformerConfig
public StripAfterTransformerConfig()
-
-
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
-
getStripAfterMatcher
Gets the matcher of text after which to strip.- Returns:
- text matcher
-
setStripAfterMatcher
Sets the matcher of text after which to strip.- Parameters:
stripAfterMatcher- 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
-