public class EmbeddedDocumentUtil extends Object implements Serializable
Constructor and Description |
---|
EmbeddedDocumentUtil(ParseContext context) |
Modifier and Type | Method and Description |
---|---|
TikaConfig |
getConfig() |
Detector |
getDetector() |
static EmbeddedDocumentExtractor |
getEmbeddedDocumentExtractor(ParseContext context)
This offers a uniform way to get an EmbeddedDocumentExtractor from a ParseContext.
|
String |
getExtension(TikaInputStream is,
Metadata metadata) |
MimeTypes |
getMimeTypes() |
PasswordProvider |
getPasswordProvider() |
TikaConfig |
getTikaConfig() |
void |
parseEmbedded(InputStream inputStream,
ContentHandler handler,
Metadata metadata,
boolean outputHtml) |
static void |
recordEmbeddedStreamException(Throwable t,
Metadata m) |
static void |
recordException(Throwable t,
Metadata m) |
boolean |
shouldParseEmbedded(Metadata m) |
static Parser |
tryToFindExistingLeafParser(Class clazz,
ParseContext context)
Tries to find an existing parser within the ParseContext.
|
public EmbeddedDocumentUtil(ParseContext context)
public static EmbeddedDocumentExtractor getEmbeddedDocumentExtractor(ParseContext context)
EmptyParser
in the ParseContext.context
- public PasswordProvider getPasswordProvider()
public Detector getDetector()
public MimeTypes getMimeTypes()
public TikaConfig getTikaConfig()
public String getExtension(TikaInputStream is, Metadata metadata)
public TikaConfig getConfig()
public static void recordEmbeddedStreamException(Throwable t, Metadata m)
public boolean shouldParseEmbedded(Metadata m)
public void parseEmbedded(InputStream inputStream, ContentHandler handler, Metadata metadata, boolean outputHtml) throws IOException, SAXException
IOException
SAXException
public static Parser tryToFindExistingLeafParser(Class clazz, ParseContext context)
null
if the context contains no parser or
the correct parser can't be found.clazz
- parser class to search forcontext
- Copyright © 2007–2017 The Apache Software Foundation. All rights reserved.