Class DeleteTagger

  • All Implemented Interfaces:
    IXMLConfigurable, IImporterHandler, IDocumentTagger

    public class DeleteTagger
    extends AbstractDocumentTagger

    Delete the metadata fields provided. Exact field names (case-insensitive) to delete can be provided as well as a regular expression that matches one or many fields.

    Can be used both as a pre-parse or post-parse handler.

    XML configuration usage:

    
    <handler
        class="com.norconex.importer.handler.tagger.impl.DeleteTagger">
      <!-- multiple "restrictTo" tags allowed (only one needs to match) -->
      <restrictTo>
        <fieldMatcher>(field-matching expression)</fieldMatcher>
        <valueMatcher>(value-matching expression)</valueMatcher>
      </restrictTo>
      <fieldMatcher>(one or more matching fields to delete)</fieldMatcher>
    </handler>

    XML usage example:

    
    <handler
        class="DeleteTagger">
      <fieldMatcher
          method="regex">
        ^[Xx]-.*
      </fieldMatcher>
    </handler>

    The above deletes all metadata fields starting with "X-".

    Author:
    Pascal Essiembre