Class EmptyMetadataFilter

  • All Implemented Interfaces:
    IXMLConfigurable, IDocumentFilter, IOnMatchFilter, IImporterHandler

    @Deprecated
    public class EmptyMetadataFilter
    extends AbstractDocumentFilter
    Deprecated.
    Since 3.0.0, use EmptyFilter.

    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