| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sri.emo.dbobj.selectiontree.TreeSelectionFactory
public class TreeSelectionFactory
Selects a tree of associated nodes. Each node from the root is included in the tree if it has a strong relationship with its parent.
each parent has an attribute MyChildren set with an Node[] array of children, and each child has an attribute set for its parent, a Node.
 Node n = new Node();
 //Set values
 
 TreeSelectionFactory selectionFactory = new TreeSelectionFactory(n);
 Map allNodesElegibleForDeletion = selectionFactory.getNodesInTree();
 
 
 
| Field Summary | |
|---|---|
static String | 
IS_PARENT_OF
 | 
| Constructor Summary | |
|---|---|
TreeSelectionFactory(Node root)
Construct a TreeSelectionFactory given the root ndoe.  | 
|
| Method Summary | |
|---|---|
 Map | 
getNodesInStronglyRelatedTree()
Get ALL related nodes in tree beneath this node EXCEPT types indicated for omission recurses into tree; side-effect: adds attribute 'level' with node level w/i tree to each node.  | 
static void | 
getNodesInStronglyRelatedTreeRecursive(Node currentNode,
                                       Map outputMap)
Handles the recursive traversal through related nodes in a tree.  | 
 Map | 
getNodesInTree()
Get ALL related nodes in tree beneath this node.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static final String IS_PARENT_OF
| Constructor Detail | 
|---|
public TreeSelectionFactory(Node root)
root - Node| Method Detail | 
|---|
public Map getNodesInTree()
                   throws DBException
DBException
public Map getNodesInStronglyRelatedTree()
                                  throws DBException
DBException - upon database access error.
public static void getNodesInStronglyRelatedTreeRecursive(Node currentNode,
                                                          Map outputMap)
                                                   throws DBException
outputMap - Map
DBException
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||