writer2latex.xmerge
Class DOMDocument
java.lang.Objectwriter2latex.xmerge.DOMDocument
- Document, OutputFile
public class DOMDocument
extends java.lang.Object
An implementation of Document for
StarOffice documents.
DOMDocument(String name, String ext)- Default constructor.
|
DOMDocument(String name, String ext, boolean namespaceAware, boolean validating)- Constructor with arguments to set
namespaceAware
and validating flags.
|
Document | getContentDOM()- Return a DOM
Document object of the document content
file.
|
protected String | getFileExtension()- Returns the file extension of the
Document
represented.
|
String | getFileName()- Return the file name of the
Document, possibly
with the standard extension.
|
String | getName()- Return the name of the
Document.
|
void | initContentDOM()- Initializes a new DOM
Document with the content
containing minimum XML tags.
|
void | read(InputStream is)- Read the Office
Document from the specified
InputStream.
|
void | setContentDOM(Node newDom)- Sets the Content of the
Document to the contents of the
supplied Node list.
|
void | write(OutputStream os)- Write out content to the supplied
OutputStream.
|
DOMDocument
public DOMDocument(String name,
String ext) Default constructor.
name - Document name.ext - Document extension.
DOMDocument
public DOMDocument(String name,
String ext,
boolean namespaceAware,
boolean validating) 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.
getContentDOM
public Document getContentDOM()
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.
getFileExtension
protected String getFileExtension()
Returns the file extension of the Document
represented.
- file extension of the
Document.
getFileName
public String getFileName()
Return the file name of the Document, possibly
with the standard extension.
- getFileName in interface OutputFile
- The file name of
Document.
getName
public String getName()
Return the name of the Document.
- getName in interface Document
initContentDOM
public final void initContentDOM()
throws IOException Initializes a new DOM Document with the content
containing minimum XML tags.
read
public void read(InputStream is)
throws IOException Read the Office Document from the specified
InputStream.
- read in interface Document
is - Office document InputStream.
setContentDOM
public void setContentDOM(Node newDom)
Sets the Content of the Document to the contents of the
supplied Node list.
newDom - DOM Document object.
write
public void write(OutputStream os)
throws IOException Write out content to the supplied OutputStream.
- write in interface OutputFile