LibreOffice Module xmerge (master) 1
|
An implementation of Document
for StarOffice documents.
More...
Public Member Functions | |
DOMDocument (String name, String ext) | |
Default constructor. More... | |
Document | getContentDOM () |
Return a DOM Document object of the document content file. More... | |
void | setContentDOM (Node newDom) |
Sets the Content of the Document to the contents of the supplied Node list. More... | |
String | getName () |
Return the name of the Document . More... | |
String | getFileName () |
Return the file name of the Document , possibly with the standard extension. More... | |
void | read (InputStream is) throws IOException |
Read the Office Document from the specified InputStream . More... | |
void | write (OutputStream os) throws IOException |
Write out content to the supplied OutputStream . More... | |
void | write (OutputStream os) throws IOException |
Writes out the Document content to the specified OutputStream . More... | |
void | read (InputStream is) throws IOException |
Reads the content from the InputStream into the Document . More... | |
String | getName () |
Returns the Document name with no file extension. More... | |
String | getFileName () |
Returns the Document name with file extension. More... | |
Private Member Functions | |
String | getFileExtension () |
Returns the file extension of the Document represented. More... | |
DOMDocument (String name, String ext, boolean namespaceAware, boolean validating) | |
Constructor with arguments to set namespaceAware and validating flags. More... | |
String | trimDocumentName (String name) |
Removes the file extension from the Document name. More... | |
byte[] | docToBytes (Document doc) throws IOException |
Write out a org.w3c.dom.Document object into a byte array. More... | |
Private Attributes | |
Document | contentDoc = null |
DOM Document of content.xml. More... | |
String | documentName = null |
String | fileName = null |
String | fileExt = null |
Static Private Attributes | |
static DocumentBuilderFactory | factory |
Factory for DocumentBuilder objects. More... | |
An implementation of Document
for StarOffice documents.
Definition at line 43 of file DOMDocument.java.
|
inline |
Default constructor.
name | Document name. |
ext | Document extension. |
Definition at line 63 of file DOMDocument.java.
References name.
|
inlineprivate |
Constructor with arguments to set namespaceAware
and validating
flags.
name | Document name (may or may not contain extension). |
ext | Document extension. |
namespaceAware | Value for namespaceAware flag. |
validating | Value for validating flag. |
Definition at line 86 of file DOMDocument.java.
References org.openoffice.xmerge.converter.dom.DOMDocument.documentName, org.openoffice.xmerge.converter.dom.DOMDocument.factory, org.openoffice.xmerge.converter.dom.DOMDocument.getFileExtension(), name, and org.openoffice.xmerge.converter.dom.DOMDocument.trimDocumentName().
|
inlineprivate |
Write out a org.w3c.dom.Document
object into a byte
array.
TODO: remove dependency on com.sun.xml.tree.XmlDocument
package!
doc | DOM Document object. |
byte
array of DOM Document
object.IOException | If any I/O error occurs. |
Definition at line 209 of file DOMDocument.java.
References Class, con, Exception, Object, result, String, and System.
Referenced by org.openoffice.xmerge.converter.dom.DOMDocument.write().
|
inline |
Return a DOM Document
object of the document content 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. 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().
|
inlineprivate |
Returns the file extension of the Document
represented.
Document
. 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().
|
inline |
Return the file name of the Document
, possibly with the standard extension.
Document
. Implements org.openoffice.xmerge.Document.
Definition at line 158 of file DOMDocument.java.
References org.openoffice.xmerge.converter.dom.DOMDocument.fileName, and String.
|
inline |
Return the name of the Document
.
Document
. Implements org.openoffice.xmerge.Document.
Definition at line 147 of file DOMDocument.java.
References org.openoffice.xmerge.converter.dom.DOMDocument.documentName, and String.
|
inline |
Read the Office Document
from the specified InputStream
.
is | Office document InputStream . |
IOException | If any I/O error occurs. |
Implements org.openoffice.xmerge.Document.
Definition at line 170 of file DOMDocument.java.
References org.openoffice.xmerge.converter.dom.DOMDocument.contentDoc, ex, org.openoffice.xmerge.converter.dom.DOMDocument.factory, org.openoffice.xmerge.util.Debug.INFO, org.openoffice.xmerge.util.Debug.log(), and System.
Referenced by org.openoffice.xmerge.converter.xml.xslt.PluginFactoryImpl.createDeviceDocument().
|
inline |
Sets the Content of the Document
to the contents of the supplied Node
list.
newDom | DOM Document object. |
Definition at line 138 of file DOMDocument.java.
References org.openoffice.xmerge.converter.dom.DOMDocument.contentDoc, and Document.
|
inlineprivate |
Removes the file extension from the Document
name.
name | Full Document name with extension. |
Document
without the extension. Definition at line 103 of file DOMDocument.java.
References org.openoffice.xmerge.converter.dom.DOMDocument.getFileExtension(), name, and String.
Referenced by org.openoffice.xmerge.converter.dom.DOMDocument.DOMDocument().
|
inline |
Write out content to the supplied OutputStream
.
os | XML OutputStream . |
IOException | If 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.contentDoc, and org.openoffice.xmerge.converter.dom.DOMDocument.docToBytes().
|
private |
DOM Document
of content.xml.
Definition at line 51 of file DOMDocument.java.
Referenced by org.openoffice.xmerge.converter.dom.DOMDocument.getContentDOM(), org.openoffice.xmerge.converter.dom.DOMDocument.read(), org.openoffice.xmerge.converter.dom.DOMDocument.setContentDOM(), and org.openoffice.xmerge.converter.dom.DOMDocument.write().
|
private |
Definition at line 53 of file DOMDocument.java.
Referenced by org.openoffice.xmerge.converter.dom.DOMDocument.DOMDocument(), and org.openoffice.xmerge.converter.dom.DOMDocument.getName().
|
staticprivate |
Factory for DocumentBuilder
objects.
Definition at line 47 of file DOMDocument.java.
Referenced by org.openoffice.xmerge.converter.dom.DOMDocument.DOMDocument(), and org.openoffice.xmerge.converter.dom.DOMDocument.read().
|
private |
Definition at line 55 of file DOMDocument.java.
Referenced by org.openoffice.xmerge.converter.dom.DOMDocument.getFileExtension().
|
private |
Definition at line 54 of file DOMDocument.java.
Referenced by org.openoffice.xmerge.converter.dom.DOMDocument.getFileName().