public class XWPFWordExtractor extends java.lang.Object implements POIXMLTextExtractor
Modifier and Type | Field and Description |
---|---|
static java.util.List<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, wait
checkMaxTextSize, close, getCoreProperties, getCustomProperties, getExtendedProperties, getMetadataTextExtractor, getPackage
public static final java.util.List<XWPFRelation> SUPPORTED_TYPES
public XWPFWordExtractor(OPCPackage container) throws java.io.IOException
java.io.IOException
public XWPFWordExtractor(XWPFDocument document)
public void setFetchHyperlinks(boolean fetch)
public void setConcatenatePhoneticRuns(boolean concatenatePhoneticRuns)
true
concatenatePhoneticRuns
- If phonetic runs should be concatenatedpublic java.lang.String getText()
POITextExtractor
getText
in interface POITextExtractor
public void appendBodyElementText(java.lang.StringBuilder text, IBodyElement e)
public void appendParagraphText(java.lang.StringBuilder text, XWPFParagraph paragraph)
public XWPFDocument getDocument()
POIXMLTextExtractor
getDocument
in interface POITextExtractor
getDocument
in interface POIXMLTextExtractor
public void setCloseFilesystem(boolean doCloseFilesystem)
setCloseFilesystem
in interface POITextExtractor
doCloseFilesystem
- true
(default), if underlying resources/filesystem should be
closed on POITextExtractor.close()
public boolean isCloseFilesystem()
isCloseFilesystem
in interface POITextExtractor
true
, if resources/filesystem should be closed on POITextExtractor.close()
public XWPFDocument getFilesystem()
getFilesystem
in interface POITextExtractor
Copyright 2022 The Apache Software Foundation or its licensors, as applicable.