edu.unh.sdb.datasource
Class ARRSTree

java.lang.Object
  extended by edu.unh.sdb.datasource.ARRSTree

public class ARRSTree
extends java.lang.Object


Constructor Summary
ARRSTree()
          Constructor without arguments
 
Method Summary
 boolean addNode(ARRSNode node, int parentId)
          Add a node into an ARRS tree
 void buildLeafList()
          Traverse all the leaf cell block in a ARR tree
 void buildTreePath()
          Set the path of this tree
 void clearLeafList()
          Clear the list of leaf cell blocks
 ARRSNode getChild(ARRSNode node, int i)
          Get one child of the specified node
 ARRSNode[] getChildren(ARRSNode node)
          Get all the children of the specified node
 java.util.ArrayList getLeafList()
          Get the leaf cell block list
 ARRSNode getNode(int id)
          Find the node with id number
 java.util.ArrayList getNodeList()
          Get all the nodes in the tree
 int getNumOfNodes()
          Get the number of all the nodes in the tree
 ARRSNode getSibling(ARRSNode node)
          Get the sibling of the specified node
 java.lang.String printNode(ARRSNode node)
          Print the info of a node
 java.lang.String printNode(int indent, ARRSNode node)
          Print the info of a node with some indent
 java.lang.String toString()
          Print the info of a tree
 void treeClear()
          Clear the ARRS tree
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ARRSTree

public ARRSTree()
Constructor without arguments

Method Detail

addNode

public boolean addNode(ARRSNode node,
                       int parentId)
Add a node into an ARRS tree


buildTreePath

public void buildTreePath()
Set the path of this tree


getNode

public ARRSNode getNode(int id)
Find the node with id number


getChild

public ARRSNode getChild(ARRSNode node,
                         int i)
Get one child of the specified node


getSibling

public ARRSNode getSibling(ARRSNode node)
Get the sibling of the specified node


getChildren

public ARRSNode[] getChildren(ARRSNode node)
Get all the children of the specified node


getNodeList

public java.util.ArrayList getNodeList()
Get all the nodes in the tree


getNumOfNodes

public int getNumOfNodes()
Get the number of all the nodes in the tree


getLeafList

public java.util.ArrayList getLeafList()
Get the leaf cell block list


clearLeafList

public void clearLeafList()
Clear the list of leaf cell blocks


treeClear

public void treeClear()
Clear the ARRS tree


buildLeafList

public void buildLeafList()
Traverse all the leaf cell block in a ARR tree


toString

public java.lang.String toString()
Print the info of a tree

Overrides:
toString in class java.lang.Object

printNode

public java.lang.String printNode(ARRSNode node)
Print the info of a node


printNode

public java.lang.String printNode(int indent,
                                  ARRSNode node)
Print the info of a node with some indent