|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jopendocument.dom.OOXMLDocument
org.jopendocument.dom.OOSingleXMLDocument
public class OOSingleXMLDocument
An XML document containing all of an office document, see section 2.1 of OpenDocument 1.1.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.jopendocument.dom.OOXMLDocument |
---|
OOXMLDocument.ElementTransformer |
Field Summary |
---|
Fields inherited from class org.jopendocument.dom.OOXMLDocument |
---|
NOP_ElementTransformer, TOP_ELEMENTS |
Constructor Summary | |
---|---|
OOSingleXMLDocument(org.jdom.Document content)
|
|
OOSingleXMLDocument(OOSingleXMLDocument doc)
|
Method Summary | |
---|---|
boolean |
add(org.jdom.Element where,
int index,
OOSingleXMLDocument doc)
|
void |
add(OOSingleXMLDocument doc)
Append a document. |
void |
add(OOSingleXMLDocument doc,
boolean pageBreak)
Append a document. |
static OOSingleXMLDocument |
createFromDocument(org.jdom.Document content,
org.jdom.Document style)
Create a document from a collection of subdocuments. |
static OOSingleXMLDocument |
createFromDocument(org.jdom.Document content,
org.jdom.Document style,
org.jdom.Document settings)
|
static OOSingleXMLDocument |
createFromDocument(org.jdom.Document content,
org.jdom.Document style,
org.jdom.Document settings,
java.util.Map<java.lang.String,?> files)
|
static OOSingleXMLDocument |
createFromFile(java.io.File f)
Create a document from a file. |
protected void |
detachDuplicate(org.jdom.Element elem)
Detach the children of elem whose names already exist in the body. |
org.jdom.Element |
getBody()
|
void |
replace(org.jdom.Element elem,
OOSingleXMLDocument doc)
|
java.io.File |
saveAs(java.io.File f)
Saves this OO document to a file. |
Methods inherited from class org.jopendocument.dom.OOXMLDocument |
---|
add, add, addIfNotPresent, addIfNotPresent, asString, getChild, getChild, getDescendant, getDescendant, getDocument, getNS, getVersion, getXPath, mergeAll, mergeAll, setChild |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OOSingleXMLDocument(org.jdom.Document content)
public OOSingleXMLDocument(OOSingleXMLDocument doc)
Method Detail |
---|
public static OOSingleXMLDocument createFromDocument(org.jdom.Document content, org.jdom.Document style)
content
- the content.style
- the styles, can be null
.
public static OOSingleXMLDocument createFromDocument(org.jdom.Document content, org.jdom.Document style, org.jdom.Document settings)
public static OOSingleXMLDocument createFromDocument(org.jdom.Document content, org.jdom.Document style, org.jdom.Document settings, java.util.Map<java.lang.String,?> files)
public static OOSingleXMLDocument createFromFile(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.createFromDocument(Document, Document)
public void add(OOSingleXMLDocument doc)
doc
- the document to add.public void add(OOSingleXMLDocument doc, boolean pageBreak)
doc
- the document to add, null
means no-op.pageBreak
- whether a page break should be inserted after doc
.public void replace(org.jdom.Element elem, OOSingleXMLDocument doc)
public boolean add(org.jdom.Element where, int index, OOSingleXMLDocument doc)
protected final void detachDuplicate(org.jdom.Element elem) throws org.jdom.JDOMException
elem
- the elem to be trimmed.
org.jdom.JDOMException
- if an error occurs.public final org.jdom.Element getBody()
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 |