|
OpenOffice.org XMerge API |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.openoffice.xmerge.converter.xml.OfficeDocument
An implementation of Document
for
StarOffice documents.
Constructor Summary | |
OfficeDocument(java.lang.String name)
Default constructor. |
|
OfficeDocument(java.lang.String name,
boolean namespaceAware,
boolean validating)
Constructor with arguments to set namespaceAware
and validating flags. |
Method Summary | |
org.w3c.dom.Document |
getContentDOM()
Return a DOM Document object of the content.xml
file. |
protected abstract java.lang.String |
getFileExtension()
Returns the file extension for this type of Document . |
java.lang.String |
getFileName()
Return the file name of the Document , possibly
with the standard extension. |
java.lang.String |
getName()
Return the name of the Document . |
protected abstract java.lang.String |
getOfficeClassAttribute()
Return the office:class attribute value. |
org.w3c.dom.Document |
getStyleDOM()
Return a DOM Document object of the style.xml file. |
void |
initContentDOM()
Initializes a new DOM Document with the content
containing minimum OpenOffice XML tags. |
void |
initStyleDOM()
Initializes a new DOM Document with styles containing minimum OpenOffice XML tags. |
void |
read(java.io.InputStream is)
Read the Office Document from the given
InputStream . |
void |
read(java.io.InputStream is,
boolean isZip)
Read the Office Document from the given
InputStream . |
void |
setContentDOM(org.w3c.dom.Node newDom)
|
void |
write(java.io.OutputStream os)
Write out Office ZIP file format. |
void |
write(java.io.OutputStream os,
boolean isZip)
Write out Office ZIP file format. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public OfficeDocument(java.lang.String name)
name
- Document
name.public OfficeDocument(java.lang.String name, boolean namespaceAware, boolean validating)
namespaceAware
and validating
flags.name
- Document
name (may or may not
contain extension).namespaceAware
- Value for namespaceAware
flag.validating
- Value for validating
flag.Method Detail |
public org.w3c.dom.Document getContentDOM()
Document
object of the content.xml
file. Note that a content DOM is not created when the constructor
is called. So, either the read
method or the
initContentDOM
method will need to be called ahead
on this object before calling this method.Document
object.protected abstract java.lang.String getFileExtension()
Document
.Document
.public java.lang.String getFileName()
Document
, possibly
with the standard extension.getFileName
in interface Document
Document
.public java.lang.String getName()
Document
.getName
in interface Document
Document
.protected abstract java.lang.String getOfficeClassAttribute()
public org.w3c.dom.Document getStyleDOM()
Document
object of the style.xml file.
Note that this may return null if there is no style DOM.
Note that a style DOM is not created when the constructor
is called. Depending on the InputStream
, a
read
method may or may not build a style DOM. When
creating a new style DOM, call the initStyleDOM
method
first.Document
object.public final void initContentDOM() throws java.io.IOException
Document
with the content
containing minimum OpenOffice XML tags.java.io.IOException
- If any I/O error occurs.public final void initStyleDOM() throws java.io.IOException
java.io.IOException
- If any I/O error occurs.public void read(java.io.InputStream is) throws java.io.IOException
Document
from the given
InputStream
.read
in interface Document
is
- Office document InputStream
.java.io.IOException
- If any I/O error occurs.public void read(java.io.InputStream is, boolean isZip) throws java.io.IOException
Document
from the given
InputStream
.is
- Office document InputStream
.isZip
- boolean
Identifies whether
a file is zipped or notjava.io.IOException
- If any I/O error occurs.public void setContentDOM(org.w3c.dom.Node newDom)
public void write(java.io.OutputStream os) throws java.io.IOException
write
in interface Document
os
- XML OutputStream
.java.io.IOException
- If any I/O error occurs.public void write(java.io.OutputStream os, boolean isZip) throws java.io.IOException
os
- XML OutputStream
.isZip
- boolean
java.io.IOException
- If any I/O error occurs.
|
OpenOffice.org XMerge API |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |