|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiva.graph.AbstractGraphModel
diva.graph.modular.ModularGraphModel
public abstract class ModularGraphModel
A modular implementation of the graph model, whereby users with heterogeneous graphs can implement the graph model interface by implementing the simple interfaces of Graph, Node, CompositeNode, and Edge.
Red |
Field Summary | |
---|---|
private java.lang.Object |
_root
The root of the graph contained by this model. |
Fields inherited from class diva.graph.AbstractGraphModel |
---|
_graphListeners |
Constructor Summary | |
---|---|
ModularGraphModel(java.lang.Object root)
Construct an empty graph model whose root is the given semantic object. |
Method Summary | |
---|---|
boolean |
containsNode(java.lang.Object composite,
java.lang.Object node)
Return true if this composite node contains the given node. |
abstract CompositeModel |
getCompositeModel(java.lang.Object composite)
Return the model for the given composite object. |
abstract EdgeModel |
getEdgeModel(java.lang.Object edge)
Return the model for the given edge object. |
java.lang.Object |
getHead(java.lang.Object edge)
Return the head node of the given edge. |
int |
getNodeCount(java.lang.Object composite)
Return the number of nodes contained in this graph or composite node. |
abstract NodeModel |
getNodeModel(java.lang.Object node)
Return the node model for the given object. |
java.lang.Object |
getParent(java.lang.Object node)
Return the parent graph of this node, return null if there is no parent. |
abstract java.lang.Object |
getProperty(java.lang.Object o,
java.lang.String propertyName)
Return the property of the object associated with the given property name. |
java.lang.Object |
getRoot()
Return the root graph of this graph model. |
abstract java.lang.Object |
getSemanticObject(java.lang.Object o)
Return the semantic object corresponding to the given node, edge, or composite. |
java.lang.Object |
getTail(java.lang.Object edge)
Return the tail node of this edge. |
java.util.Iterator |
inEdges(java.lang.Object node)
Return an iterator over the in edges of this node. |
boolean |
isComposite(java.lang.Object o)
Return true if the given object is a composite node in this model, i.e. it contains children. |
boolean |
isDirected(java.lang.Object edge)
Return whether or not this edge is directed. |
boolean |
isEdge(java.lang.Object o)
Return true if the given object is a node in this model. |
boolean |
isNode(java.lang.Object o)
Return true if the given object is a node in this model. |
java.util.Iterator |
nodes(java.lang.Object composite)
Provide an iterator over the nodes in the given graph or composite node. |
java.util.Iterator |
nodesAfterEdges(java.lang.Object composite)
Provide an iterator over the nodes that should be rendered after to the edges. |
java.util.Iterator |
nodesBeforeEdges(java.lang.Object composite)
Provide an iterator over the nodes that should be rendered prior to the edges. |
java.util.Iterator |
outEdges(java.lang.Object node)
Return an iterator over the out edges of this node. |
abstract void |
setProperty(java.lang.Object o,
java.lang.String propertyName,
java.lang.Object value)
Set the property of the object associated with the given property name. |
abstract void |
setSemanticObject(java.lang.Object o,
java.lang.Object sem)
Set the semantic object corresponding to the given node, edge, or composite. |
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 |
Field Detail |
---|
private java.lang.Object _root
Constructor Detail |
---|
public ModularGraphModel(java.lang.Object root)
Method Detail |
---|
public boolean containsNode(java.lang.Object composite, java.lang.Object node)
public abstract CompositeModel getCompositeModel(java.lang.Object composite)
public abstract EdgeModel getEdgeModel(java.lang.Object edge)
public java.lang.Object getHead(java.lang.Object edge)
public int getNodeCount(java.lang.Object composite)
public abstract NodeModel getNodeModel(java.lang.Object node)
public java.lang.Object getParent(java.lang.Object node)
public abstract java.lang.Object getProperty(java.lang.Object o, java.lang.String propertyName)
public java.lang.Object getRoot()
public abstract java.lang.Object getSemanticObject(java.lang.Object o)
public java.lang.Object getTail(java.lang.Object edge)
public boolean isDirected(java.lang.Object edge)
public boolean isComposite(java.lang.Object o)
public boolean isEdge(java.lang.Object o)
public boolean isNode(java.lang.Object o)
public java.util.Iterator nodes(java.lang.Object composite)
public java.util.Iterator nodesBeforeEdges(java.lang.Object composite)
public java.util.Iterator nodesAfterEdges(java.lang.Object composite)
public java.util.Iterator inEdges(java.lang.Object node)
public java.util.Iterator outEdges(java.lang.Object node)
public abstract void setProperty(java.lang.Object o, java.lang.String propertyName, java.lang.Object value)
public abstract void setSemanticObject(java.lang.Object o, java.lang.Object sem)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |