public class EmbeddedDocumentUtil
extends java.lang.Object
implements java.io.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.
|
java.lang.String |
getExtension(TikaInputStream is,
Metadata metadata) |
MimeTypes |
getMimeTypes() |
PasswordProvider |
getPasswordProvider() |
TikaConfig |
getTikaConfig() |
void |
parseEmbedded(java.io.InputStream inputStream,
org.xml.sax.ContentHandler handler,
Metadata metadata,
boolean outputHtml) |
static void |
recordEmbeddedStreamException(java.lang.Throwable t,
Metadata m) |
static void |
recordException(java.lang.Throwable t,
Metadata m) |
boolean |
shouldParseEmbedded(Metadata m) |
static Parser |
tryToFindExistingLeafParser(java.lang.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 java.lang.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 recordException(java.lang.Throwable t, Metadata m)
public static void recordEmbeddedStreamException(java.lang.Throwable t, Metadata m)
public boolean shouldParseEmbedded(Metadata m)
public void parseEmbedded(java.io.InputStream inputStream, org.xml.sax.ContentHandler handler, Metadata metadata, boolean outputHtml) throws java.io.IOException, org.xml.sax.SAXException
java.io.IOException
org.xml.sax.SAXException
public static Parser tryToFindExistingLeafParser(java.lang.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 © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"