Class RejectFilter
- java.lang.Object
-
- com.norconex.importer.handler.filter.impl.RejectFilter
-
- All Implemented Interfaces:
IDocumentFilter
,IImporterHandler
public final class RejectFilter extends Object implements IDocumentFilter
Rejects a document. A rejected document is not processed further and does not generate any output by the Importer.
Typically used within Importer XML flow conditions in your XML configuration.
XML configuration usage:
<handler class="com.norconex.importer.handler.filter.impl.RejectFilter"/>
XML usage example:
<handler class="RejectFilter"/> <!-- Alternatively, when used in XML flow: --> <reject/>
- Since:
- 3.0.0
- Author:
- Pascal Essiembre
-
-
Field Summary
Fields Modifier and Type Field Description static RejectFilter
INSTANCE
-
Constructor Summary
Constructors Constructor Description RejectFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
acceptDocument(HandlerDoc doc, InputStream input, ParseState parseState)
Whether to accepts a document.boolean
equals(Object other)
int
hashCode()
String
toString()
-
-
-
Field Detail
-
INSTANCE
public static final RejectFilter INSTANCE
-
-
Method Detail
-
acceptDocument
public boolean acceptDocument(HandlerDoc doc, InputStream input, ParseState parseState) throws ImporterHandlerException
Description copied from interface:IDocumentFilter
Whether to accepts a document.- Specified by:
acceptDocument
in interfaceIDocumentFilter
- Parameters:
doc
- the document to evaluateinput
- document contentparseState
- whether the document has been parsed already or not (a parsed document should normally be text-based)- Returns:
true
if document is accepted- Throws:
ImporterHandlerException
- problem reading the document
-
-