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:
Closeable
,AutoCloseable
- Direct Known Subclasses:
POIXMLPropertiesTextExtractor
,XDGFVisioExtractor
,XSLFPowerPointExtractor
,XSSFEventBasedExcelExtractor
,XSSFExcelExtractor
,XWPFWordExtractor
-
Constructor Summary
ConstructorsConstructorDescriptionPOIXMLTextExtractor
(POIXMLDocument document) Creates a new text extractor for the given document -
Method Summary
Modifier and TypeMethodDescriptionprotected void
checkMaxTextSize
(CharSequence text, String string) void
close()
Allows to free resources of the Extractor as soon as it is not needed any more.Returns the core document propertiesReturns the custom document propertiesfinal POIXMLDocument
Returns opened documentReturns the extended document propertiesReturns an OOXML properties text extractor for the document properties metadata, such as title and author.Returns the opened OPCPackage that contains the documentMethods inherited from class org.apache.poi.extractor.POITextExtractor
getText, setFilesystem
-
Constructor Details
-
POIXMLTextExtractor
Creates a new text extractor for the given document- Parameters:
document
- the document to extract from
-
-
Method Details
-
getCoreProperties
Returns the core document properties- Returns:
- the core document properties
-
getExtendedProperties
Returns the extended document properties- Returns:
- the extended document properties
-
getCustomProperties
Returns the custom document properties- Returns:
- the custom document properties
-
getDocument
Returns opened document- Specified by:
getDocument
in classPOITextExtractor
- Returns:
- the opened document
-
getPackage
Returns the opened OPCPackage that contains the document- Returns:
- the opened OPCPackage
-
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
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 interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classPOITextExtractor
- Throws:
IOException
-
checkMaxTextSize
-