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 boolean
equals(Object other)
Deprecated.List<String>
getFields()
Deprecated.int
hashCode()
Deprecated.protected boolean
isDocumentMatched(HandlerDoc doc, InputStream input, ParseState parseState)
Deprecated.protected void
loadFilterFromXML(XML xml)
Deprecated.protected void
saveFilterToXML(XML xml)
Deprecated.void
setFields(String... fields)
Deprecated.void
setFields(List<String> fields)
Deprecated.String
toString()
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:
isDocumentMatched
in classAbstractDocumentFilter
- Throws:
ImporterHandlerException
-
loadFilterFromXML
protected void loadFilterFromXML(XML xml)
Deprecated.- Specified by:
loadFilterFromXML
in classAbstractDocumentFilter
-
saveFilterToXML
protected void saveFilterToXML(XML xml)
Deprecated.- Specified by:
saveFilterToXML
in classAbstractDocumentFilter
-
equals
public boolean equals(Object other)
Deprecated.- Overrides:
equals
in classAbstractDocumentFilter
-
hashCode
public int hashCode()
Deprecated.- Overrides:
hashCode
in classAbstractDocumentFilter
-
toString
public String toString()
Deprecated.- Overrides:
toString
in classAbstractDocumentFilter
-
-