|
Search this API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.io.graphml.GraphMLHandler
y.io.graphml.layout.LayoutGraphMLHandler
public class LayoutGraphMLHandler
Handles serialization and deserialization of LayoutGraph instances.
Essentially, this class registers simple input and output handlers for
reading and writing edge and node layout information.
![]() |
![]() |
![]() |
![]() |
| Nested Class Summary |
|---|
| Constructor Summary | |
|---|---|
LayoutGraphMLHandler()
Initializes a new LayoutGraphMLHandler instance. |
|
| Method Summary | |
|---|---|
protected void |
configureGraphMLParser(Graph graph,
GraphMLParser parser)
Adds support for deserializing nested graphs. |
protected void |
configureGraphMLWriter(Graph graph,
GraphMLWriter writer)
Adds support for serializing nested graphs with group nodes and normal nodes. |
protected void |
configureInputHandlers(Graph graph,
GraphMLParser parser)
Registers input handlers for edge and node layout information. |
protected void |
configureLookup(Graph graph,
GraphMLWriter writer)
Adds support for serializing nested graphs with group nodes and normal nodes. |
protected void |
configureOutputHandlers(Graph graph,
GraphMLWriter writer)
Registers output handlers for edge and node layout information. |
protected InputHandlerProvider |
createEdgeLayoutInputHandlerProvider()
Creates a provider for EdgeLayoutInputHandler. |
protected OutputHandlerProvider |
createEdgeLayoutOutputHandlerProvider()
Creates a provider for EdgeLayoutOutputHandler. |
protected ParseEventListener |
createFolderTypeReader(Graph graph,
GraphMLParser parser)
Creates a ParseEventListener that parses
yfiles.foldertype attributes. |
protected WriteEventListener |
createFolderTypeWriter(Graph graph,
GraphMLWriter writer)
Creates a WriteEventListener instance that marks group nodes. |
protected GraphElementFactory |
createGraphElementFactory(GraphMLParser parser,
Graph graph)
Creates a graph element factory that supports nesting information for GroupingKeys that reference
DataAcceptor implementations. |
protected HierarchySupport |
createHierarchySupport(Graph graph,
GraphMLWriter writer)
Creates a HierarchySupport instance that supports group nodes
and normal nodes. |
protected InputHandlerProvider |
createNodeLayoutInputHandlerProvider()
Creates a provider for NodeLayoutInputHandler. |
protected OutputHandlerProvider |
createNodeLayoutOutputHandlerProvider()
Creates a provider for NodeLayoutOutputHandler. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LayoutGraphMLHandler()
LayoutGraphMLHandler instance.
| Method Detail |
|---|
protected void configureGraphMLParser(Graph graph,
GraphMLParser parser)
configureGraphMLParser in class GraphMLHandlergraph - The graph that should be filled by this instance.parser - The parser to configure.createFolderTypeReader(y.base.Graph, y.io.graphml.input.GraphMLParser)
protected ParseEventListener createFolderTypeReader(Graph graph,
GraphMLParser parser)
ParseEventListener that parses
yfiles.foldertype attributes.
The default implementation sets creation properties
IS_GROUP_NODE and
IS_FOLDER_NODE depending
on yfiles.foldertype values.
Called from
configureGraphMLParser(y.base.Graph, y.io.graphml.input.GraphMLParser).
May return null.
graph - The graph that should be filled by this instance.parser - The parser to configure.
ParseEventListener that parses
yfiles.foldertype attributes or null if those
attributes should be ignored.configureGraphMLParser(y.base.Graph, y.io.graphml.input.GraphMLParser)
protected GraphElementFactory createGraphElementFactory(GraphMLParser parser,
Graph graph)
GroupingKeys that reference
DataAcceptor implementations.
createGraphElementFactory in class GraphMLHandlerparser - The parser to use.graph - The graph that is populated.
GraphElementFactory instance.GroupingBasedGraphElementFactory
protected void configureInputHandlers(Graph graph,
GraphMLParser parser)
Calls
createNodeLayoutInputHandlerProvider(), and
createEdgeLayoutInputHandlerProvider().
configureInputHandlers in class GraphMLHandlergraph - The graph that will be parsedparser - The parser to configure.protected InputHandlerProvider createEdgeLayoutInputHandlerProvider()
EdgeLayoutInputHandler.
Called from configureInputHandlers(y.base.Graph, y.io.graphml.input.GraphMLParser).
EdgeLayoutInputHandler.protected InputHandlerProvider createNodeLayoutInputHandlerProvider()
NodeLayoutInputHandler.
Called from configureInputHandlers(y.base.Graph, y.io.graphml.input.GraphMLParser).
NodeLayoutInputHandler.
protected void configureGraphMLWriter(Graph graph,
GraphMLWriter writer)
configureGraphMLWriter in class GraphMLHandlergraph - The graph to write.writer - The writer to configure.createFolderTypeWriter(y.base.Graph, y.io.graphml.output.GraphMLWriter),
configureLookup(y.base.Graph, y.io.graphml.output.GraphMLWriter)
protected WriteEventListener createFolderTypeWriter(Graph graph,
GraphMLWriter writer)
WriteEventListener instance that marks group nodes.
The default implementation uses the HierarchySupport instance
in the event's context to determine if a node is
leaf
node or not and adds a yfiles.foldertype="group" attribute
to XML elements corresponding to non-leaf nodes.
Called from
configureGraphMLWriter(y.base.Graph, y.io.graphml.output.GraphMLWriter).
May return null.
graph - The graph to write.writer - The writer to configure.
WriteEventListener that marks group nodes or
null if nodes should not be marked.configureGraphMLWriter(y.base.Graph, y.io.graphml.output.GraphMLWriter)
protected void configureLookup(Graph graph,
GraphMLWriter writer)
configureLookup in class GraphMLHandlergraph - The graph to write.writer - The writer to configure.createHierarchySupport(y.base.Graph, y.io.graphml.output.GraphMLWriter),
configureGraphMLWriter(y.base.Graph, y.io.graphml.output.GraphMLWriter)
protected HierarchySupport createHierarchySupport(Graph graph,
GraphMLWriter writer)
HierarchySupport instance that supports group nodes
and normal nodes.
The default implementation returns a GroupingBasedHierarchySupport
if the given graph has associated
GroupingKeys that define
the graph's nesting structure.
Called from
configureLookup(y.base.Graph, y.io.graphml.output.GraphMLWriter).
May return null.
graph - The graph to write.writer - The writer to configure.
GroupingBasedHierarchySupport instance or
null if a graph's nesting structure should not be serialized.Grouping.isGrouped(y.base.Graph),
configureLookup(y.base.Graph, y.io.graphml.output.GraphMLWriter)
protected void configureOutputHandlers(Graph graph,
GraphMLWriter writer)
Calls
createEdgeLayoutOutputHandlerProvider(), and
createNodeLayoutOutputHandlerProvider().
configureOutputHandlers in class GraphMLHandlergraph - The graph that will be writtenwriter - The writer to configure.protected OutputHandlerProvider createEdgeLayoutOutputHandlerProvider()
EdgeLayoutOutputHandler.
Called from configureOutputHandlers(y.base.Graph, y.io.graphml.output.GraphMLWriter).
EdgeLayoutOutputHandler.protected OutputHandlerProvider createNodeLayoutOutputHandlerProvider()
NodeLayoutOutputHandler.
Called from configureOutputHandlers(y.base.Graph, y.io.graphml.output.GraphMLWriter).
NodeLayoutOutputHandler.
|
© Copyright 2000-2025, yWorks GmbH. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||