public class TikaOfficeDetectParser extends Object implements org.apache.tika.parser.Parser
Apache Tika assumes that
you either know exactly what your content is, or that
you'll leave it to auto-detection.
Within Alfresco, we usually do know. However, from time
to time, we don't know if we have one of the old or one
of the new office files (eg .xls and .xlsx).
This class allows automatically selects the appropriate
old (OLE2) or new (OOXML) Tika parser as required.| Constructor and Description |
|---|
TikaOfficeDetectParser() |
| Modifier and Type | Method and Description |
|---|---|
Set<org.apache.tika.mime.MediaType> |
getSupportedTypes(org.apache.tika.parser.ParseContext parseContext) |
void |
parse(InputStream stream,
ContentHandler handler,
org.apache.tika.metadata.Metadata metadata)
Deprecated.
This method will be removed in Apache Tika 1.0.
|
void |
parse(InputStream stream,
ContentHandler handler,
org.apache.tika.metadata.Metadata metadata,
org.apache.tika.parser.ParseContext parseContext) |
public Set<org.apache.tika.mime.MediaType> getSupportedTypes(org.apache.tika.parser.ParseContext parseContext)
getSupportedTypes in interface org.apache.tika.parser.Parserpublic void parse(InputStream stream, ContentHandler handler, org.apache.tika.metadata.Metadata metadata, org.apache.tika.parser.ParseContext parseContext) throws IOException, SAXException, org.apache.tika.exception.TikaException
parse in interface org.apache.tika.parser.ParserIOExceptionSAXExceptionorg.apache.tika.exception.TikaExceptionpublic void parse(InputStream stream, ContentHandler handler, org.apache.tika.metadata.Metadata metadata) throws IOException, SAXException, org.apache.tika.exception.TikaException
IOExceptionSAXExceptionorg.apache.tika.exception.TikaExceptionCopyright © 2005–2014 Alfresco Software. All rights reserved.