Class EmptyMetadataFilter
- java.lang.Object
-
- com.norconex.importer.handler.AbstractImporterHandler
-
- com.norconex.importer.handler.filter.AbstractDocumentFilter
-
- com.norconex.importer.handler.filter.impl.EmptyMetadataFilter
-
- All Implemented Interfaces:
IXMLConfigurable,IDocumentFilter,IOnMatchFilter,IImporterHandler
@Deprecated public class EmptyMetadataFilter extends AbstractDocumentFilter
Deprecated.Since 3.0.0, useEmptyFilter.Accepts or rejects a document based on whether any of the specified metadata fields are empty or not. Any control characters (char <= 32) are removed before evaluating if a field is empty or not.
XML configuration usage:
<handler class="com.norconex.importer.handler.filter.impl.EmptyMetadataFilter" onMatch="[include|exclude]" fields="(coma separated list of fields to match)"> <!-- multiple "restrictTo" tags allowed (only one needs to match) --> <restrictTo> <fieldMatcher>(field-matching expression)</fieldMatcher> <valueMatcher>(value-matching expression)</valueMatcher> </restrictTo> </handler>XML usage example:
<handler class="EmptyMetadataFilter" onMatch="exclude" fields="title,dc:title"/>The above example excludes documents without titles.
- Since:
- 1.2
- Author:
- Pascal Essiembre
-
-
Constructor Summary
Constructors Constructor Description EmptyMetadataFilter()Deprecated.EmptyMetadataFilter(OnMatch onMatch, String... fields)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanequals(Object other)Deprecated.List<String>getFields()Deprecated.inthashCode()Deprecated.protected booleanisDocumentMatched(HandlerDoc doc, InputStream input, ParseState parseState)Deprecated.protected voidloadFilterFromXML(XML xml)Deprecated.protected voidsaveFilterToXML(XML xml)Deprecated.voidsetFields(String... fields)Deprecated.voidsetFields(List<String> fields)Deprecated.StringtoString()Deprecated.-
Methods inherited from class com.norconex.importer.handler.filter.AbstractDocumentFilter
acceptDocument, getOnMatch, loadHandlerFromXML, saveHandlerToXML, setOnMatch
-
Methods inherited from class com.norconex.importer.handler.AbstractImporterHandler
addRestriction, addRestriction, addRestrictions, clearRestrictions, detectCharsetIfBlank, getRestrictions, isApplicable, loadFromXML, removeRestriction, removeRestriction, saveToXML
-
-
-
-
Method Detail
-
setFields
public void setFields(String... fields)
Deprecated.
-
isDocumentMatched
protected boolean isDocumentMatched(HandlerDoc doc, InputStream input, ParseState parseState) throws ImporterHandlerException
Deprecated.- Specified by:
isDocumentMatchedin classAbstractDocumentFilter- Throws:
ImporterHandlerException
-
loadFilterFromXML
protected void loadFilterFromXML(XML xml)
Deprecated.- Specified by:
loadFilterFromXMLin classAbstractDocumentFilter
-
saveFilterToXML
protected void saveFilterToXML(XML xml)
Deprecated.- Specified by:
saveFilterToXMLin classAbstractDocumentFilter
-
equals
public boolean equals(Object other)
Deprecated.- Overrides:
equalsin classAbstractDocumentFilter
-
hashCode
public int hashCode()
Deprecated.- Overrides:
hashCodein classAbstractDocumentFilter
-
toString
public String toString()
Deprecated.- Overrides:
toStringin classAbstractDocumentFilter
-
-