|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwriter2latex.xmerge.EmbeddedObject
writer2latex.xmerge.EmbeddedXMLObject
public class EmbeddedXMLObject
This class represents those embedded objects in an OpenOffice.org document that have an XML representation. Currently, according to the OpenOffice.org File Format 1.0 document, there are 6 such objects: Formulae created with Math (application/vnd.sun.xml.math) Charts created with Chart (application/vnd.sun.xml.chart) Spreadsheets created with Calc (application/vnd.sun.xml.calc) Text created with Writer (application/vnd.sun.xml.writer) Drawings created with Draw (application/vnd.sun.xml.draw) Presentations created with Impress (application/vnd.sun.xml.impress) These object types are stored using a combination of content, settings and styles XML files.
Field Summary | |
---|---|
private javax.xml.parsers.DocumentBuilder |
builder
|
protected org.w3c.dom.Document |
contentDOM
|
protected org.w3c.dom.Document |
settingsDOM
|
protected org.w3c.dom.Document |
stylesDOM
|
Fields inherited from class writer2latex.xmerge.EmbeddedObject |
---|
hasChanged, objName, objType, zipFile |
Constructor Summary | |
---|---|
EmbeddedXMLObject(java.lang.String name,
java.lang.String type)
Constructor for an embedded object stored using an XML representation. |
|
EmbeddedXMLObject(java.lang.String name,
java.lang.String type,
OfficeZip source)
Package private constructor for use when reading an object from a compressed SX? |
Method Summary | |
---|---|
org.w3c.dom.Document |
getContentDOM()
Returns the content data for this embedded object. |
private org.w3c.dom.Document |
getNamedDOM(java.lang.String name)
This method extracts the data for the given XML file from the SX? |
org.w3c.dom.Document |
getSettingsDOM()
Returns the settings data for this embedded object. |
org.w3c.dom.Document |
getStylesDOM()
Returns the style data for this embedded object. |
void |
setContentDOM(org.w3c.dom.Document content)
Sets the content data for the embedded object. |
void |
setSettingsDOM(org.w3c.dom.Document settings)
Sets the settings data for the embedded object. |
void |
setStylesDOM(org.w3c.dom.Document styles)
Sets the styles data for the embedded object. |
(package private) void |
write(OfficeZip zip)
Package private method for writing the data of the EmbeddedObject to a SX? |
(package private) void |
writeManifestData(org.w3c.dom.Document manifestDoc)
Package private method that constructs the manifest.xml entries for this embedded object. |
Methods inherited from class writer2latex.xmerge.EmbeddedObject |
---|
getName, getType |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected org.w3c.dom.Document contentDOM
protected org.w3c.dom.Document settingsDOM
protected org.w3c.dom.Document stylesDOM
private javax.xml.parsers.DocumentBuilder builder
Constructor Detail |
---|
public EmbeddedXMLObject(java.lang.String name, java.lang.String type)
name
- The name of the object.type
- The mime-type of the object. See the class summary.EmbeddedXMLObject(java.lang.String name, java.lang.String type, OfficeZip source)
name
- The name of the object.type
- The mime-type of the object. See the class summary.source
- The OfficeZip representation of the SX? file that stores
the object.Method Detail |
---|
public org.w3c.dom.Document getContentDOM() throws org.xml.sax.SAXException, java.io.IOException
org.xml.sax.SAXException
- If any parser error occurs
java.io.IOException
- If any IO error occurspublic void setContentDOM(org.w3c.dom.Document content)
content
- DOM representation of the object's content.public org.w3c.dom.Document getSettingsDOM() throws org.xml.sax.SAXException, java.io.IOException
org.xml.sax.SAXException
- If any parser error occurs
java.io.IOException
- If any IO error occurspublic void setSettingsDOM(org.w3c.dom.Document settings)
styles
- DOM representation of the object's styles.public org.w3c.dom.Document getStylesDOM() throws org.xml.sax.SAXException, java.io.IOException
org.xml.sax.SAXException
- If any parser error occurs
java.io.IOException
- If any IO error occurspublic void setStylesDOM(org.w3c.dom.Document styles)
styles
- DOM representation of the object's styles.private org.w3c.dom.Document getNamedDOM(java.lang.String name) throws org.xml.sax.SAXException, java.io.IOException
name
- The name of the XML file to retrieve. It is paired with
the object name to access the SX? file.
org.xml.sax.SAXException
- If any parser error occurs
java.io.IOException
- If any IO error occursvoid write(OfficeZip zip) throws java.io.IOException
write
in class EmbeddedObject
zip
- An OfficeZip
instance representing the file
the data is to be written to.
java.io.IOException
void writeManifestData(org.w3c.dom.Document manifestDoc) throws org.w3c.dom.DOMException
writeManifestData
in class EmbeddedObject
manifestDoc
- Document
containing the manifest entries.
org.w3c.dom.DOMException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |