Class SXSLFPowerPointExtractorDecorator
- All Implemented Interfaces:
OOXMLExtractor
-
Field Summary
Fields inherited from class org.apache.tika.parser.microsoft.ooxml.AbstractOOXMLExtractor
config, EMBEDDED_RELATIONSHIPS, opcPackage -
Constructor Summary
ConstructorsConstructorDescriptionSXSLFPowerPointExtractorDecorator(Metadata metadata, ParseContext context, XSLFEventBasedPowerPointExtractor extractor) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidapplyEmbeddedAnchorMetadata(org.apache.poi.openxml4j.opc.PackagePart part, Metadata metadata) Hook for subclasses to apply anchor metadata (page or sheet numbers) to an embedded part's metadata, for paginated/sheeted containers.protected voidbuildXHTML(XHTMLContentHandler xhtml) Populates theXHTMLContentHandlerobject received as parameter.protected List<org.apache.poi.openxml4j.opc.PackagePart> In PowerPoint files, slides have things embedded in them, and slide drawings which have the imagesMethods inherited from class org.apache.tika.parser.microsoft.ooxml.AbstractOOXMLExtractor
getEmbeddedPartMetadataMap, getJustFileName, getMetadataExtractor, getXHTML, handleEmbeddedFile, loadLinkedRelationships, safeGetRelatedPart
-
Constructor Details
-
SXSLFPowerPointExtractorDecorator
public SXSLFPowerPointExtractorDecorator(Metadata metadata, ParseContext context, XSLFEventBasedPowerPointExtractor extractor)
-
-
Method Details
-
buildXHTML
Description copied from class:AbstractOOXMLExtractorPopulates theXHTMLContentHandlerobject received as parameter.- Specified by:
buildXHTMLin classAbstractOOXMLExtractor- Throws:
SAXExceptionIOException- See Also:
-
getMainDocumentParts
In PowerPoint files, slides have things embedded in them, and slide drawings which have the images- Specified by:
getMainDocumentPartsin classAbstractOOXMLExtractor
-
applyEmbeddedAnchorMetadata
protected void applyEmbeddedAnchorMetadata(org.apache.poi.openxml4j.opc.PackagePart part, Metadata metadata) Description copied from class:AbstractOOXMLExtractorHook for subclasses to apply anchor metadata (page or sheet numbers) to an embedded part's metadata, for paginated/sheeted containers. Called fromAbstractOOXMLExtractor.handleEmbeddedFile(org.apache.poi.openxml4j.opc.PackagePart, org.apache.tika.sax.XHTMLContentHandler, java.lang.String, org.apache.tika.parser.microsoft.ooxml.EmbeddedPartMetadata, org.apache.tika.metadata.TikaCoreProperties.EmbeddedResourceType)after the basic metadata (relationship id, content type, etc.) has been written, before the embedded part is handed off to the recursing parser.Default is no-op — non-paginated containers (Word, Visio, ...) leave embedded resources without anchor metadata. Subclasses for paginated containers should override and invoke either
PageAnchoring.applyPageMetadata(org.apache.tika.metadata.Metadata, java.util.Collection<java.lang.Integer>)(presentations) orPageAnchoring.applySheetMetadata(org.apache.tika.metadata.Metadata, java.util.Collection<java.lang.Integer>)(spreadsheets) with the indices forpart. Letting each subclass own the write keeps the abstract class format-agnostic — pages vs. sheets is a per-format decision.The
PackagePart(not just its target URI) is supplied because relative target URIs differ depending on the relationship source (e.g.../media/image1.pngfrom a slide, or the same relative URI from an Excel drawing) and would not be stable lookup keys across sources. Subclasses can usepart.getPartName().getName()for a canonical absolute path.- Overrides:
applyEmbeddedAnchorMetadatain classAbstractOOXMLExtractor- Parameters:
part- the embedded part being emittedmetadata- metadata to enrich
-