jigcell.sbml2.math
Class Node

java.lang.Object
  extended by jigcell.sbml2.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.

Author:
Marc Vass

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

Field Detail

children

protected java.util.List children

attributes

protected org.xml.sax.Attributes attributes

parent

protected Node parent

localName

protected java.lang.String localName

qName

protected java.lang.String qName

uri

protected java.lang.String uri

value

protected java.lang.StringBuffer value
Constructor Detail

Node

public Node(Node oldNode)

Node

public Node(Node oldNode,
            java.lang.String value,
            Node[] children)

Node

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

Node

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

Node

public Node(java.lang.String qName,
            java.lang.String value,
            Node[] children)

Node

public Node(java.lang.String qName,
            java.lang.String value,
            Node child1,
            Node child2)

Node

public Node(java.lang.String qName,
            java.lang.String value,
            Node child)

Node

public Node(java.lang.String qName,
            java.lang.String value)

Node

public Node()
Method Detail

getAttributes

public org.xml.sax.Attributes getAttributes()

getChild

public Node getChild(int index)

getChildren

public Node[] getChildren()

getListOfChildren

public java.util.List getListOfChildren()

getLocalName

public java.lang.String getLocalName()

getNumChildren

public int getNumChildren()

getParent

public Node getParent()

getQName

public java.lang.String getQName()

getSimpleName

public java.lang.String getSimpleName()

getUri

public java.lang.String getUri()

getValue

public java.lang.String getValue()

addChild

protected void addChild(Node child)

appendToValue

protected void appendToValue(java.lang.String s)

removeAllChildren

protected void removeAllChildren()

removeChild

protected Node removeChild(int index)

setAttributes

protected void setAttributes(org.xml.sax.Attributes attributes)

setLocalName

protected void setLocalName(java.lang.String localName)

setParent

protected void setParent(Node parent)

setQName

protected void setQName(java.lang.String qName)

setUri

protected void setUri(java.lang.String uri)

setValue

protected void setValue(java.lang.String value)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toString

private java.lang.String toString(java.lang.String indent)