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.
<handler
class="com.norconex.importer.handler.filter.impl.RejectFilter"/>
<handler
class="RejectFilter"/>
<!-- Alternatively, when used in XML flow: -->
<reject/>
Modifier and Type | Field and Description |
---|---|
static RejectFilter |
INSTANCE |
Constructor and Description |
---|
RejectFilter() |
Modifier and Type | Method and Description |
---|---|
boolean |
acceptDocument(HandlerDoc doc,
InputStream input,
ParseState parseState)
Whether to accepts a document.
|
boolean |
equals(Object other) |
int |
hashCode() |
String |
toString() |
public static final RejectFilter INSTANCE
public boolean acceptDocument(HandlerDoc doc, InputStream input, ParseState parseState) throws ImporterHandlerException
IDocumentFilter
acceptDocument
in interface IDocumentFilter
doc
- the document to evaluateinput
- document contentparseState
- whether the document has been parsed already or not (a
parsed document should normally be text-based)true
if document is acceptedImporterHandlerException
- problem reading the documentCopyright © 2009–2023 Norconex Inc.. All rights reserved.