org.odftoolkit.odfdom.incubator.doc.text
Class OdfWhitespaceProcessor

java.lang.Object
  extended by org.odftoolkit.odfdom.incubator.doc.text.OdfWhitespaceProcessor

Deprecated. As of release 0.8.8, replaced by org.odftoolkit.simple.common.WhitespaceProcessor in Simple API.

public class OdfWhitespaceProcessor
extends Object

It's a tool class to help process white space.

Author:
J David Eisenberg

Constructor Summary
OdfWhitespaceProcessor()
          Deprecated.  
 
Method Summary
 void append(Element element, String content)
          Deprecated. Add given text content to an element, handling multiple blanks, tabs, and newlines properly.
static void appendText(Element element, String content)
          Deprecated. Append text content to a given element, handling whitespace properly.
 String getText(Node element)
          Deprecated. Retrieve the text content of an element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OdfWhitespaceProcessor

public OdfWhitespaceProcessor()
Deprecated. 
Method Detail

append

public void append(Element element,
                   String content)
Deprecated. 
Add given text content to an element, handling multiple blanks, tabs, and newlines properly.

Parameters:
element - the element to which content is being added
content - text content including whitespace

getText

public String getText(Node element)
Deprecated. 
Retrieve the text content of an element. Recursively retrieves all the text nodes, expanding whitespace where necessary. Ignores any elements except <text:s>, <text:line-break> and <text:tab>.

Parameters:
element - an element whose text you want to retrieve
Returns:
the element's text content, with whitespace expanded

appendText

public static void appendText(Element element,
                              String content)
Deprecated. 
Append text content to a given element, handling whitespace properly. This is a static method that creates its own OdfWhitespaceProcessor, so that you don't have to.

Parameters:
element - the element to which content is being added
content - text content including whitespace


Copyright © 2008-2017 The Apache Software Foundation. All Rights Reserved.