org.jscience.ml.sbml.math
Class Node

java.lang.Object
  extended by org.jscience.ml.sbml.math.Node

public class Node
extends java.lang.Object

Represents a node in a parse tree based on XML (in particular MathML). Node is publicly a non-mutable class. Therefore, it is safe to give many Objects a references to the same Node. This code is licensed under the DARPA BioCOMP Open Source License. See LICENSE for more details.


Field Summary
protected  org.xml.sax.Attributes attributes
          DOCUMENT ME!
protected  java.util.ArrayList children
          DOCUMENT ME!
protected  java.lang.String localName
          DOCUMENT ME!
protected  Node parent
          DOCUMENT ME!
protected  java.lang.String qName
          DOCUMENT ME!
protected  java.lang.String uri
          DOCUMENT ME!
protected  java.lang.StringBuffer value
          DOCUMENT ME!
 
Constructor Summary
Node()
          Creates a new Node object.
Node(Node oldNode)
          Creates a new Node object.
Node(Node parent, java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes)
          Creates a new Node object.
Node(java.lang.String qName, java.lang.String value)
          Creates a new Node object.
Node(java.lang.String qName, java.lang.String value, Node child)
          Creates a new Node object.
Node(java.lang.String qName, java.lang.String value, Node[] children)
          Creates a new Node object.
Node(java.lang.String qName, java.lang.String value, Node child1, Node child2)
          Creates a new Node object.
Node(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes)
          Creates a new Node object.
 
Method Summary
protected  void addChild(Node child)
          DOCUMENT ME!
protected  void appendToValue(java.lang.String s)
          DOCUMENT ME!
 org.xml.sax.Attributes getAttributes()
          DOCUMENT ME!
 Node getChild(int index)
          DOCUMENT ME!
 Node[] getChildren()
          DOCUMENT ME!
 java.lang.String getLocalName()
          DOCUMENT ME!
 int getNumChildren()
          DOCUMENT ME!
 Node getParent()
          DOCUMENT ME!
 java.lang.String getQName()
          DOCUMENT ME!
 java.lang.String getSimpleName()
          DOCUMENT ME!
 java.lang.String getUri()
          DOCUMENT ME!
 java.lang.String getValue()
          DOCUMENT ME!
protected  void removeAllChildren()
          DOCUMENT ME!
protected  Node removeChild(int index)
          DOCUMENT ME!
protected  void setAttributes(org.xml.sax.Attributes attributes)
          DOCUMENT ME!
protected  void setLocalName(java.lang.String localName)
          DOCUMENT ME!
protected  void setParent(Node parent)
          DOCUMENT ME!
protected  void setQName(java.lang.String qName)
          DOCUMENT ME!
protected  void setUri(java.lang.String uri)
          DOCUMENT ME!
protected  void setValue(java.lang.String value)
          DOCUMENT ME!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

children

protected java.util.ArrayList children
DOCUMENT ME!


attributes

protected org.xml.sax.Attributes attributes
DOCUMENT ME!


parent

protected Node parent
DOCUMENT ME!


localName

protected java.lang.String localName
DOCUMENT ME!


qName

protected java.lang.String qName
DOCUMENT ME!


uri

protected java.lang.String uri
DOCUMENT ME!


value

protected java.lang.StringBuffer value
DOCUMENT ME!

Constructor Detail

Node

public Node(Node oldNode)
Creates a new Node object.

Parameters:
oldNode - DOCUMENT ME!

Node

public Node(Node parent,
            java.lang.String uri,
            java.lang.String localName,
            java.lang.String qName,
            org.xml.sax.Attributes attributes)
Creates a new Node object.

Parameters:
parent - DOCUMENT ME!
uri - DOCUMENT ME!
localName - DOCUMENT ME!
qName - DOCUMENT ME!
attributes - DOCUMENT ME!

Node

public Node(java.lang.String uri,
            java.lang.String localName,
            java.lang.String qName,
            org.xml.sax.Attributes attributes)
Creates a new Node object.

Parameters:
uri - DOCUMENT ME!
localName - DOCUMENT ME!
qName - DOCUMENT ME!
attributes - DOCUMENT ME!

Node

public Node(java.lang.String qName,
            java.lang.String value,
            Node[] children)
Creates a new Node object.

Parameters:
qName - DOCUMENT ME!
value - DOCUMENT ME!
children - DOCUMENT ME!

Node

public Node(java.lang.String qName,
            java.lang.String value,
            Node child1,
            Node child2)
Creates a new Node object.

Parameters:
qName - DOCUMENT ME!
value - DOCUMENT ME!
child1 - DOCUMENT ME!
child2 - DOCUMENT ME!

Node

public Node(java.lang.String qName,
            java.lang.String value,
            Node child)
Creates a new Node object.

Parameters:
qName - DOCUMENT ME!
value - DOCUMENT ME!
child - DOCUMENT ME!

Node

public Node(java.lang.String qName,
            java.lang.String value)
Creates a new Node object.

Parameters:
qName - DOCUMENT ME!
value - DOCUMENT ME!

Node

public Node()
Creates a new Node object.

Method Detail

getAttributes

public org.xml.sax.Attributes getAttributes()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getChild

public Node getChild(int index)
DOCUMENT ME!

Parameters:
index - DOCUMENT ME!
Returns:
DOCUMENT ME!

getChildren

public Node[] getChildren()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getLocalName

public java.lang.String getLocalName()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getNumChildren

public int getNumChildren()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getParent

public Node getParent()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getQName

public java.lang.String getQName()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getSimpleName

public java.lang.String getSimpleName()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getUri

public java.lang.String getUri()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getValue

public java.lang.String getValue()
DOCUMENT ME!

Returns:
DOCUMENT ME!

addChild

protected void addChild(Node child)
DOCUMENT ME!

Parameters:
child - DOCUMENT ME!

appendToValue

protected void appendToValue(java.lang.String s)
DOCUMENT ME!

Parameters:
s - DOCUMENT ME!

removeAllChildren

protected void removeAllChildren()
DOCUMENT ME!


removeChild

protected Node removeChild(int index)
DOCUMENT ME!

Parameters:
index - DOCUMENT ME!
Returns:
DOCUMENT ME!

setAttributes

protected void setAttributes(org.xml.sax.Attributes attributes)
DOCUMENT ME!

Parameters:
attributes - DOCUMENT ME!

setLocalName

protected void setLocalName(java.lang.String localName)
DOCUMENT ME!

Parameters:
localName - DOCUMENT ME!

setParent

protected void setParent(Node parent)
DOCUMENT ME!

Parameters:
parent - DOCUMENT ME!

setQName

protected void setQName(java.lang.String qName)
DOCUMENT ME!

Parameters:
qName - DOCUMENT ME!

setUri

protected void setUri(java.lang.String uri)
DOCUMENT ME!

Parameters:
uri - DOCUMENT ME!

setValue

protected void setValue(java.lang.String value)
DOCUMENT ME!

Parameters:
value - DOCUMENT ME!