|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface HierarchySupport
Helper interface to determine additional data that are necessary to correctly write hierarchically (nested) graphs.
Method Summary | |
---|---|
NodeList |
getChildren(GraphMLWriteContext context,
Node n)
Returns the child nodes of a group/folder nodes. |
Node |
getNearestCommonAncestor(GraphMLWriteContext context,
Node n1,
Node n2)
Returns the nearest common ancestor node of n1 and n2 . |
Node |
getParent(GraphMLWriteContext context,
Node n)
Gets the parent node of n . |
Node |
getRoot(GraphMLWriteContext context)
Gets the root node of a hierarchy. |
Node |
getSourceNode(GraphMLWriteContext context,
Edge edge)
Returns the source node of edge . |
Graph |
getSubgraph(GraphMLWriteContext context,
Node n)
Gets the subgraph object that is represented by the node n . |
EdgeList |
getSubgraphEdges(GraphMLWriteContext context,
Graph g)
Returns all edges that lie completely in g . |
Node |
getTargetNode(GraphMLWriteContext context,
Edge edge)
Returns the target node of edge . |
boolean |
isLeafNode(GraphMLWriteContext context,
Node n)
Returns whether n is a leaf node or a group/folder node. |
Method Detail |
---|
boolean isLeafNode(GraphMLWriteContext context, Node n)
n
is a leaf node or a group/folder node.
context
- The current write context.n
- The node to test.
true
iff n
is a leaf node, false
if it's
a group or folder node.NodeList getChildren(GraphMLWriteContext context, Node n)
If n
is not a group node, the result is undefined.
context
- The current write context.n
- The node to query.
n
.Node getRoot(GraphMLWriteContext context)
This may be null
depending on the actual implementation and therefore
should be used only as a handle for further queries on the hierarchy.
context
- The current write context.
Node getParent(GraphMLWriteContext context, Node n)
n
.
The result is guaranteed to be either group or folder node, or the
root of the hierarchy as returned by getRoot(GraphMLWriteContext)
context
- The current write context.n
- The node to query.
n
.Node getNearestCommonAncestor(GraphMLWriteContext context, Node n1, Node n2)
n1
and n2
.
This method always returns parent nodes of n1
and n2
, even
if n1
is a child of n2
or the other way round.
context
- The current write context.n1
- The first node.n2
- The second node.
n1
and n2
.EdgeList getSubgraphEdges(GraphMLWriteContext context, Graph g)
g
.
context
- The current write context.g
- The graph object to query.
g
.Graph getSubgraph(GraphMLWriteContext context, Node n)
n
.
This instance is only meaningful for containment queries like Graph.contains(y.base.Node)
and
should not be used by code outside the core writing process.
context
- The current write context.n
- The node to query.
n
.Node getSourceNode(GraphMLWriteContext context, Edge edge)
edge
.
In case of folder nodes, this is the real source node.
context
- The current write context.edge
- The edge to test.
edge
.Node getTargetNode(GraphMLWriteContext context, Edge edge)
edge
.
In case of folder nodes, this is the real target node.
context
- The current write context.edge
- The edge to test.
edge
.
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |