Class ParserDecorator.MimeFilteringDecorator

java.lang.Object
org.apache.tika.parser.ParserDecorator
org.apache.tika.parser.ParserDecorator.MimeFilteringDecorator
All Implemented Interfaces:
Serializable, SelfConfiguring, Parser
Enclosing class:
ParserDecorator

public static class ParserDecorator.MimeFilteringDecorator extends ParserDecorator
A ParserDecorator that filters supported mime types. Stores include/exclude sets for round-trip serialization. Results are cached when includeTypes is specified (deterministic case).
See Also:
  • Constructor Details

  • Method Details

    • getSupportedTypes

      public Set<MediaType> getSupportedTypes(ParseContext context)
      Description copied from class: ParserDecorator
      Delegates the method call to the decorated parser. Subclasses should override this method (and use super.getSupportedTypes() to invoke the decorated parser) to implement extra decoration.
      Specified by:
      getSupportedTypes in interface Parser
      Overrides:
      getSupportedTypes in class ParserDecorator
      Parameters:
      context - parse context
      Returns:
      immutable set of media types
    • getDecorationName

      public String getDecorationName()
      Overrides:
      getDecorationName in class ParserDecorator
      Returns:
      A name/description of the decoration, or null if none available
    • getIncludeTypes

      public Set<MediaType> getIncludeTypes()
      Returns:
      the included mime types, or empty set if no include filter
    • getExcludeTypes

      public Set<MediaType> getExcludeTypes()
      Returns:
      the excluded mime types, or empty set if no exclude filter