public class XWPFWordExtractor extends 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) |
java.lang.String |
getText()
Retrieves all the text from the document.
|
static void |
main(java.lang.String[] args) |
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
|
checkMaxTextSize, close, getCoreProperties, getCustomProperties, getDocument, getExtendedProperties, getMetadataTextExtractor, getPackagesetFilesystempublic static final XWPFRelation[] SUPPORTED_TYPES
public XWPFWordExtractor(OPCPackage container) throws org.apache.xmlbeans.XmlException, OpenXML4JException, java.io.IOException
org.apache.xmlbeans.XmlExceptionOpenXML4JExceptionjava.io.IOExceptionpublic XWPFWordExtractor(XWPFDocument document)
public static void main(java.lang.String[] args)
throws java.lang.Exception
java.lang.Exceptionpublic void setFetchHyperlinks(boolean fetch)
public void setConcatenatePhoneticRuns(boolean concatenatePhoneticRuns)
trueconcatenatePhoneticRuns - public java.lang.String getText()
POITextExtractorgetText in class POITextExtractorpublic void appendBodyElementText(java.lang.StringBuilder text,
IBodyElement e)
public void appendParagraphText(java.lang.StringBuilder text,
XWPFParagraph paragraph)
Copyright 2020 The Apache Software Foundation or its licensors, as applicable.