Class StripBetweenTransformer
java.lang.Object
com.norconex.importer.handler.transformer.impl.StripBetweenTransformer
- All Implemented Interfaces:
Configurable<StripBetweenTransformerConfig>,ConfigurableDocHandler<StripBetweenTransformerConfig>,DocHandler
public class StripBetweenTransformer
extends Object
implements ConfigurableDocHandler<StripBetweenTransformerConfig>
Strips any content found between a matching start and end strings. The matching strings are defined in pairs and multiple ones can be specified at once.
This class can be used as a pre-parsing (text content-types only) or post-parsing handlers.
The following will strip all text between (and including) these two
HTML comments:
<!-- SIDENAV_START --> and
<!-- SIDENAV_END -->.
- See Also:
-
Field Summary
Fields inherited from interface com.norconex.commons.lang.config.Configurable
PROPERTYFields inherited from interface com.norconex.importer.handler.DocHandler
NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanbooleanhandle(DocHandlerContext docCtx) Perform any operations on a document.inthashCode()toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.norconex.importer.handler.DocHandler
close, init
-
Constructor Details
-
StripBetweenTransformer
public StripBetweenTransformer()
-
-
Method Details
-
handle
Description copied from interface:DocHandlerPerform any operations on a document.- Specified by:
handlein interfaceDocHandler- Parameters:
docCtx- the document handling context- Returns:
falseto stop processing and reject a document ortrueto proceed to the next configured handler.- Throws:
IOException- An I/O exception of some sort has occurred
-
getConfiguration
- Specified by:
getConfigurationin interfaceConfigurable<StripBetweenTransformerConfig>
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-