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(String s)
           
static TextDocument createEmpty(String s, XMLFormatVersion ns)
           
static TextDocument createFromFile(File f)
           
static TextDocument get(ODPackage fd)
          This method should be avoided, use ODPackage.getTextDocument().
 String getCharacterContent(boolean ooMode)
           
 Paragraph getParagraph(int i)
           
 int getParagraphCount()
           
 
Methods inherited from class org.jopendocument.dom.ODDocument
getBody, getContentDocument, getEpoch, getEpoch, getFormatVersion, getPackage, getVersion, saveAs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createFromFile

public static TextDocument createFromFile(File f)
                                   throws IOException
Throws:
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(String s)
                                throws IOException
Throws:
IOException

createEmpty

public static TextDocument createEmpty(String s,
                                       XMLFormatVersion ns)
                                throws IOException
Throws:
IOException

getParagraph

public final Paragraph getParagraph(int i)

getParagraphCount

public final int getParagraphCount()

getCharacterContent

public final 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)


Copyright © 2010 jOpenDocument All Rights Reserved.