Class SXWPFWordExtractorDecorator
java.lang.Object
org.apache.tika.parser.microsoft.ooxml.AbstractOOXMLExtractor
org.apache.tika.parser.microsoft.ooxml.SXWPFWordExtractorDecorator
- All Implemented Interfaces:
OOXMLExtractor
This is an experimental, alternative extractor for docx files.
This streams the main document content rather than loading the
full document into memory.
This will be better for some use cases than the classic docx extractor; and, it will be worse for others.
- Since:
- 1.15
-
Field Summary
Fields inherited from class AbstractOOXMLExtractor
config, EMBEDDED_RELATIONSHIPS, extractor -
Constructor Summary
ConstructorsConstructorDescriptionSXWPFWordExtractorDecorator(Metadata metadata, ParseContext context, XWPFEventBasedWordExtractor extractor) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbuildXHTML(XHTMLContentHandler xhtml) Populates theXHTMLContentHandlerobject received as parameter.protected Map<String, EmbeddedPartMetadata> protected List<org.apache.poi.openxml4j.opc.PackagePart> This returns all items that might contain embedded objects: main document, headers, footers, comments, etc.The SAX docx path reads metadata directly from the OPC package (no POI/XMLBeans), matching the 4.x behavior.Methods inherited from class AbstractOOXMLExtractor
getDocument, getJustFileName, getParseContext, getXHTML, handleEmbeddedFile, loadLinkedRelationships, safeGetRelatedPart
-
Constructor Details
-
SXWPFWordExtractorDecorator
public SXWPFWordExtractorDecorator(Metadata metadata, ParseContext context, XWPFEventBasedWordExtractor extractor)
-
-
Method Details
-
getMetadataExtractor
The SAX docx path reads metadata directly from the OPC package (no POI/XMLBeans), matching the 4.x behavior. The DOM path keeps the concreteMetadataExtractor.- Specified by:
getMetadataExtractorin interfaceOOXMLExtractor- Overrides:
getMetadataExtractorin classAbstractOOXMLExtractor- See Also:
-
buildXHTML
protected void buildXHTML(XHTMLContentHandler xhtml) throws SAXException, org.apache.xmlbeans.XmlException, IOException Description copied from class:AbstractOOXMLExtractorPopulates theXHTMLContentHandlerobject received as parameter.- Specified by:
buildXHTMLin classAbstractOOXMLExtractor- Throws:
SAXExceptionorg.apache.xmlbeans.XmlExceptionIOException
-
getEmbeddedPartMetadataMap
- Overrides:
getEmbeddedPartMetadataMapin classAbstractOOXMLExtractor
-
getMainDocumentParts
This returns all items that might contain embedded objects: main document, headers, footers, comments, etc.- Specified by:
getMainDocumentPartsin classAbstractOOXMLExtractor
-