|
Search this API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.io.graphml.layout.GroupingBasedHierarchySupport
public class GroupingBasedHierarchySupport
Accesses nesting information stored in Grouping instances for
GraphML serialization.
Note, this class only supports group nodes and normal nodes.
Folder nodes
are not supported
![]() |
![]() |
| Constructor Summary | |
|---|---|
GroupingBasedHierarchySupport(Grouping grouping)
Initializes a new GroupingBasedHierarchySupport instance. |
|
| Method Summary | |
|---|---|
NodeList |
getChildren(GraphMLWriteContext context,
Node n)
Returns the child nodes of the given group node. |
Node |
getNearestCommonAncestor(GraphMLWriteContext context,
Node n1,
Node n2)
Returns the nearest common ancestor node of the two given nodes. |
Node |
getParent(GraphMLWriteContext context,
Node n)
Returns the parent node of the given node. |
Node |
getRoot(GraphMLWriteContext context)
Returns null. |
Node |
getSourceNode(GraphMLWriteContext context,
Edge edge)
Returns the source node of the given edge. |
Graph |
getSubgraph(GraphMLWriteContext context,
Node n)
Returns the subgraph that is represented by the given node. |
EdgeList |
getSubgraphEdges(GraphMLWriteContext context,
Graph g)
Returns all edges that lie completely in the given graph. |
Node |
getTargetNode(GraphMLWriteContext context,
Edge edge)
Returns the target node of the given edge. |
boolean |
isLeafNode(GraphMLWriteContext context,
Node n)
Determines whether or not the given node is a normal node. |
static GroupingBasedHierarchySupport |
newInstance(Graph graph)
Creates a new instance of GroupingBasedHierarchySupport for
the given graph. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GroupingBasedHierarchySupport(Grouping grouping)
GroupingBasedHierarchySupport instance.
grouping - the nesting information.| Method Detail |
|---|
public boolean isLeafNode(GraphMLWriteContext context,
Node n)
isLeafNode in interface HierarchySupportcontext - The current write context.n - The node to test.
true if the given node is a normal node and
false otherwise.
public NodeList getChildren(GraphMLWriteContext context,
Node n)
getChildren in interface HierarchySupportcontext - The current write context.n - The node to query.
public Node getRoot(GraphMLWriteContext context)
null.
getRoot in interface HierarchySupportcontext - The current write context.
null.
public Node getParent(GraphMLWriteContext context,
Node n)
getParent in interface HierarchySupportcontext - The current write context.n - The node to query.
null if
the given node is a top-level node.
public Node getNearestCommonAncestor(GraphMLWriteContext context,
Node n1,
Node n2)
getNearestCommonAncestor in interface HierarchySupportcontext - The current write context.n1 - The first node.n2 - The second node.
public EdgeList getSubgraphEdges(GraphMLWriteContext context,
Graph g)
getSubgraphEdges in interface HierarchySupportcontext - The current write context.g - The graph object to query.
public Graph getSubgraph(GraphMLWriteContext context,
Node n)
getSubgraph in interface HierarchySupportcontext - The current write context.n - The node to query.
public Node getSourceNode(GraphMLWriteContext context,
Edge edge)
getSourceNode in interface HierarchySupportcontext - The current write context.edge - The edge to test.
public Node getTargetNode(GraphMLWriteContext context,
Edge edge)
getTargetNode in interface HierarchySupportcontext - The current write context.edge - The edge to test.
public static GroupingBasedHierarchySupport newInstance(Graph graph)
GroupingBasedHierarchySupport for
the given graph. This method requires
GroupingKeys that define the
graph's nesting structure.
graph - The graph whose nesting structure is defined by
GroupingKeys.
GroupingBasedHierarchySupport or
null if the given graph has no associated
GroupingKeys.Grouping.isGrouped(y.base.Graph)
|
© Copyright 2000-2025, yWorks GmbH. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||