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 RejectFilterINSTANCE
-
Constructor Summary
Constructors Constructor Description RejectFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanacceptDocument(HandlerDoc doc, InputStream input, ParseState parseState)Whether to accepts a document.booleanequals(Object other)inthashCode()StringtoString()
-
-
-
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:IDocumentFilterWhether to accepts a document.- Specified by:
acceptDocumentin 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:
trueif document is accepted- Throws:
ImporterHandlerException- problem reading the document
-
-