edu.umd.cs.fuzzyTree
Class DataNode

java.lang.Object
  |
  +--edu.umd.cs.fuzzyTree.DataNode

class DataNode
extends java.lang.Object

Encapsulates the information that is in a node in an XML document. A node has a label and data. A preorder index is also assigned, which is the value assigned to the node in a preorder traversal of the tree.


Field Summary
private  java.lang.String data
           
 DisplayNode displayNode
          Reference to the display node corresponding to this DataNode.
private  int graphIndex
          Index of this node in the DataGraph
(package private)  int isomorphismIndex
          Index assigned for comparing whether two nodes are isomorphic to one another
private  java.lang.String label
           
(package private)  int parentGraphIndex
          Index of this node's parent in the DataGraph
(package private)  int preorderIndex
          Index of the node in a preorder traversal of the tree
(package private)  int rankInClass
          This node's rank in its equivalance class.
(package private)  int score
          The node's score, which is a measure of its desirability of being in the display tree
(package private)  int treeSize
          Size of this node (1) + size of node's subtree (a leaf has size 1).
 
Constructor Summary
DataNode(java.lang.String label, java.lang.String data, int graphIndex)
          Constructs a DataNode with the given label, data, and index into the data graph.
 
Method Summary
 java.lang.String getData()
          Returns the node's data
 int getGraphIndex()
          Returns this node's index into the DataGraph
 java.lang.String getLabel()
          Returns the node's label
 DataNode getParent(DataGraph dataGraph)
          Returns this node's parent, using its parentGraphIndex and the dataGraph.
 void setParentGraphIndex(int parent)
          Set the index of this node's parent into the DataGraph.
 java.lang.String toString()
          Returns a string representation of the data node, which includes preorder index, label, data, and score.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

label

private java.lang.String label

data

private java.lang.String data

graphIndex

private int graphIndex
Index of this node in the DataGraph

parentGraphIndex

int parentGraphIndex
Index of this node's parent in the DataGraph

preorderIndex

int preorderIndex
Index of the node in a preorder traversal of the tree

displayNode

public DisplayNode displayNode
Reference to the display node corresponding to this DataNode. Value may be null, in which case the node is not displayed in the display tree. If non-null, displayNode.dataNode == this.

isomorphismIndex

int isomorphismIndex
Index assigned for comparing whether two nodes are isomorphic to one another

treeSize

int treeSize
Size of this node (1) + size of node's subtree (a leaf has size 1).

rankInClass

int rankInClass
This node's rank in its equivalance class. Value is between 1 (highest rank) and the size of the equivalence class.

score

int score
The node's score, which is a measure of its desirability of being in the display tree
Constructor Detail

DataNode

public DataNode(java.lang.String label,
                java.lang.String data,
                int graphIndex)
Constructs a DataNode with the given label, data, and index into the data graph.
Method Detail

getGraphIndex

public int getGraphIndex()
Returns this node's index into the DataGraph

getLabel

public java.lang.String getLabel()
Returns the node's label

getData

public java.lang.String getData()
Returns the node's data

toString

public java.lang.String toString()
Returns a string representation of the data node, which includes preorder index, label, data, and score.
Overrides:
toString in class java.lang.Object

setParentGraphIndex

public void setParentGraphIndex(int parent)
Set the index of this node's parent into the DataGraph.

getParent

public DataNode getParent(DataGraph dataGraph)
Returns this node's parent, using its parentGraphIndex and the dataGraph. Null is returned if this node is the root.


Web Accessibility