Class OdfTextExtractor

  • All Implemented Interfaces:
    ElementVisitor
    Direct Known Subclasses:
    OdfEditableTextExtractor

    public class OdfTextExtractor
    extends DefaultElementVisitor
    It's a sub class of DefaultElementVisitor. It provides a method to get the display text of a single element.

    If you pass the content root as the parameter, the whole document content will be returned, without any tag information.

    It implements part of white space handling fuctions: text:p, text:h, text:s, text:tab, text:linebreak are processed according to ODF specification.

    • Constructor Detail

      • OdfTextExtractor

        protected OdfTextExtractor()
        Default constructor
      • OdfTextExtractor

        protected OdfTextExtractor​(OdfElement element)
        Constructor with an ODF element as paramter
        Parameters:
        element - the ODF element whose text would be extracted.