Package diva.graph.basic
Class BasicGraphModel
- java.lang.Object
-
- All Implemented Interfaces:
GraphModel
,MutableGraphModel
public class BasicGraphModel extends BasicModularGraphModel
A basic implementation of a mutable graph model that stores its graph structure as a collection of nodes and edges (as opposed to an adjacency matrix). This class is a good reference class for how to use the diva.graph.modular classes and will suffice as a data structure for simple, throw-away applications (a heavy-weight application like a schematic editor will probably want to implement things differently.- Version:
- $Id$
- Author:
- Michael Shilman
- Pt.AcceptedRating:
- Red
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class diva.graph.modular.BasicModularGraphModel
BasicModularGraphModel.BasicEdgeModel, BasicModularGraphModel.BasicNodeModel
-
-
Field Summary
-
Fields inherited from class diva.graph.AbstractGraphModel
_graphListeners
-
-
Constructor Summary
Constructors Constructor Description BasicGraphModel()
Construct an empty graph model.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompositeNode
createComposite(java.lang.Object semanticObject)
Make a new composite node object.Edge
createEdge(java.lang.Object semanticObject)
Make a new edge object.Node
createNode(java.lang.Object semanticObject)
Make a new node object.-
Methods inherited from class diva.graph.modular.BasicModularGraphModel
getCompositeModel, getEdgeModel, getNodeModel, getProperty, getSemanticObject, setProperty, setSemanticObject
-
Methods inherited from class diva.graph.modular.MutableModularGraphModel
acceptHead, acceptTail, addNode, connectEdge, disconnectEdge, getMutableEdgeModel, getMutableNodeModel, removeNode, setEdgeHead, setEdgeTail
-
Methods inherited from class diva.graph.modular.ModularGraphModel
containsNode, getHead, getNodeCount, getParent, getRoot, getTail, inEdges, isComposite, isDirected, isEdge, isNode, nodes, nodesAfterEdges, nodesBeforeEdges, outEdges
-
Methods inherited from class diva.graph.AbstractGraphModel
addGraphListener, dispatchGraphEvent, removeGraphListener, setDispatchEnabled
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface diva.graph.GraphModel
addGraphListener, containsNode, dispatchGraphEvent, getHead, getNodeCount, getParent, getRoot, getTail, inEdges, isComposite, isDirected, isEdge, isNode, nodes, nodesAfterEdges, nodesBeforeEdges, outEdges, removeGraphListener, setDispatchEnabled
-
-
-
-
Method Detail
-
createComposite
public CompositeNode createComposite(java.lang.Object semanticObject)
Make a new composite node object.
-
createEdge
public Edge createEdge(java.lang.Object semanticObject)
Make a new edge object.
-
createNode
public Node createNode(java.lang.Object semanticObject)
Make a new node object.
-
-