Class ParserUtils

java.lang.Object
org.apache.tika.utils.ParserUtils

public class ParserUtils extends Object
Helper util methods for Parsers themselves.
  • Field Details

    • X_PARSED_BY

      public static final String X_PARSED_BY
      See Also:
    • EMBEDDED_PARSER

      public static final Property EMBEDDED_PARSER
    • EMBEDDED_EXCEPTION

      public static final Property EMBEDDED_EXCEPTION
  • Constructor Details

    • ParserUtils

      public ParserUtils()
  • Method Details

    • cloneMetadata

      public static Metadata cloneMetadata(Metadata m)
      Does a deep clone of a Metadata object.
    • getParserClassname

      public static String getParserClassname(Parser parser)
      Identifies the real class name of the Parser, unwrapping any ParserDecorator decorations on top of it.
    • recordParserDetails

      public static void recordParserDetails(Parser parser, Metadata metadata)
      Records details of the Parser used to the Metadata, typically wanted where multiple parsers could be picked between or used.
    • recordParserFailure

      public static void recordParserFailure(Parser parser, Throwable failure, Metadata metadata)
      Records details of a Parser's failure to the Metadata, so you can check what went wrong even if the Exception wasn't immediately thrown (eg when several different Parsers are used)