Package org.apache.poi.ooxml.extractor
Class POIXMLPropertiesTextExtractor
java.lang.Object
org.apache.poi.ooxml.extractor.POIXMLPropertiesTextExtractor
- All Implemented Interfaces:
Closeable,AutoCloseable,POITextExtractor,POIXMLTextExtractor
A
POITextExtractor for returning the textual
content of the OOXML file properties, eg author
and title.-
Constructor Summary
ConstructorsConstructorDescriptionPOIXMLPropertiesTextExtractor(POIXMLTextExtractor otherExtractor) Creates a new POIXMLPropertiesTextExtractor, for the same file that another TextExtractor is already working on.Creates a new POIXMLPropertiesTextExtractor for the given open document. -
Method Summary
Modifier and TypeMethodDescriptionReturns the core document properties, eg authorReturns the custom document properties, if there are anyReturns opened documentReturns the extended document properties, eg applicationReturns an OOXML properties text extractor for the document properties metadata, such as title and author.getText()Retrieves all the text from the document.booleanvoidsetCloseFilesystem(boolean doCloseFilesystem) Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.poi.ooxml.extractor.POIXMLTextExtractor
checkMaxTextSize, close, getCoreProperties, getCustomProperties, getExtendedProperties, getPackage
-
Constructor Details
-
POIXMLPropertiesTextExtractor
Creates a new POIXMLPropertiesTextExtractor for the given open document.- Parameters:
doc- the given open document
-
POIXMLPropertiesTextExtractor
Creates a new POIXMLPropertiesTextExtractor, for the same file that another TextExtractor is already working on.- Parameters:
otherExtractor- the extractor referencing the given file
-
-
Method Details
-
getCorePropertiesText
Returns the core document properties, eg author- Returns:
- the core document properties
-
getExtendedPropertiesText
Returns the extended document properties, eg application- Returns:
- the extended document properties
-
getCustomPropertiesText
Returns the custom document properties, if there are any- Returns:
- the custom document properties
-
getText
Description copied from interface:POITextExtractorRetrieves all the text from the document. How cells, paragraphs etc are separated in the text is implementation specific - see the javadocs for a specific project for details.- Specified by:
getTextin interfacePOITextExtractor- Returns:
- All the text from the document
-
getMetadataTextExtractor
Description copied from interface:POIXMLTextExtractorReturns an OOXML properties text extractor for the document properties metadata, such as title and author.- Specified by:
getMetadataTextExtractorin interfacePOITextExtractor- Specified by:
getMetadataTextExtractorin interfacePOIXMLTextExtractor- Returns:
- the metadata and text extractor
-
getDocument
Description copied from interface:POIXMLTextExtractorReturns opened document- Specified by:
getDocumentin interfacePOITextExtractor- Specified by:
getDocumentin interfacePOIXMLTextExtractor- Returns:
- the opened document
-
setCloseFilesystem
public void setCloseFilesystem(boolean doCloseFilesystem) - Specified by:
setCloseFilesystemin interfacePOITextExtractor- Parameters:
doCloseFilesystem-true(default), if underlying resources/filesystem should be closed onPOITextExtractor.close()
-
isCloseFilesystem
public boolean isCloseFilesystem()- Specified by:
isCloseFilesystemin interfacePOITextExtractor- Returns:
true, if resources/filesystem should be closed onPOITextExtractor.close()
-
getFilesystem
- Specified by:
getFilesystemin interfacePOITextExtractor- Returns:
- The underlying resources/filesystem
-