edu.iastate.metnet.graphmodel
Class CompositionGraphModel

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.CompositionGraphModel
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, org._3pq.jgrapht.DirectedGraph, org._3pq.jgrapht.Graph, org._3pq.jgrapht.ListenableGraph

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

contain the nodes of the current graph.

Author:
Jie Li
See Also:
Serialized Form

Field Summary
(package private)  org.apache.log4j.Logger logger
          log4j facility
 
Constructor Summary
CompositionGraphModel()
           
 
Method Summary
 void addAndRelation(IMetnetBlockUnit complex, IMetnetBlockUnit component)
           
 void addAndRelation(IMetnetBlockUnit complex, IMetnetBlockUnit component, java.lang.Integer coeffiecient)
           
 void addCompositionGraphModelChangedListener(CompositionGraphModelChangedListener compositionGraphModelChangedListener)
           
 void addOrRelation(IMetnetBlockUnit complex, IMetnetBlockUnit component)
           
 void addOrRelation(IMetnetBlockUnit complex, IMetnetBlockUnit component, java.lang.Integer coeffiecient)
           
 IMetnetBlockUnit checkOrInsertMetnetBlockunit(java.lang.Integer blockid)
           
 RelationObject findRelation(java.lang.Integer complexid, java.lang.Integer componentid)
           
 void fireCompositionGraphModelChangedEvent()
          update the graph visualization if there are some changes in the graph model
 boolean isAndRelation(java.lang.Integer complexid, java.lang.Integer componentid)
           
 void removeCompositionGraphModelChangedListener(CompositionGraphModelChangedListener compositionGraphModelChangedListener)
           
 void removeMetnetBlockunit(java.lang.Integer blockid)
           
 void removeRelation(java.lang.Integer complexid, java.lang.Integer componentid)
           
 void updateGraphEdges()
          update the edge in the graph model and must call after any add/delete operation
 
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

org.apache.log4j.Logger logger
log4j facility

Constructor Detail

CompositionGraphModel

public CompositionGraphModel()
Method Detail

addCompositionGraphModelChangedListener

public void addCompositionGraphModelChangedListener(CompositionGraphModelChangedListener compositionGraphModelChangedListener)

removeCompositionGraphModelChangedListener

public void removeCompositionGraphModelChangedListener(CompositionGraphModelChangedListener compositionGraphModelChangedListener)

fireCompositionGraphModelChangedEvent

public void fireCompositionGraphModelChangedEvent()
update the graph visualization if there are some changes in the graph model


checkOrInsertMetnetBlockunit

public IMetnetBlockUnit checkOrInsertMetnetBlockunit(java.lang.Integer blockid)

removeMetnetBlockunit

public void removeMetnetBlockunit(java.lang.Integer blockid)

isAndRelation

public boolean isAndRelation(java.lang.Integer complexid,
                             java.lang.Integer componentid)

addAndRelation

public void addAndRelation(IMetnetBlockUnit complex,
                           IMetnetBlockUnit component,
                           java.lang.Integer coeffiecient)

findRelation

public RelationObject findRelation(java.lang.Integer complexid,
                                   java.lang.Integer componentid)

addAndRelation

public void addAndRelation(IMetnetBlockUnit complex,
                           IMetnetBlockUnit component)

addOrRelation

public void addOrRelation(IMetnetBlockUnit complex,
                          IMetnetBlockUnit component,
                          java.lang.Integer coeffiecient)

addOrRelation

public void addOrRelation(IMetnetBlockUnit complex,
                          IMetnetBlockUnit component)

removeRelation

public void removeRelation(java.lang.Integer complexid,
                           java.lang.Integer componentid)

updateGraphEdges

public void updateGraphEdges()
update the edge in the graph model and must call after any add/delete operation