|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.odftoolkit.odfdom.dom.DefaultElementVisitor
org.odftoolkit.simple.common.TextExtractor
org.odftoolkit.simple.common.EditableTextExtractor
public class EditableTextExtractor
It's a sub class of TextExtractor, which provides a method
getText() to return all the text that the user can typically
edit in a document, including text in cotent.xml, header and footer in
styles.xml, meta data in meta.xml.
This function can be used by search engine, and text analytic operations.
OdfElement,
DefaultElementVisitor| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.odftoolkit.simple.common.TextExtractor |
|---|
TextExtractor.ExtractorStringBuilder |
| Field Summary |
|---|
| Fields inherited from class org.odftoolkit.simple.common.TextExtractor |
|---|
mTextBuilder, NewLineChar, TabChar |
| Method Summary | |
|---|---|
String |
getText()
Return the editable text content as a string |
static String |
getText(Document doc)
Return the text content of document as String |
static String |
getText(OdfElement ele)
Return the text content of a element as String |
static EditableTextExtractor |
newOdfEditableTextExtractor(Document doc)
An instance of EditableTextExtractor will be created to extract the editable text content in specified document. |
static EditableTextExtractor |
newOdfEditableTextExtractor(OdfElement element)
An instance of EditableTextExtractor will be created to extract the editable text content of an ODF element. |
void |
visit(DrawObjectElement element)
The end users needn't to care of this method, if you don't want to override the text content handling strategy of draw:object. |
void |
visit(TableTableElement ele)
The end users needn't to care of this method, if you don't want to override the text content handling strategy of table:table. |
void |
visit(TextAElement ele)
The end users needn't to care of this method, if you don't want to override the text content handling strategy of text:a. |
void |
visit(TextTrackedChangesElement ele)
The end users needn't to care of this method, if you don't want to override the text content handling strategy of text:tracked-changes. |
| Methods inherited from class org.odftoolkit.simple.common.TextExtractor |
|---|
appendElementText, newOdfTextExtractor, visit, visit, visit, visit, visit, visit |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static EditableTextExtractor newOdfEditableTextExtractor(Document doc)
doc - the document whose text will be extracted.
public static EditableTextExtractor newOdfEditableTextExtractor(OdfElement element)
element - the ODF element whose text will be extracted.
public static String getText(OdfElement ele)
ele - the ODF element
public static String getText(Document doc)
doc - the document
public String getText()
getText in class TextExtractorpublic void visit(DrawObjectElement element)
visit in class DefaultElementVisitorDefaultElementVisitor.visit(org.odftoolkit.odfdom.dom.element.draw.DrawObjectElement)public void visit(TextTrackedChangesElement ele)
visit in class DefaultElementVisitorDefaultElementVisitor.visit(org.odftoolkit.odfdom.dom.element.text.TextTrackedChangesElement)public void visit(TextAElement ele)
visit in class DefaultElementVisitorDefaultElementVisitor.visit(org.odftoolkit.odfdom.dom.element.text.TextAElement)public void visit(TableTableElement ele)
visit in class DefaultElementVisitorDefaultElementVisitor.visit(org.odftoolkit.odfdom.dom.element.text.TextTabElement)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||