Package org.apache.poi.ooxml.extractor
Class POIXMLPropertiesTextExtractor
- java.lang.Object
-
- org.apache.poi.ooxml.extractor.POIXMLPropertiesTextExtractor
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,POITextExtractor
,POIXMLTextExtractor
public class POIXMLPropertiesTextExtractor extends Object implements POIXMLTextExtractor
APOITextExtractor
for returning the textual content of the OOXML file properties, eg author and title.
-
-
Constructor Summary
Constructors Constructor Description POIXMLPropertiesTextExtractor(POIXMLTextExtractor otherExtractor)
Creates a new POIXMLPropertiesTextExtractor, for the same file that another TextExtractor is already working on.POIXMLPropertiesTextExtractor(POIXMLDocument doc)
Creates a new POIXMLPropertiesTextExtractor for the given open document.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getCorePropertiesText()
Returns the core document properties, eg authorString
getCustomPropertiesText()
Returns the custom document properties, if there are anyPOIXMLDocument
getDocument()
Returns opened documentString
getExtendedPropertiesText()
Returns the extended document properties, eg applicationPOIXMLDocument
getFilesystem()
POIXMLPropertiesTextExtractor
getMetadataTextExtractor()
Returns an OOXML properties text extractor for the document properties metadata, such as title and author.String
getText()
boolean
isCloseFilesystem()
void
setCloseFilesystem(boolean doCloseFilesystem)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.poi.ooxml.extractor.POIXMLTextExtractor
checkMaxTextSize, close, getCoreProperties, getCustomProperties, getExtendedProperties, getPackage
-
-
-
-
Constructor Detail
-
POIXMLPropertiesTextExtractor
public POIXMLPropertiesTextExtractor(POIXMLDocument doc)
Creates a new POIXMLPropertiesTextExtractor for the given open document.- Parameters:
doc
- the given open document
-
POIXMLPropertiesTextExtractor
public POIXMLPropertiesTextExtractor(POIXMLTextExtractor otherExtractor)
Creates a new POIXMLPropertiesTextExtractor, for the same file that another TextExtractor is already working on.- Parameters:
otherExtractor
- the extractor referencing the given file
-
-
Method Detail
-
getCorePropertiesText
public String getCorePropertiesText()
Returns the core document properties, eg author- Returns:
- the core document properties
-
getExtendedPropertiesText
public String getExtendedPropertiesText()
Returns the extended document properties, eg application- Returns:
- the extended document properties
-
getCustomPropertiesText
public String getCustomPropertiesText()
Returns the custom document properties, if there are any- Returns:
- the custom document properties
-
getText
public String getText()
- Specified by:
getText
in interfacePOITextExtractor
-
getMetadataTextExtractor
public POIXMLPropertiesTextExtractor getMetadataTextExtractor()
Description copied from interface:POIXMLTextExtractor
Returns an OOXML properties text extractor for the document properties metadata, such as title and author.- Specified by:
getMetadataTextExtractor
in interfacePOITextExtractor
- Specified by:
getMetadataTextExtractor
in interfacePOIXMLTextExtractor
-
getDocument
public POIXMLDocument getDocument()
Description copied from interface:POIXMLTextExtractor
Returns opened document- Specified by:
getDocument
in interfacePOITextExtractor
- Specified by:
getDocument
in interfacePOIXMLTextExtractor
- Returns:
- the opened document
-
setCloseFilesystem
public void setCloseFilesystem(boolean doCloseFilesystem)
- Specified by:
setCloseFilesystem
in interfacePOITextExtractor
-
isCloseFilesystem
public boolean isCloseFilesystem()
- Specified by:
isCloseFilesystem
in interfacePOITextExtractor
-
getFilesystem
public POIXMLDocument getFilesystem()
- Specified by:
getFilesystem
in interfacePOITextExtractor
-
-