edu.iastate.metnet.graphmodel
Class PathwayModel

java.lang.Object
  extended by org._3pq.jgrapht.graph.AbstractGraph
      extended by org._3pq.jgrapht.graph.GraphDelegator
          extended by org._3pq.jgrapht.graph.DefaultListenableGraph
              extended by org._3pq.jgrapht.graph.ListenableDirectedGraph
                  extended by edu.iastate.metnet.graphmodel.PathwayModel
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, org._3pq.jgrapht.DirectedGraph, org._3pq.jgrapht.Graph, org._3pq.jgrapht.ListenableGraph

public class PathwayModel
extends org._3pq.jgrapht.graph.ListenableDirectedGraph

special graph model, which only add interaction nodes, and automatically add entitywithlocation nodes and edges related to these nodes

Author:
Jie Li
See Also:
Serialized Form

Field Summary
(package private) static org.apache.log4j.Logger logger
          log4j facility
protected  MetnetPathway pathway
          current pathway object
 
Constructor Summary
PathwayModel(org._3pq.jgrapht.DirectedGraph network, java.util.Map typeMap)
          construct the model based on the networks
PathwayModel(org._3pq.jgrapht.DirectedGraph network, java.util.Map dataMap, org.apache.commons.collections.map.MultiKeyMap coefficientMap)
          create a pathway model from network
PathwayModel(java.util.Map pathwayMap)
          set up the mixture of the pathway based on the ID
 
Method Summary
 void applyProcessor(IGraphProcessor graphProcessor)
          general method for post-modification on the graph data model
 java.util.Map getBlockunitMap(java.util.Collection blockIdList)
           
 org.apache.commons.collections.map.MultiKeyMap getBridgeMap()
           
 org.apache.commons.collections.map.MultiKeyMap getCoeffMap()
           
 java.util.Map getLocalPathwayMap()
           
 org.apache.commons.collections.MultiMap getMbidPbidMap()
          get the relation among all member blockid and pathway blockid mapping relation
 java.util.ArrayList getPbidMembership(java.lang.Integer mbid)
          detect the membership of pathway
 int size()
          return the number of pathway in this model
 
Methods inherited from class org._3pq.jgrapht.graph.DefaultListenableGraph
addEdge, addEdge, addGraphListener, addVertex, addVertexSetListener, clone, fireEdgeAdded, fireEdgeRemoved, fireVertexAdded, fireVertexRemoved, isReuseEvents, removeEdge, removeEdge, removeGraphListener, removeVertex, removeVertexSetListener, setReuseEvents
 
Methods inherited from class org._3pq.jgrapht.graph.GraphDelegator
containsEdge, containsVertex, degreeOf, edgeSet, edgesOf, getAllEdges, getEdge, getEdgeFactory, incomingEdgesOf, inDegreeOf, outDegreeOf, outgoingEdgesOf, toString, vertexSet
 
Methods inherited from class org._3pq.jgrapht.graph.AbstractGraph
addAllEdges, addAllVertices, assertVertexExist, containsEdge, removeAllEdges, removeAllEdges, removeAllEdges, removeAllVertices, toStringFromSets
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org._3pq.jgrapht.DirectedGraph
incomingEdgesOf, inDegreeOf, outDegreeOf, outgoingEdgesOf
 
Methods inherited from interface org._3pq.jgrapht.Graph
addAllEdges, addAllVertices, addEdge, addEdge, addVertex, containsEdge, containsEdge, containsVertex, edgeSet, edgesOf, getAllEdges, getEdge, getEdgeFactory, removeAllEdges, removeAllEdges, removeAllVertices, removeEdge, removeEdge, removeVertex, vertexSet
 

Field Detail

logger

static org.apache.log4j.Logger logger
log4j facility


pathway

protected MetnetPathway pathway
current pathway object

Constructor Detail

PathwayModel

public PathwayModel(org._3pq.jgrapht.DirectedGraph network,
                    java.util.Map typeMap)
construct the model based on the networks

Parameters:
network - the network containing only the blockid

PathwayModel

public PathwayModel(org._3pq.jgrapht.DirectedGraph network,
                    java.util.Map dataMap,
                    org.apache.commons.collections.map.MultiKeyMap coefficientMap)
create a pathway model from network

Parameters:
network - the network, containing sequence ID
dataMap - the data map from sequence ID to BlockUnit
dummy - the dummy param to distinguish another constructor

PathwayModel

public PathwayModel(java.util.Map pathwayMap)
set up the mixture of the pathway based on the ID

Parameters:
pathwayMap - pathway list
Method Detail

applyProcessor

public void applyProcessor(IGraphProcessor graphProcessor)
general method for post-modification on the graph data model

Parameters:
graphProcessor - the post-modification processor

size

public int size()
return the number of pathway in this model

Returns:
the number of pathway in this model

getMbidPbidMap

public org.apache.commons.collections.MultiMap getMbidPbidMap()
get the relation among all member blockid and pathway blockid mapping relation

Returns:
Returns the mbidPbidMap.

getPbidMembership

public java.util.ArrayList getPbidMembership(java.lang.Integer mbid)
detect the membership of pathway

Parameters:
mbid - the member element's blockid
Returns:
blockid list of pathway in current preview window which the member belongs to

getLocalPathwayMap

public java.util.Map getLocalPathwayMap()
Returns:
Returns the localPathwayMap.

getBlockunitMap

public java.util.Map getBlockunitMap(java.util.Collection blockIdList)
Returns:
the blockunitMap

getBridgeMap

public org.apache.commons.collections.map.MultiKeyMap getBridgeMap()
Returns:
the bridge map, in which the two key is the source node and target node, the value is the interaction removed from the pathway model

getCoeffMap

public org.apache.commons.collections.map.MultiKeyMap getCoeffMap()
Returns:
the coeffMap