public class EmptyMetadataFilter extends AbstractOnMatchFilter implements IDocumentFilter, IXMLConfigurable
XML configuration usage:
<filter class="com.norconex.importer.filter.impl.EmptyMetadataFilter" onMatch="[include|exclude]" properties="(coma separated list of properties to match)" />
Constructor and Description |
---|
EmptyMetadataFilter() |
EmptyMetadataFilter(OnMatch onMatch,
String... properties) |
Modifier and Type | Method and Description |
---|---|
boolean |
acceptDocument(InputStream document,
Properties metadata,
boolean parsed)
Whether to accepts a document.
|
boolean |
equals(Object obj) |
String[] |
getProperties() |
int |
hashCode() |
void |
loadFromXML(Reader in) |
void |
saveToXML(Writer out) |
void |
setProperties(String... properties) |
String |
toString() |
getOnMatch, loadFromXML, saveToXML, setOnMatch
public String[] getProperties()
public void setProperties(String... properties)
public final boolean acceptDocument(InputStream document, Properties metadata, boolean parsed) throws IOException
IDocumentFilter
acceptDocument
in interface IDocumentFilter
document
- the document to evaluatemetadata
- document metadataparsed
- whether the document has been parsed already or not (a
parsed document should normally be text-based)true
if document is acceptedIOException
- problem reading the documentpublic void loadFromXML(Reader in)
loadFromXML
in interface IXMLConfigurable
public void saveToXML(Writer out) throws IOException
saveToXML
in interface IXMLConfigurable
IOException
public String toString()
toString
in class AbstractOnMatchFilter
public int hashCode()
hashCode
in class AbstractOnMatchFilter
public boolean equals(Object obj)
equals
in class AbstractOnMatchFilter
Copyright © 2009-2014 Norconex Inc.. All Rights Reserved.