|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jscience.ml.openmath.io.OMDOMReader
public class OMDOMReader
An OpenMath DOM reader.
Field Summary | |
---|---|
protected org.xml.sax.InputSource |
mInputSource
Stores the input-source if we use one. |
protected org.w3c.dom.Node |
mNode
Stores the node we want to read the OMObject from. |
protected static java.lang.String[] |
sOMObjects
Stores a static array with all the OpenMath element-names in use. |
Constructor Summary | |
---|---|
OMDOMReader(org.w3c.dom.Document document)
Constructor. |
|
OMDOMReader(org.w3c.dom.DocumentFragment fragment)
Constructor. |
|
OMDOMReader(org.xml.sax.InputSource inputSource)
Constructor. |
|
OMDOMReader(org.w3c.dom.Node node)
Constructor. |
|
OMDOMReader(java.lang.String string)
Constructor. |
Method Summary | |
---|---|
OMObject |
readObject()
Read an OpenMath object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static java.lang.String[] sOMObjects
protected org.xml.sax.InputSource mInputSource
protected org.w3c.dom.Node mNode
Constructor Detail |
---|
public OMDOMReader(org.w3c.dom.Document document)
document
- the document to read using the reader.public OMDOMReader(org.w3c.dom.DocumentFragment fragment)
fragment
- the document fragment to read using the reader.public OMDOMReader(org.w3c.dom.Node node)
node
- the node to read using the reader.public OMDOMReader(org.xml.sax.InputSource inputSource)
inputSource
- the InputSource to read from using this reader.public OMDOMReader(java.lang.String string)
string
- the string to read from using this reader.Method Detail |
---|
public OMObject readObject() throws java.io.IOException
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.
java.io.IOException
- when a problem arises while reading.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |