edu.iastate.metnet.dao
Class RelationMap
java.lang.Object
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
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RelationMap
public RelationMap()
addParentAndChild
public void addParentAndChild(java.lang.Object parent,
java.lang.Object child)
- add one relation
- Parameters:
parent - the parent nodechild - 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.