org.jscience.ml.openmath.io
Class OMDOMWriter

java.lang.Object
  extended by org.jscience.ml.openmath.io.OMDOMWriter

public class OMDOMWriter
extends java.lang.Object

An OMDOMWriter.


Field Summary
protected  org.w3c.dom.Document document
          Stores the document reference we use to create elements.
protected  java.lang.String prefix
          Stores the namespace prefix.
 
Constructor Summary
OMDOMWriter()
          Constructor.
 
Method Summary
 java.lang.String getNamespacePrefix()
          Get the namespace prefix.
 void setNamespacePrefix(java.lang.String newPrefix)
          Set the namespace prefix.
 org.w3c.dom.Document write(OMObject object)
          Write out a DOM document.
 org.w3c.dom.Node writeNode(OMObject object)
          Write out a DOM document node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

prefix

protected java.lang.String prefix
Stores the namespace prefix.


document

protected org.w3c.dom.Document document
Stores the document reference we use to create elements.

Constructor Detail

OMDOMWriter

public OMDOMWriter()
Constructor.

Method Detail

setNamespacePrefix

public void setNamespacePrefix(java.lang.String newPrefix)
Set the namespace prefix.

Parameters:
newPrefix - the namespace prefix to generate.

getNamespacePrefix

public java.lang.String getNamespacePrefix()
Get the namespace prefix.

Returns:
the namespace prefix.

write

public org.w3c.dom.Document write(OMObject object)
                           throws java.io.IOException
Write out a DOM document.

Parameters:
object - the object to write out.
Returns:
the generated DOM document.
Throws:
java.io.IOException - when a serious error occurs.

writeNode

public org.w3c.dom.Node writeNode(OMObject object)
                           throws java.io.IOException
Write out a DOM document node.

Parameters:
object - the object to write out.
Returns:
the generated DOM node.
Throws:
java.io.IOException - when a serious error occurs.