Class 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.

    • 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
      • getText

        public String getText()
        Return the editable text content as a string
        Overrides:
        getText in class OdfTextExtractor
        Returns:
        the editable text content as a string