Package org.apache.poi.ooxml.extractor
Class POIXMLTextExtractor
- java.lang.Object
-
- org.apache.poi.extractor.POITextExtractor
-
- org.apache.poi.ooxml.extractor.POIXMLTextExtractor
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
- Direct Known Subclasses:
POIXMLPropertiesTextExtractor
,XDGFVisioExtractor
,XPSTextExtractor
,XSLFEventBasedPowerPointExtractor
,XSLFPowerPointExtractor
,XSSFEventBasedExcelExtractor
,XSSFExcelExtractor
,XWPFEventBasedWordExtractor
,XWPFWordExtractor
public abstract class POIXMLTextExtractor extends POITextExtractor
-
-
Constructor Summary
Constructors Constructor Description POIXMLTextExtractor(POIXMLDocument document)
Creates a new text extractor for the given document
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Allows to free resources of the Extractor as soon as it is not needed any more.POIXMLProperties.CoreProperties
getCoreProperties()
Returns the core document propertiesPOIXMLProperties.CustomProperties
getCustomProperties()
Returns the custom document propertiesPOIXMLDocument
getDocument()
Returns opened documentPOIXMLProperties.ExtendedProperties
getExtendedProperties()
Returns the extended document propertiesPOIXMLPropertiesTextExtractor
getMetadataTextExtractor()
Returns an OOXML properties text extractor for the document properties metadata, such as title and author.OPCPackage
getPackage()
Returns the opened OPCPackage that contains the document-
Methods inherited from class org.apache.poi.extractor.POITextExtractor
getText, setFilesystem
-
-
-
-
Constructor Detail
-
POIXMLTextExtractor
public POIXMLTextExtractor(POIXMLDocument document)
Creates a new text extractor for the given document- Parameters:
document
- the document to extract from
-
-
Method Detail
-
getCoreProperties
public POIXMLProperties.CoreProperties getCoreProperties()
Returns the core document properties- Returns:
- the core document properties
-
getExtendedProperties
public POIXMLProperties.ExtendedProperties getExtendedProperties()
Returns the extended document properties- Returns:
- the extended document properties
-
getCustomProperties
public POIXMLProperties.CustomProperties getCustomProperties()
Returns the custom document properties- Returns:
- the custom document properties
-
getDocument
public final POIXMLDocument getDocument()
Returns opened document- Specified by:
getDocument
in classPOITextExtractor
- Returns:
- the opened document
-
getPackage
public OPCPackage getPackage()
Returns the opened OPCPackage that contains the document- Returns:
- the opened OPCPackage
-
getMetadataTextExtractor
public POIXMLPropertiesTextExtractor getMetadataTextExtractor()
Returns an OOXML properties text extractor for the document properties metadata, such as title and author.- Specified by:
getMetadataTextExtractor
in classPOITextExtractor
- Returns:
- the metadata and text extractor
-
close
public void close() throws java.io.IOException
Description copied from class:POITextExtractor
Allows to free resources of the Extractor as soon as it is not needed any more. This may include closing open file handles and freeing memory. The Extractor cannot be used after close has been called.- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classPOITextExtractor
- Throws:
java.io.IOException
-
-