Class OMDOMReader
java.lang.Object
org.episteme.core.mathematics.loaders.openmath.io.OMDOMReader
An OpenMath DOM reader.
- Version:
- $Revision: 1.2 $
- Author:
- Manfred N. Riem (mriem@manorrock.org)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected InputSourceStores the input-source if we use one.protected NodeStores the node we want to read the OMObject from.protected static String[]Stores a static array with all the OpenMath element-names in use. -
Constructor Summary
ConstructorsConstructorDescriptionOMDOMReader(String string) Constructor.OMDOMReader(Document document) Constructor.OMDOMReader(DocumentFragment fragment) Constructor.OMDOMReader(Node node) Constructor.OMDOMReader(InputSource inputSource) Constructor. -
Method Summary
-
Field Details
-
sOMObjects
Stores a static array with all the OpenMath element-names in use. -
mInputSource
Stores the input-source if we use one. -
mNode
Stores the node we want to read the OMObject from.
-
-
Constructor Details
-
OMDOMReader
Constructor.- Parameters:
document- the document to read using the reader.
-
OMDOMReader
Constructor.- Parameters:
fragment- the document fragment to read using the reader.
-
OMDOMReader
-
OMDOMReader
Constructor.- Parameters:
inputSource- the InputSource to read from using this reader.
-
OMDOMReader
Constructor.- Parameters:
string- the string to read from using this reader.
-
-
Method Details
-
readObject
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:
IOException- when a problem arises while reading.
-