LibreOffice Module xmerge (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
org.openoffice.xmerge.converter.xml.EmbeddedXMLObject Class Reference

This class represents those embedded objects in an OpenOffice.org document that have an XML representation. More...

Inheritance diagram for org.openoffice.xmerge.converter.xml.EmbeddedXMLObject:
[legend]
Collaboration diagram for org.openoffice.xmerge.converter.xml.EmbeddedXMLObject:
[legend]

Public Member Functions

 EmbeddedXMLObject (String name, String type)
 Constructor for an embedded object stored using an XML representation. More...
 
Document getContentDOM () throws SAXException, IOException
 Returns the content data for this embedded object. More...
 
void setContentDOM (Document content)
 Sets the content data for the embedded object. More...
 
Document getSettingsDOM () throws SAXException, IOException
 Returns the settings data for this embedded object. More...
 
void setSettingsDOM (Document settings)
 Sets the settings data for the embedded object. More...
 
Document getStylesDOM () throws SAXException, IOException
 Returns the style data for this embedded object. More...
 
void setStylesDOM (Document styles)
 Sets the styles data for the embedded object. More...
 
- Public Member Functions inherited from org.openoffice.xmerge.converter.xml.EmbeddedObject
 EmbeddedObject (String name, String type)
 Constructor for an embedded object stored using an XML representation. More...
 
final String getName ()
 Retrieves the name of the embedded object represented by an instance of this class. More...
 
final String getType ()
 Retrieves the type of the embedded object represented by an instance of this class. More...
 

Private Member Functions

Document getNamedDOM (String name) throws SAXException, IOException
 This method extracts the data for the given XML file from the SX? file and creates a DOM representation of it. More...
 

Private Attributes

Document contentDOM = null
 
Document settingsDOM = null
 
Document stylesDOM = null
 
DocumentBuilder builder = null
 

Additional Inherited Members

- Protected Attributes inherited from org.openoffice.xmerge.converter.xml.EmbeddedObject
String objName
 
String objType
 
OfficeZip zipFile = null
 Representation of the file from which this object was read. More...
 
boolean hasChanged = false
 Flag indicating if this document has changed since reading or is new. More...
 

Detailed Description

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:

DescriptionObject
Formula created with Mathapplication/vnd.sun.xml.math
Charts created with Chartapplication/vnd.sun.xml.chart
Spreadsheets created with Calc application/vnd.sun.xml.calc
Text created with Writerapplication/vnd.sun.xml.writer
Drawings created with Drawapplication/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.

Definition at line 63 of file EmbeddedXMLObject.java.

Constructor & Destructor Documentation

◆ EmbeddedXMLObject()

org.openoffice.xmerge.converter.xml.EmbeddedXMLObject.EmbeddedXMLObject ( String  name,
String  type 
)
inline

Constructor for an embedded object stored using an XML representation.

Parameters
nameThe name of the object.
typeThe mime-type of the object. See the class summary.

Definition at line 78 of file EmbeddedXMLObject.java.

References name, and type.

Member Function Documentation

◆ getContentDOM()

Document org.openoffice.xmerge.converter.xml.EmbeddedXMLObject.getContentDOM ( ) throws SAXException, IOException
inline

Returns the content data for this embedded object.

Returns
DOM representation of "content.xml".
Exceptions
SAXExceptionIf any parser error occurs.
IOExceptionIf any IO error occurs.

Definition at line 103 of file EmbeddedXMLObject.java.

References org.openoffice.xmerge.converter.xml.EmbeddedXMLObject.contentDOM, Document, and org.openoffice.xmerge.converter.xml.EmbeddedXMLObject.getNamedDOM().

◆ getNamedDOM()

Document org.openoffice.xmerge.converter.xml.EmbeddedXMLObject.getNamedDOM ( String  name) throws SAXException, IOException
inlineprivate

This method extracts the data for the given XML file from the SX? file and creates a DOM representation of it.

Parameters
nameThe name of the XML file to retrieve. It is paired with the object name to access the SX? file.
Returns
DOM representation of the named XML file.
Exceptions
SAXExceptionIf any parser error occurs.
IOExceptionIf any IO error occurs.

Definition at line 188 of file EmbeddedXMLObject.java.

References org.openoffice.xmerge.converter.xml.EmbeddedXMLObject.builder, Document, name, org.openoffice.xmerge.converter.xml.EmbeddedObject.objName, and org.openoffice.xmerge.converter.xml.EmbeddedObject.zipFile.

Referenced by org.openoffice.xmerge.converter.xml.EmbeddedXMLObject.getContentDOM(), org.openoffice.xmerge.converter.xml.EmbeddedXMLObject.getSettingsDOM(), and org.openoffice.xmerge.converter.xml.EmbeddedXMLObject.getStylesDOM().

◆ getSettingsDOM()

Document org.openoffice.xmerge.converter.xml.EmbeddedXMLObject.getSettingsDOM ( ) throws SAXException, IOException
inline

Returns the settings data for this embedded object.

Returns
DOM representation of "settings.xml"
Exceptions
SAXExceptionIf any parser error occurs.
IOExceptionIf any IO error occurs.

Definition at line 130 of file EmbeddedXMLObject.java.

References Document, org.openoffice.xmerge.converter.xml.EmbeddedXMLObject.getNamedDOM(), and org.openoffice.xmerge.converter.xml.EmbeddedXMLObject.settingsDOM.

◆ getStylesDOM()

Document org.openoffice.xmerge.converter.xml.EmbeddedXMLObject.getStylesDOM ( ) throws SAXException, IOException
inline

Returns the style data for this embedded object.

Returns
DOM representation of "styles.xml".
Exceptions
SAXExceptionIf any parser error occurs.
IOExceptionIf any IO error occurs.

Definition at line 157 of file EmbeddedXMLObject.java.

References Document, org.openoffice.xmerge.converter.xml.EmbeddedXMLObject.getNamedDOM(), and org.openoffice.xmerge.converter.xml.EmbeddedXMLObject.stylesDOM.

◆ setContentDOM()

void org.openoffice.xmerge.converter.xml.EmbeddedXMLObject.setContentDOM ( Document  content)
inline

Sets the content data for the embedded object.

Parameters
contentDOM representation of the object's content.

Definition at line 117 of file EmbeddedXMLObject.java.

References org.openoffice.xmerge.converter.xml.EmbeddedXMLObject.contentDOM, and org.openoffice.xmerge.converter.xml.EmbeddedObject.hasChanged.

◆ setSettingsDOM()

void org.openoffice.xmerge.converter.xml.EmbeddedXMLObject.setSettingsDOM ( Document  settings)
inline

Sets the settings data for the embedded object.

Parameters
settingsDOM representation of the object's styles.

Definition at line 144 of file EmbeddedXMLObject.java.

References org.openoffice.xmerge.converter.xml.EmbeddedObject.hasChanged, and org.openoffice.xmerge.converter.xml.EmbeddedXMLObject.settingsDOM.

◆ setStylesDOM()

void org.openoffice.xmerge.converter.xml.EmbeddedXMLObject.setStylesDOM ( Document  styles)
inline

Sets the styles data for the embedded object.

Parameters
stylesDOM representation of the object's styles.

Definition at line 171 of file EmbeddedXMLObject.java.

References org.openoffice.xmerge.converter.xml.EmbeddedObject.hasChanged, styles, and org.openoffice.xmerge.converter.xml.EmbeddedXMLObject.stylesDOM.

Member Data Documentation

◆ builder

DocumentBuilder org.openoffice.xmerge.converter.xml.EmbeddedXMLObject.builder = null
private

◆ contentDOM

Document org.openoffice.xmerge.converter.xml.EmbeddedXMLObject.contentDOM = null
private

◆ settingsDOM

Document org.openoffice.xmerge.converter.xml.EmbeddedXMLObject.settingsDOM = null
private

◆ stylesDOM

Document org.openoffice.xmerge.converter.xml.EmbeddedXMLObject.stylesDOM = null
private

The documentation for this class was generated from the following file: