edu.iastate.metnet.dao
Class MultiPathwayGraphImpl

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

public class MultiPathwayGraphImpl
extends java.lang.Object
implements java.io.Serializable, MultiPathwayGraph

implementation of multi-pathway graph

Author:
Jie Li
See Also:
Serialized Form

Constructor Summary
MultiPathwayGraphImpl()
          default constructor
MultiPathwayGraphImpl(PathwayAlignment alignment)
          get a merged multi-pathway graph based on the alignment information
 
Method Summary
 void alignPathwayGraph(PathwayAlignment alignment)
          standard interface to align two patway graph to generate a single graph model
 PathwayAlignment getAlignment()
           
 MultiPathwayElementNode getNode(java.lang.String guid)
          get a node
 java.util.Map getNodeMap()
           
 java.util.List getPredEntityNodeGuidList(java.lang.String guid)
          return pred entity node guid list
 java.util.List getPredInteractionNodeGuidList(java.lang.String guid)
          return pred interaction node guid list
 java.util.List getPredNodeGuidList(java.lang.String guid)
          return all pred multi-node
 int getSimilarity(java.lang.Integer leftIbid, java.lang.Integer rightIbid)
          get the number of identical elements in the two context sets
 java.util.List getSuccEntityNodeGuidList(java.lang.String guid)
          return succ entity node guid list
 java.util.List getSuccInteractionNodeGuidList(java.lang.String guid)
          return succ interaction node guid list
 java.util.List getSuccNodeGuidList(java.lang.String guid)
          return succ multi-node
 boolean isEntitywithlocation(java.lang.String guid)
          determine if this is an entity node
 boolean isInteraction(java.lang.String guid)
          determine if this is an interaction node
 void setAlignment(PathwayAlignment alignment)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiPathwayGraphImpl

public MultiPathwayGraphImpl()
default constructor


MultiPathwayGraphImpl

public MultiPathwayGraphImpl(PathwayAlignment alignment)
get a merged multi-pathway graph based on the alignment information

Parameters:
alignment - the alignment
Method Detail

alignPathwayGraph

public void alignPathwayGraph(PathwayAlignment alignment)
standard interface to align two patway graph to generate a single graph model

Specified by:
alignPathwayGraph in interface MultiPathwayGraph
Parameters:
alignment - the alignment information

getPredNodeGuidList

public java.util.List getPredNodeGuidList(java.lang.String guid)
return all pred multi-node

Specified by:
getPredNodeGuidList in interface MultiPathwayGraph
Parameters:
guid - the guid of the multi-node
Returns:
all pred node guid

getSuccNodeGuidList

public java.util.List getSuccNodeGuidList(java.lang.String guid)
return succ multi-node

Specified by:
getSuccNodeGuidList in interface MultiPathwayGraph
Parameters:
guid - the guid of the multi-node
Returns:
all succ node guid

getPredEntityNodeGuidList

public java.util.List getPredEntityNodeGuidList(java.lang.String guid)
return pred entity node guid list

Specified by:
getPredEntityNodeGuidList in interface MultiPathwayGraph
Parameters:
guid - the guid of the multi-node
Returns:
pred entity node guid list

getSuccEntityNodeGuidList

public java.util.List getSuccEntityNodeGuidList(java.lang.String guid)
return succ entity node guid list

Specified by:
getSuccEntityNodeGuidList in interface MultiPathwayGraph
Parameters:
guid - the guid of the multi-node
Returns:
succ entity node guid list

getPredInteractionNodeGuidList

public java.util.List getPredInteractionNodeGuidList(java.lang.String guid)
return pred interaction node guid list

Specified by:
getPredInteractionNodeGuidList in interface MultiPathwayGraph
Parameters:
guid - the guid of the multi-node
Returns:
pred interaction node guid list

getSuccInteractionNodeGuidList

public java.util.List getSuccInteractionNodeGuidList(java.lang.String guid)
return succ interaction node guid list

Specified by:
getSuccInteractionNodeGuidList in interface MultiPathwayGraph
Parameters:
guid - the guid of the multi-node
Returns:
succ interaction node guid list

isEntitywithlocation

public boolean isEntitywithlocation(java.lang.String guid)
                             throws NoSuchNodeException
determine if this is an entity node

Specified by:
isEntitywithlocation in interface MultiPathwayGraph
Parameters:
guid - guid of the multi-node
Returns:
true if it is an entity
Throws:
NoSuchNodeException - no such nodes

isInteraction

public boolean isInteraction(java.lang.String guid)
                      throws NoSuchNodeException
determine if this is an interaction node

Specified by:
isInteraction in interface MultiPathwayGraph
Parameters:
guid - guid of the multi-node
Returns:
true if it is an interaction
Throws:
NoSuchNodeException - no such nodes

getNodeMap

public java.util.Map getNodeMap()
Specified by:
getNodeMap in interface MultiPathwayGraph
Returns:
Returns the nodeMap.

getNode

public MultiPathwayElementNode getNode(java.lang.String guid)
get a node

Specified by:
getNode in interface MultiPathwayGraph
Parameters:
guid - the guid
Returns:
the node

getAlignment

public PathwayAlignment getAlignment()
Specified by:
getAlignment in interface MultiPathwayGraph
Returns:
Returns the alignment.

setAlignment

public void setAlignment(PathwayAlignment alignment)
Parameters:
alignment - The alignment to set.

getSimilarity

public int getSimilarity(java.lang.Integer leftIbid,
                         java.lang.Integer rightIbid)
get the number of identical elements in the two context sets

Specified by:
getSimilarity in interface MultiPathwayGraph
Parameters:
leftIbid - the left interaction
rightIbid - the right interaction
Returns:
number of identical elements in the two context sets