/** * Returns the parser that best matches the given metadata. By default * looks for a parser that matches the content type metadata property, * and uses the fallback parser if a better match is not found. The * type hierarchy information included in the configured media type * registry is used when looking for a matching parser instance. * <p> * Subclasses can override this method to provide more accurate * parser resolution. * * @param metadata document metadata * @return matching parser */ protected Parser getParser(Metadata metadata) { return getParser(metadata, new ParseContext()); }
Metadata metadata, ParseContext context) throws IOException, SAXException, TikaException { Parser parser = getParser(metadata, context); TemporaryResources tmp = new TemporaryResources(); try {
/** * Returns the parser that best matches the given metadata. By default * looks for a parser that matches the content type metadata property, * and uses the fallback parser if a better match is not found. The * type hierarchy information included in the configured media type * registry is used when looking for a matching parser instance. * <p> * Subclasses can override this method to provide more accurate * parser resolution. * * @param metadata document metadata * @return matching parser */ protected Parser getParser(Metadata metadata) { return getParser(metadata, new ParseContext()); }
/** * Returns the parser that best matches the given metadata. By default * looks for a parser that matches the content type metadata property, * and uses the fallback parser if a better match is not found. The * type hierarchy information included in the configured media type * registry is used when looking for a matching parser instance. * <p> * Subclasses can override this method to provide more accurate * parser resolution. * * @param metadata document metadata * @return matching parser */ protected Parser getParser(Metadata metadata) { return getParser(metadata, new ParseContext()); }
Metadata metadata, ParseContext context) throws IOException, SAXException, TikaException { Parser parser = getParser(metadata, context); TemporaryResources tmp = new TemporaryResources(); try {
Metadata metadata, ParseContext context) throws IOException, SAXException, TikaException { Parser parser = getParser(metadata, context); TemporaryResources tmp = new TemporaryResources(); try {