Package writer2latex.xmerge
Class DOMDocument
java.lang.Object
writer2latex.xmerge.DOMDocument
- All Implemented Interfaces:
OutputFile
,Document
- Direct Known Subclasses:
NewDOMDocument
,XhtmlDocument
An implementation of
Document
for
StarOffice documents.-
Constructor Summary
ConstructorsConstructorDescriptionDOMDocument
(String name, String ext) Default constructor.DOMDocument
(String name, String ext, boolean namespaceAware, boolean validating) Constructor with arguments to setnamespaceAware
andvalidating
flags. -
Method Summary
Modifier and TypeMethodDescriptionReturn a DOMDocument
object of the document content file.protected String
Returns the file extension of theDocument
represented.Return the file name of theDocument
, possibly with the standard extension.getName()
Return the name of theDocument
.final void
Initializes a new DOMDocument
with the content containing minimum XML tags.void
read
(InputStream is) Read the OfficeDocument
from the specifiedInputStream
.void
setContentDOM
(Node newDom) Sets the Content of theDocument
to the contents of the suppliedNode
list.void
write
(OutputStream os) Write out content to the suppliedOutputStream
.
-
Constructor Details
-
DOMDocument
Default constructor.- Parameters:
name
-Document
name.ext
-Document
extension.
-
DOMDocument
Constructor with arguments to setnamespaceAware
andvalidating
flags.- Parameters:
name
-Document
name (may or may not contain extension).ext
-Document
extension.namespaceAware
- Value fornamespaceAware
flag.validating
- Value forvalidating
flag.
-
-
Method Details
-
getFileExtension
Returns the file extension of theDocument
represented.- Returns:
- file extension of the
Document
.
-
getContentDOM
Return a DOMDocument
object of the document content file. Note that a content DOM is not created when the constructor is called. So, either theread
method or theinitContentDOM
method will need to be called ahead on this object before calling this method.- Returns:
- DOM
Document
object.
-
setContentDOM
Sets the Content of theDocument
to the contents of the suppliedNode
list.- Parameters:
newDom
- DOMDocument
object.
-
getName
Return the name of theDocument
. -
getFileName
Return the file name of theDocument
, possibly with the standard extension.- Specified by:
getFileName
in interfaceOutputFile
- Returns:
- The file name of
Document
.
-
read
Read the OfficeDocument
from the specifiedInputStream
.- Specified by:
read
in interfaceDocument
- Parameters:
is
- Office documentInputStream
.- Throws:
IOException
- If any I/O error occurs.
-
write
Write out content to the suppliedOutputStream
.- Specified by:
write
in interfaceOutputFile
- Parameters:
os
- XMLOutputStream
.- Throws:
IOException
- If any I/O error occurs.
-
initContentDOM
Initializes a new DOMDocument
with the content containing minimum XML tags.- Throws:
IOException
- If any I/O error occurs.
-