public class XWPFWordExtractor extends java.lang.Object implements POIXMLTextExtractor
| Modifier and Type | Field and Description |
|---|---|
static XWPFRelation[] |
SUPPORTED_TYPES |
| Constructor and Description |
|---|
XWPFWordExtractor(OPCPackage container) |
XWPFWordExtractor(XWPFDocument document) |
| Modifier and Type | Method and Description |
|---|---|
void |
appendBodyElementText(java.lang.StringBuilder text,
IBodyElement e) |
void |
appendParagraphText(java.lang.StringBuilder text,
XWPFParagraph paragraph) |
XWPFDocument |
getDocument()
Returns opened document
|
XWPFDocument |
getFilesystem() |
java.lang.String |
getText()
Retrieves all the text from the document.
|
boolean |
isCloseFilesystem() |
void |
setCloseFilesystem(boolean doCloseFilesystem) |
void |
setConcatenatePhoneticRuns(boolean concatenatePhoneticRuns)
Should we concatenate phonetic runs in extraction.
|
void |
setFetchHyperlinks(boolean fetch)
Should we also fetch the hyperlinks, when fetching
the text content? Default is to only output the
hyperlink label, and not the contents
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcheckMaxTextSize, close, getCoreProperties, getCustomProperties, getExtendedProperties, getMetadataTextExtractor, getPackagepublic static final XWPFRelation[] SUPPORTED_TYPES
public XWPFWordExtractor(OPCPackage container) throws java.io.IOException
java.io.IOExceptionpublic XWPFWordExtractor(XWPFDocument document)
public void setFetchHyperlinks(boolean fetch)
public void setConcatenatePhoneticRuns(boolean concatenatePhoneticRuns)
trueconcatenatePhoneticRuns - If phonetic runs should be concatenatedpublic java.lang.String getText()
POITextExtractorgetText in interface POITextExtractorpublic void appendBodyElementText(java.lang.StringBuilder text,
IBodyElement e)
public void appendParagraphText(java.lang.StringBuilder text,
XWPFParagraph paragraph)
public XWPFDocument getDocument()
POIXMLTextExtractorgetDocument in interface POITextExtractorgetDocument in interface POIXMLTextExtractorpublic void setCloseFilesystem(boolean doCloseFilesystem)
setCloseFilesystem in interface POITextExtractordoCloseFilesystem - true (default), if underlying resources/filesystem should be
closed on POITextExtractor.close()public boolean isCloseFilesystem()
isCloseFilesystem in interface POITextExtractortrue, if resources/filesystem should be closed on POITextExtractor.close()public XWPFDocument getFilesystem()
getFilesystem in interface POITextExtractorCopyright 2021 The Apache Software Foundation or its licensors, as applicable.