|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jopendocument.dom.ODXMLDocument
org.jopendocument.dom.ODSingleXMLDocument
public class ODSingleXMLDocument
An XML document containing all of an office document, see section 2.1 of OpenDocument 1.1.
| Constructor Summary | |
|---|---|
ODSingleXMLDocument(org.jdom.Document content)
|
|
| Method Summary | |
|---|---|
void |
add(org.jdom.Element where,
int index,
ODSingleXMLDocument doc)
|
void |
add(ODSingleXMLDocument doc)
Append a document. |
void |
add(ODSingleXMLDocument doc,
boolean pageBreak)
Append a document. |
ODSingleXMLDocument |
clone()
|
static ODSingleXMLDocument |
createFromDocument(org.jdom.Document content,
org.jdom.Document style)
Create a document from a collection of subdocuments. |
static ODSingleXMLDocument |
createFromFile(java.io.File f)
Create a document from a flat XML. |
static ODSingleXMLDocument |
createFromPackage(java.io.File f)
Create a document from a package. |
static ODSingleXMLDocument |
createFromStream(java.io.InputStream ins)
|
org.jdom.Element |
getBody()
|
int |
getNumero()
The number of files concatenated with add(ODSingleXMLDocument). |
ODPackage |
getPackage()
|
boolean |
isDead()
Return true if this document was split. |
void |
replace(org.jdom.Element elem,
ODSingleXMLDocument doc)
|
java.io.File |
saveAs(java.io.File f)
Saves this OO document to a file. |
| Methods inherited from class org.jopendocument.dom.ODXMLDocument |
|---|
addAutoStyle, asString, create, findUnusedName, getChild, getChild, getDefaultStyle, getDescendantByName, getDescendantByName, getDocument, getFormatVersion, getNamedElements, getStyle, getValidator, getVersion, getXML, getXPath, setChild |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ODSingleXMLDocument(org.jdom.Document content)
| Method Detail |
|---|
public static ODSingleXMLDocument createFromDocument(org.jdom.Document content,
org.jdom.Document style)
content - the content.style - the styles, can be null.
public static ODSingleXMLDocument createFromPackage(java.io.File f)
throws org.jdom.JDOMException,
java.io.IOException
f - an OpenDocument package file.
org.jdom.JDOMException - if the file is not a valid OpenDocument file.
java.io.IOException - if the file can't be read.
public static ODSingleXMLDocument createFromFile(java.io.File f)
throws org.jdom.JDOMException,
java.io.IOException
f - an OpenDocument XML file.
org.jdom.JDOMException - if the file is not a valid OpenDocument file.
java.io.IOException - if the file can't be read.
public static ODSingleXMLDocument createFromStream(java.io.InputStream ins)
throws org.jdom.JDOMException,
java.io.IOException
org.jdom.JDOMException
java.io.IOExceptionpublic ODSingleXMLDocument clone()
clone in class java.lang.Objectpublic final int getNumero()
add(ODSingleXMLDocument).
public ODPackage getPackage()
public void add(ODSingleXMLDocument doc)
doc - the document to add.
public void add(ODSingleXMLDocument doc,
boolean pageBreak)
doc - the document to add, null means no-op.pageBreak - whether a page break should be inserted before doc.
public void replace(org.jdom.Element elem,
ODSingleXMLDocument doc)
public void add(org.jdom.Element where,
int index,
ODSingleXMLDocument doc)
public final org.jdom.Element getBody()
public final boolean isDead()
true if this document was split.
true if this has no package anymore.ODPackage.split()
public java.io.File saveAs(java.io.File f)
throws java.io.IOException
f - the file where this document will be saved, without extension, eg "dir/myfile".
java.io.IOException - if an error occurs.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||