Class OdfEditableTextExtractor
- java.lang.Object
-
- org.odftoolkit.odfdom.dom.DefaultElementVisitor
-
- org.odftoolkit.odfdom.incubator.doc.text.OdfTextExtractor
-
- org.odftoolkit.odfdom.incubator.doc.text.OdfEditableTextExtractor
-
- All Implemented Interfaces:
ElementVisitor
public class OdfEditableTextExtractor extends OdfTextExtractor
It's a sub class of OdfTextExtractor. It provides a method 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.
-
-
Field Summary
-
Fields inherited from class org.odftoolkit.odfdom.incubator.doc.text.OdfTextExtractor
mTextBuilder, NewLineChar, TabChar
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getText()
Return the editable text content as a stringstatic OdfEditableTextExtractor
newOdfEditableTextExtractor(OdfDocument doc)
An instance of OdfEditableTextExtractor will be created to extract the editable text content of an ODF element.static OdfEditableTextExtractor
newOdfEditableTextExtractor(OdfElement element)
An instance of OdfEditableTextExtractor will be created to extract the editable text content of an ODF element.void
visit(DrawObjectElement element)
A method to visit "draw:object" elementsvoid
visit(TableTableElement ele)
A method to visit "table:table" elementsvoid
visit(TextAElement ele)
A method to visit "text:a" elementsvoid
visit(TextTrackedChangesElement ele)
A method to visit "text:tracked-changes" elements-
Methods inherited from class org.odftoolkit.odfdom.incubator.doc.text.OdfTextExtractor
appendElementText, newOdfTextExtractor, visit, visit, visit, visit, visit, visit
-
Methods inherited from class org.odftoolkit.odfdom.dom.DefaultElementVisitor
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
-
-
-
-
Method Detail
-
newOdfEditableTextExtractor
public static OdfEditableTextExtractor newOdfEditableTextExtractor(OdfDocument doc)
An instance of OdfEditableTextExtractor will be created to extract the editable text content of an ODF element.- Parameters:
doc
- the ODF document whose text will be extracted.- Returns:
- An instance of OdfEditableTextExtractor
-
newOdfEditableTextExtractor
public static OdfEditableTextExtractor newOdfEditableTextExtractor(OdfElement element)
An instance of OdfEditableTextExtractor will be created to extract the editable text content of an ODF element.- Parameters:
element
- the ODF element whose text will be extracted.- Returns:
- An instance of OdfEditableTextExtractor
-
visit
public void visit(DrawObjectElement element)
Description copied from class:DefaultElementVisitor
A method to visit "draw:object" elements- Overrides:
visit
in classDefaultElementVisitor
- Parameters:
element
- - an instance of DrawObjectElement
-
visit
public void visit(TextTrackedChangesElement ele)
Description copied from class:DefaultElementVisitor
A method to visit "text:tracked-changes" elements- Overrides:
visit
in classDefaultElementVisitor
- Parameters:
ele
- - an instance of TextTrackedChangesElement
-
visit
public void visit(TextAElement ele)
Description copied from class:DefaultElementVisitor
A method to visit "text:a" elements- Overrides:
visit
in classDefaultElementVisitor
- Parameters:
ele
- - an instance of TextAElement
-
visit
public void visit(TableTableElement ele)
Description copied from class:DefaultElementVisitor
A method to visit "table:table" elements- Overrides:
visit
in classDefaultElementVisitor
- Parameters:
ele
- - an instance of TableTableElement
-
getText
public String getText()
Return the editable text content as a string- Overrides:
getText
in classOdfTextExtractor
- Returns:
- the editable text content as a string
-
-