fmrisc.External
Class NewOMDOMReader

java.lang.Object
  extended by fmrisc.External.NewOMDOMReader

public final class NewOMDOMReader
extends java.lang.Object

An OpenMath DOM reader.

Version:
$Revision: 1.2 $
Author:
Manfred N. Riem (mriem@manorrock.org)

Constructor Summary
NewOMDOMReader(org.w3c.dom.Document document)
          Constructor.
NewOMDOMReader(org.w3c.dom.DocumentFragment fragment)
          Constructor.
NewOMDOMReader(org.xml.sax.InputSource inputSource)
          Constructor.
NewOMDOMReader(org.w3c.dom.Node node)
          Constructor.
NewOMDOMReader(java.lang.String string)
          Constructor.
 
Method Summary
 nl.tue.win.riaca.openmath.lang.OMObject readObject()
          Read an OpenMath object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NewOMDOMReader

public NewOMDOMReader(org.w3c.dom.Document document)
Constructor.

Parameters:
document - the document to read using the reader.

NewOMDOMReader

public NewOMDOMReader(org.w3c.dom.DocumentFragment fragment)
Constructor.

Parameters:
fragment - the document fragment to read using the reader.

NewOMDOMReader

public NewOMDOMReader(org.w3c.dom.Node node)
Constructor.

Parameters:
node - the node to read using the reader.

NewOMDOMReader

public NewOMDOMReader(org.xml.sax.InputSource inputSource)
Constructor.

Parameters:
inputSource - the InputSource to read from using this reader.

NewOMDOMReader

public NewOMDOMReader(java.lang.String string)
Constructor.

Parameters:
string - the string to read from using this reader.
Method Detail

readObject

public nl.tue.win.riaca.openmath.lang.OMObject readObject()
                                                   throws java.io.IOException
Read an OpenMath object.

1. If we are a document then get the nodelist that contains an OMOBJ. Take the first of the list and read that object. 2. Or if we are a document fragment assume the first child is the OMObject. 3. Or just assume the node contains the OMObject.

Returns:
the OpenMath object.
Throws:
java.io.IOException - when a problem arises while reading.