Package org.apache.tika.parser.pkg
Class AbstractArchiveParser
java.lang.Object
org.apache.tika.parser.AbstractEncodingDetectorParser
org.apache.tika.parser.pkg.AbstractArchiveParser
- All Implemented Interfaces:
Serializable,SelfConfiguring,Parser
- Direct Known Subclasses:
PackageParser,SevenZParser,ZipParser
Abstract base class for archive parsers that provides common functionality
for handling embedded documents within archives.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MetadatahandleEntryMetadata(String name, Date createAt, Date modifiedAt, Long size, XHTMLContentHandler xhtml, ParseContext context) Handles metadata for an archive entry and writes appropriate XHTML elements.Methods inherited from class org.apache.tika.parser.AbstractEncodingDetectorParser
getEncodingDetector, getEncodingDetector, setEncodingDetectorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.tika.parser.Parser
getSupportedTypes, parse
-
Constructor Details
-
AbstractArchiveParser
public AbstractArchiveParser() -
AbstractArchiveParser
-
-
Method Details
-
handleEntryMetadata
public static Metadata handleEntryMetadata(String name, Date createAt, Date modifiedAt, Long size, XHTMLContentHandler xhtml, ParseContext context) throws SAXException, IOException, TikaException Handles metadata for an archive entry and writes appropriate XHTML elements.- Parameters:
name- the entry namecreateAt- creation date (may be null)modifiedAt- modification date (may be null)size- entry size (may be null)xhtml- the XHTML content handlercontext- the parse context- Returns:
- metadata object populated with entry information
- Throws:
SAXExceptionIOExceptionTikaException
-