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, wait
checkMaxTextSize, close, getCoreProperties, getCustomProperties, getExtendedProperties, getMetadataTextExtractor, getPackage
public static final XWPFRelation[] SUPPORTED_TYPES
public XWPFWordExtractor(OPCPackage container) throws java.io.IOException
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 concatenated
(concatenatePhoneticRuns - 如果应该连接拼音运行)
public java.lang.String getText()
POITextExtractor
getText
in interface
POITextExtractor
(接口 POITextExtractor 中的 getText)
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
(接口 POITextExtractor 中的 getDocument)
getDocument
in interface
POIXMLTextExtractor
(接口 POIXMLTextExtractor 中的 getDocument)
public void setCloseFilesystem(boolean doCloseFilesystem)
setCloseFilesystem
in interface
POITextExtractor
(接口 POITextExtractor 中的 setCloseFilesystem)
doCloseFilesystem
-
true
(default), if underlying resources/filesystem should be closed on
POITextExtractor.close()
(doCloseFilesystem - true(默认),如果底层资源/文件系统应该在 POITextExtractor.close() 上关闭)
public boolean isCloseFilesystem()
isCloseFilesystem
in interface
POITextExtractor
(接口 POITextExtractor 中的 isCloseFilesystem)
true
, if resources/filesystem should be closed on
POITextExtractor.close()
(true,如果资源/文件系统应该在 POITextExtractor.close() 上关闭)
public XWPFDocument getFilesystem()
getFilesystem
in interface
POITextExtractor
(接口 POITextExtractor 中的 getFilesystem)
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.