edu.iastate.metnet.dao
Interface PathwayGraph

All Known Implementing Classes:
PathwayGraphImpl

public interface PathwayGraph


Method Summary
 void addEdge(java.lang.Integer leftId, java.lang.Integer rightId)
          add an edge
 void addNode(PathwayElementNode node)
          add an element
 java.util.Map getAllEbidEidMap()
          get the entity blockid->entityid mapping for comparison
 java.util.List getAllEbidList()
          get all entity node bid list
 java.util.List getAllIbidList()
          get all interaction node bid list
 java.util.Set getContext(java.lang.Integer ibid)
          get all entity id around the interaction in specified steps
 java.util.List getDownstreamEntityNodeIdList(java.lang.Integer blockId)
          get the downstream entity node id list
 java.util.List getDownstreamInteractionNodeIdList(java.lang.Integer blockId)
          get the downstream interaction node id list
 java.util.List getDownstreamNodeIdList(java.lang.Integer blockId)
          get the list of new version record
 PathwayElementNode getNode(java.lang.Integer nodeId)
          return a node by id
 java.util.Map getNodeMap()
           
 java.util.Set getPbidSet()
           
 InteractionStructure getSignature(java.lang.Integer ibid)
          generate the signature of an interaction based on the entityid, the format is (left entity id 1, left entity id 2, ...; right id 1, right id 2, ...) without any space.
 java.util.List getUpstreamEntityNodeIdList(java.lang.Integer blockId)
          get the upstream entity node id list
 java.util.List getUpstreamInteractionNodeIdList(java.lang.Integer blockId)
          get the upstream interaction node id list
 java.util.List getUpstreamNodeIdList(java.lang.Integer blockId)
          get the list of old version record
 boolean isControlInteraction(java.lang.Integer blockId)
          if this is a control interaction
 boolean isEntitywithlocation(java.lang.Integer blockId)
          if it is an entitywithlocation
 boolean isInteraction(java.lang.Integer blockId)
          if it is an interaction
 boolean isNormalInteraction(java.lang.Integer blockId)
          if it is a normal interaction
 PathwayAlignment isomorphism(PathwayGraph graph, AlignmentAlgorithm algorithm)
          run isomorphism
 void removeNode(java.lang.Integer nodeId)
          remove a node from the pathway structure
 

Method Detail

addNode

void addNode(PathwayElementNode node)
add an element

Parameters:
node - the structure node information

getNode

PathwayElementNode getNode(java.lang.Integer nodeId)
return a node by id

Parameters:
nodeId - the blockid of the node
Returns:
the node

removeNode

void removeNode(java.lang.Integer nodeId)
remove a node from the pathway structure

Parameters:
nodeId - the node id of the pathway element

isEntitywithlocation

boolean isEntitywithlocation(java.lang.Integer blockId)
                             throws NoSuchNodeException
if it is an entitywithlocation

Parameters:
blockId - the blockid of the entitywithlocation
Returns:
true if it is an entitywithlocation, false if not
Throws:
NoSuchNodeException - the node id does not exist

isInteraction

boolean isInteraction(java.lang.Integer blockId)
                      throws NoSuchNodeException
if it is an interaction

Parameters:
blockId - the blockid of the node
Returns:
true if it is an interaction, false if not
Throws:
NoSuchNodeException - the node id does not exist

isNormalInteraction

boolean isNormalInteraction(java.lang.Integer blockId)
                            throws NoSuchNodeException
if it is a normal interaction

Parameters:
blockId - the blockid of the node
Returns:
true if it is a normal interaction, false if not
Throws:
NoSuchNodeException - the node id does not exist

isControlInteraction

boolean isControlInteraction(java.lang.Integer blockId)
                             throws NoSuchNodeException
if this is a control interaction

Parameters:
blockId - the blockid of current node
Returns:
true if it is a control interaction, false if not
Throws:
NoSuchNodeException - the node id does not exist

getDownstreamNodeIdList

java.util.List getDownstreamNodeIdList(java.lang.Integer blockId)
get the list of new version record

Parameters:
blockId - the record id to be query
Returns:
the list of new version record id

getUpstreamNodeIdList

java.util.List getUpstreamNodeIdList(java.lang.Integer blockId)
get the list of old version record

Parameters:
blockId - the recordid to be query
Returns:
the list of old version record id

getUpstreamEntityNodeIdList

java.util.List getUpstreamEntityNodeIdList(java.lang.Integer blockId)
get the upstream entity node id list

Parameters:
blockId - the current node id
Returns:
the upstream entity node id list

getDownstreamEntityNodeIdList

java.util.List getDownstreamEntityNodeIdList(java.lang.Integer blockId)
get the downstream entity node id list

Parameters:
blockId - the current node id
Returns:
the downstream entity node id list

getUpstreamInteractionNodeIdList

java.util.List getUpstreamInteractionNodeIdList(java.lang.Integer blockId)
get the upstream interaction node id list

Parameters:
blockId - the current node id
Returns:
the upstream interaction node id list

getDownstreamInteractionNodeIdList

java.util.List getDownstreamInteractionNodeIdList(java.lang.Integer blockId)
get the downstream interaction node id list

Parameters:
blockId - the current node id
Returns:
the downstream interaction node id list

addEdge

void addEdge(java.lang.Integer leftId,
             java.lang.Integer rightId)
             throws NoSuchNodeException
add an edge

Parameters:
leftId - the left node id
rightId - the right node id
Throws:
NoSuchNodeException - exception if one of nodes does not exist

getNodeMap

java.util.Map getNodeMap()
Returns:
Returns the nodeMap.

isomorphism

PathwayAlignment isomorphism(PathwayGraph graph,
                             AlignmentAlgorithm algorithm)
run isomorphism

Parameters:
graph - the other pathway graph
algorithm - the alignment algorithm
Returns:
the alignment results

getAllEbidList

java.util.List getAllEbidList()
get all entity node bid list

Returns:
all entity node bid list

getAllIbidList

java.util.List getAllIbidList()
get all interaction node bid list

Returns:
all interaction node bid list

getAllEbidEidMap

java.util.Map getAllEbidEidMap()
get the entity blockid->entityid mapping for comparison

Returns:
the blockid->entityid mapping

getSignature

InteractionStructure getSignature(java.lang.Integer ibid)
generate the signature of an interaction based on the entityid, the format is (left entity id 1, left entity id 2, ...; right id 1, right id 2, ...) without any space. If the interaction is an control one, how to specify the interaction signature? we attach char 'I' before the blockid to indicate that it is a normal interaction in the right side. For a normal interaction, we do not consider the control interaction when creating the signature.

Parameters:
ibid - the interaction blockid
Returns:
the signature, directional one.

getPbidSet

java.util.Set getPbidSet()
Returns:
Returns the pbidSet.

getContext

java.util.Set getContext(java.lang.Integer ibid)
get all entity id around the interaction in specified steps

Parameters:
ibid - the blockid of the interaction
Returns:
all entity id around the interaction in specified steps