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

An implementation of. More...

Inheritance diagram for org.openoffice.xmerge.converter.dom.DOMDocument:
[legend]
Collaboration diagram for org.openoffice.xmerge.converter.dom.DOMDocument:
[legend]

Public Member Functions

 DOMDocument (String name, String ext)
 Default constructor. More...
 
Document getContentDOM ()
 Return a DOM. More...
 
void setContentDOM (Node newDom)
 Sets the Content of the. More...
 
String getName ()
 Return the name of the. More...
 
String getFileName ()
 Return the file name of the. More...
 
void read (InputStream is) throws IOException
 Read the Office. More...
 
void write (OutputStream os) throws IOException
 Write out content to the supplied. More...
 

Private Member Functions

String getFileExtension ()
 Returns the file extension of the. More...
 
 DOMDocument (String name, String ext, boolean namespaceAware, boolean validating)
 Constructor with arguments to set. More...
 
String trimDocumentName (String name)
 Removes the file extension from the. More...
 
byte[] docToBytes (Document doc) throws IOException
 Write out a. More...
 

Private Attributes

Document contentDoc = null
 DOM. More...
 
String documentName = null
 
String fileName = null
 
String fileExt = null
 

Static Private Attributes

static DocumentBuilderFactory factory
 Factory for. More...
 

Detailed Description

An implementation of.

for StarOffice documents.

Definition at line 43 of file DOMDocument.java.

Constructor & Destructor Documentation

org.openoffice.xmerge.converter.dom.DOMDocument.DOMDocument ( String  name,
String  ext 
)
inline

Default constructor.

Parameters
name

Definition at line 63 of file DOMDocument.java.

org.openoffice.xmerge.converter.dom.DOMDocument.DOMDocument ( String  name,
String  ext,
boolean  namespaceAware,
boolean  validating 
)
inlineprivate

Constructor with arguments to set.

namespaceAware

and

validating

flags.

Parameters
name

Definition at line 86 of file DOMDocument.java.

References org.openoffice.xmerge.converter.dom.DOMDocument.getFileExtension(), and org.openoffice.xmerge.converter.dom.DOMDocument.trimDocumentName().

Member Function Documentation

byte [] org.openoffice.xmerge.converter.dom.DOMDocument.docToBytes ( Document  doc) throws IOException
inlineprivate

Write out a.

org.w3c.dom.Document

object into a

array.

TODO: remove dependency on

com.sun.xml.tree.XmlDocument

package!

Parameters
docDOM object.
Returns
array of DOM object.
Exceptions
IOExceptionIf any I/O error occurs.

Definition at line 209 of file DOMDocument.java.

References con, Exception, java, Object, result, String, and System.

Referenced by org.openoffice.xmerge.converter.dom.DOMDocument.write().

Document org.openoffice.xmerge.converter.dom.DOMDocument.getContentDOM ( )
inline

Return a DOM.

object of the document content file.

Note that a content DOM is not created when the constructor is called. So, either the

method or the

initContentDOM

method will need to be called ahead on this object before calling this method.

Returns
DOM object.

Definition at line 127 of file DOMDocument.java.

References org.openoffice.xmerge.converter.dom.DOMDocument.contentDoc, and Document.

Referenced by org.openoffice.xmerge.converter.xml.xslt.DocumentDeserializerImpl.deserialize().

String org.openoffice.xmerge.converter.dom.DOMDocument.getFileExtension ( )
inlineprivate

Returns the file extension of the.

represented.

Returns
file extension of the .

Definition at line 72 of file DOMDocument.java.

References org.openoffice.xmerge.converter.dom.DOMDocument.fileExt, and String.

Referenced by org.openoffice.xmerge.converter.dom.DOMDocument.DOMDocument(), and org.openoffice.xmerge.converter.dom.DOMDocument.trimDocumentName().

String org.openoffice.xmerge.converter.dom.DOMDocument.getFileName ( )
inline

Return the file name of the.

, possibly with the standard extension.

Returns
The file name of .

Implements org.openoffice.xmerge.Document.

Definition at line 158 of file DOMDocument.java.

References org.openoffice.xmerge.converter.dom.DOMDocument.fileName, and String.

String org.openoffice.xmerge.converter.dom.DOMDocument.getName ( )
inline

Return the name of the.

.

Returns
The name of .

Implements org.openoffice.xmerge.Document.

Definition at line 147 of file DOMDocument.java.

References org.openoffice.xmerge.converter.dom.DOMDocument.documentName, and String.

void org.openoffice.xmerge.converter.dom.DOMDocument.read ( InputStream  is) throws IOException
inline

Read the Office.

from the specified

InputStream

.

Parameters
isOffice document
InputStream
.
Exceptions
IOExceptionIf any I/O error occurs.

Implements org.openoffice.xmerge.Document.

Definition at line 170 of file DOMDocument.java.

References org.openoffice.xmerge.util.Debug.INFO, org.openoffice.xmerge.util.Debug.log(), and System.

Referenced by org.openoffice.xmerge.converter.xml.xslt.PluginFactoryImpl.createDeviceDocument().

void org.openoffice.xmerge.converter.dom.DOMDocument.setContentDOM ( Node  newDom)
inline

Sets the Content of the.

to the contents of the supplied

list.

Parameters
newDomDOM object.

Definition at line 138 of file DOMDocument.java.

References Document.

String org.openoffice.xmerge.converter.dom.DOMDocument.trimDocumentName ( String  name)
inlineprivate

Removes the file extension from the.

name.

Parameters
nameFull name with extension.
Returns
Name of without the extension.

Definition at line 103 of file DOMDocument.java.

References org.openoffice.xmerge.converter.dom.DOMDocument.getFileExtension(), and String.

Referenced by org.openoffice.xmerge.converter.dom.DOMDocument.DOMDocument().

void org.openoffice.xmerge.converter.dom.DOMDocument.write ( OutputStream  os) throws IOException
inline

Write out content to the supplied.

OutputStream

.

Parameters
osXML
OutputStream
.
Exceptions
IOExceptionIf any I/O error occurs.

Implements org.openoffice.xmerge.Document.

Definition at line 189 of file DOMDocument.java.

References org.openoffice.xmerge.converter.dom.DOMDocument.docToBytes().

Member Data Documentation

Document org.openoffice.xmerge.converter.dom.DOMDocument.contentDoc = null
private

DOM.

of content.xml.

Definition at line 51 of file DOMDocument.java.

Referenced by org.openoffice.xmerge.converter.dom.DOMDocument.getContentDOM().

String org.openoffice.xmerge.converter.dom.DOMDocument.documentName = null
private
DocumentBuilderFactory org.openoffice.xmerge.converter.dom.DOMDocument.factory
staticprivate
Initial value:
=
DocumentBuilderFactory.newInstance()

Factory for.

DocumentBuilder

objects.

Definition at line 47 of file DOMDocument.java.

String org.openoffice.xmerge.converter.dom.DOMDocument.fileExt = null
private
String org.openoffice.xmerge.converter.dom.DOMDocument.fileName = null
private

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