|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
This interface defines a nested Graph that appears to be
a single Node from the perspective of its parent. This technique
allows unlimited nesting of graphs inside graphs.
Constructing a Subgraph is done by means of a
GraphModelFactory,
which will hide the particular implementation classes from client code.
Although this interface defines its own operations, instances may be
treated as a GraphObject, GraphObjectContainer
or Node.
While Subgraphs are Nodes
they also have a close similarity to Graphs.
They provide a lot of the same methods like
GraphObjectContainer.getNodes(), GraphObjectContainer.getEdges() and so on, which work on
the underlying graph that is represented by each Subgraph.
Nodes and
Edges can be programmatically
added to a Subgraph by invoking the methods
GraphObjectContainer.addNode(Node) or GraphObjectContainer.addEdge(Edge) respectively.
Since Subgraphs are actually
Nodes they can be added to
Graphs and to
Subgraphss as well. There is no limit on the depth
of nesting, except for inevitable memory and resource limits.
The behavior that is specified in Graph concerning the adding
and removing of Nodes and
Edges applies to any
Subgraph as well.
Many methods in this interface specification are inherited from
the more generic super-interface
GraphObjectContainer, which allows
generic handling of both Graphs and
Subgraphs.
Graph,
Node,
Edge,
GraphObjectContainer| Field Summary |
| Fields inherited from interface com.tensegrity.generic.attribute.AttributableOnSet |
TREE_SUBSET_POSTFIX |
| Method Summary | |
void |
addGraphListener(GraphListener listener)
Adds the
given by listener to the Subgraph's internal
structure. |
Subgraph |
deepCopy(Graph graph)
Returns a deep copy of the subgraph. |
Graph |
deepCopyGraph()
Returns a deep copy of the subgraphs underlying Graph |
Graph |
getGraphInternal()
This method is for internal use only. |
Port |
getPortByWrappedPortID(long id)
Internal helper method that querries the wrapped ports. |
void |
removeGraphListener(GraphListener listener)
Removes the
given by listener form the Subgraph's internal
structure. |
| Methods inherited from interface com.tensegrity.graph.model.Node |
addNodeListener, deepCopy, getAdjacentEdges, getAdjacentNodes, getDegree, getInboundEdges, getInboundNodes, getIndegree, getNodeInfo, getOutboundEdges, getOutboundNodes, getOutdegree, getPortByID, getPorts, internalResetPortNumbers, isConnectedFromNode, isConnectedToNode, removeNodeListener, setID, setNodeInfo, setPorts |
| Methods inherited from interface com.tensegrity.graph.model.GraphObject |
addCustomAttribute, assertCustomAttribute, assertCustomAttribute, fillInDump, getCustomAttributes, getDescription, getID, getLabel, getParentContainer, getUniqueID, registerEventMediator, registerEventMediatorInternal, registerVetoableEventMediator, removeCustomAttribute, setCustomAttributes, setDescription, setLabel |
| Methods inherited from interface com.tensegrity.generic.attribute.AttributableOnSet |
addAttributableOnSetListener, areAttributableEventsEnabled, disableAttributableEvents, enableAttributableEvents, getAttributes, getAttributesTree, removeAttributableOnSetListener, setAttributes, setAttributesTree |
| Methods inherited from interface com.tensegrity.generic.attribute.Attributable |
getAttribute, getAttributeType, getAttributeValue, setAttribute, setAttributeValue |
| Method Detail |
public Port getPortByWrappedPortID(long id)
id - the wrapped id to search for.
Port or null if none was found.public void addGraphListener(GraphListener listener)
GraphListener
given by listener to the Subgraph's internal
structure. The GraphListener instance is notified on every
event that occurs at the Subgraph
listener - the GraphListener instance to addpublic void removeGraphListener(GraphListener listener)
GraphListener
given by listener form the Subgraph's internal
structure. The GraphListener instance is no longer be
notified on the events that occurs at the Subgraph
listener - the GraphListener instance to removepublic Subgraph deepCopy(Graph graph)
graph - the graph the copy is assoicated with.
public Graph deepCopyGraph()
Graph
Graphpublic Graph getGraphInternal()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||