public class EmbeddedDocumentUtil extends Object implements Serializable
Constructor and Description |
---|
EmbeddedDocumentUtil(ParseContext context) |
Modifier and Type | Method and Description |
---|---|
TikaConfig |
getConfig()
Deprecated.
as of 1.17, use
getTikaConfig() instead |
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()
TikaConfig
-- trying to find it first in the ParseContext
that was included during initialization, and then creating a new one from
via TikaConfig.getDefaultConfig()
if it can't find one in the
ParseContext. This caches the default config so that it only has to be created once.public String getExtension(TikaInputStream is, Metadata metadata)
@Deprecated public TikaConfig getConfig()
getTikaConfig()
insteadTikaConfig
-- trying to find it first in the ParseContext
that was included in the initialization, and then creating a new one from
via TikaConfig.getDefaultConfig()
if it can't find one in the
ParseContext.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–2021 The Apache Software Foundation. All rights reserved.