edu.iastate.metnet.dao
Class RelationMap

java.lang.Object
  extended by edu.iastate.metnet.dao.RelationMap
All Implemented Interfaces:
java.io.Serializable

public class RelationMap
extends java.lang.Object
implements java.io.Serializable

Author:
Jie Li
See Also:
Serialized Form

Constructor Summary
RelationMap()
           
 
Method Summary
 void addParentAndChild(java.lang.Object parent, java.lang.Object child)
          add one relation
 java.lang.Object findAscentdant(java.lang.Object child)
          find the root of the ascendant
 java.util.Collection findDescendant(java.lang.Object parent)
          find the descendant of the node not limit to the leaves
 java.util.HashMap getChildToParentMap()
           
 org.apache.commons.collections.MultiHashMap getParentToChildMap()
           
 void setChildToParentMap(java.util.HashMap childToParentMap)
           
 void setParentToChildMap(org.apache.commons.collections.MultiHashMap parentToChildMap)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RelationMap

public RelationMap()
Method Detail

addParentAndChild

public void addParentAndChild(java.lang.Object parent,
                              java.lang.Object child)
add one relation

Parameters:
parent - the parent node
child - the child node

findAscentdant

public java.lang.Object findAscentdant(java.lang.Object child)
find the root of the ascendant

Parameters:
child - the child node
Returns:
the ascendant object

findDescendant

public java.util.Collection findDescendant(java.lang.Object parent)
find the descendant of the node not limit to the leaves

Parameters:
parent - the parent node
Returns:
the descentand object

getChildToParentMap

public java.util.HashMap getChildToParentMap()
Returns:
Returns the childToParentMap.

setChildToParentMap

public void setChildToParentMap(java.util.HashMap childToParentMap)
Parameters:
childToParentMap - The childToParentMap to set.

getParentToChildMap

public org.apache.commons.collections.MultiHashMap getParentToChildMap()
Returns:
Returns the parentToChildMap.

setParentToChildMap

public void setParentToChildMap(org.apache.commons.collections.MultiHashMap parentToChildMap)
Parameters:
parentToChildMap - The parentToChildMap to set.