org.jopendocument.dom.text
Class TextDocument

java.lang.Object
  extended by org.jopendocument.dom.ODDocument
      extended by org.jopendocument.dom.text.TextDocument

public class TextDocument
extends ODDocument


Method Summary
 void add(TextNode<?> p)
          Append a paragraph or a heading.
 void add(TextNode<?> p, org.jdom.Element where, int index)
           
static TextDocument createEmpty(java.lang.String s)
           
static TextDocument createEmpty(java.lang.String s, XMLFormatVersion ns)
           
static TextDocument createFromFile(java.io.File f)
           
static TextDocument get(ODPackage fd)
          This method should be avoided, use ODPackage.getTextDocument().
 java.lang.String getCharacterContent(boolean ooMode)
           
 Paragraph getParagraph(int i)
           
 int getParagraphCount()
           
 
Methods inherited from class org.jopendocument.dom.ODDocument
getContentDocument, getEpoch, getEpoch, getFormatVersion, getPackage, getVersion, saveAs
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createFromFile

public static TextDocument createFromFile(java.io.File f)
                                   throws java.io.IOException
Throws:
java.io.IOException

get

public static TextDocument get(ODPackage fd)
This method should be avoided, use ODPackage.getTextDocument().

Parameters:
fd - a package.
Returns:
the text document.

createEmpty

public static TextDocument createEmpty(java.lang.String s)
                                throws java.io.IOException
Throws:
java.io.IOException

createEmpty

public static TextDocument createEmpty(java.lang.String s,
                                       XMLFormatVersion ns)
                                throws java.io.IOException
Throws:
java.io.IOException

getParagraph

public final Paragraph getParagraph(int i)

getParagraphCount

public final int getParagraphCount()

getCharacterContent

public final java.lang.String getCharacterContent(boolean ooMode)

add

public void add(TextNode<?> p)
Append a paragraph or a heading.

Parameters:
p - paragraph to add.

add

public void add(TextNode<?> p,
                org.jdom.Element where,
                int index)