|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.io.graphml.GraphMLHandler y.io.graphml.graph2d.Graph2DGraphMLHandler
public class Graph2DGraphMLHandler
This class adds configuration to GraphMLHandler
for handling Graph2D
instances.
The following configuration is added:
GraphElementFactory
and HierarchySupport
that handle hierarchy information from HierarchyManager
, and set/write Realizer information.NodeRealizerSerializer
and EdgeRealizerSerializer
implementations for all Realizers in the core yFiles library. Registers
(de)serialization callbacks for labels, embedded images and other common content.NodeRealizerSerializer
and EdgeRealizerSerializer
instances.
Nested Class Summary |
---|
Constructor Summary | |
---|---|
Graph2DGraphMLHandler()
|
Method Summary | |
---|---|
void |
addEdgeRealizerSerializer(EdgeRealizerSerializer ers)
Register a EdgeRealizerSerializer instance. |
void |
addNodeRealizerSerializer(NodeRealizerSerializer nrs)
Register a NodeRealizerSerializer instance. |
protected void |
configureDefaultRealizerSerializers()
Registers RealizerSerializers for all Realizer types in the yFiles for Java library. |
protected void |
configureDeserializationHandlers(Graph graph,
GraphMLParser parser)
Adds deserialization handlers for structured representation of Java framework classes Font ,
Color ,
Boolean ,
Byte ,
Short ,
Integer ,
Long ,
Float ,
Double ,
String , and
TransformAttribute . |
protected void |
configureDeserializationProperties(Graph graph,
GraphMLParser parser)
Configure important deserialization properties of GraphMLHandler . |
protected void |
configureGraphMLParser(Graph graph,
GraphMLParser graphMLParser)
Registers a ParseEventListener for the yfiles.foldertype
attribute. |
protected void |
configureGraphMLWriter(Graph graph,
GraphMLWriter graphMLWriter)
Registers a WriteEventListener for the yfiles.foldertype
attribute. |
protected void |
configureInputHandlers(Graph graph,
GraphMLParser parser)
Registers input handlers for Node- and EdgeRealizers, NodePorts, PostProcessors and embedded resources. |
protected void |
configureLookup(Graph graph,
GraphMLParser parser)
Adds HierarchySupport and embedded resource support to the base lookup. |
protected void |
configureLookup(Graph graph,
GraphMLWriter writer)
Adds HierarchySupport and embedded resource support to the base lookup. |
protected void |
configureOutputHandlers(Graph graph,
GraphMLWriter writer)
Registers output handlers for Node- and EdgeRealizers, NodePorts, and embedded resources. |
protected void |
configureSerializationHandlers(Graph graph,
GraphMLWriter writer)
Adds serialization handlers for structured representation of Java framework classes Font ,
Color ,
Boolean ,
Byte ,
Short ,
Integer ,
Long ,
Float ,
Double ,
String , and
TransformAttribute . |
protected void |
configureSerializationProperties(Graph graph,
GraphMLWriter writer)
Configure important serialization properties of GraphMLHandler . |
protected GraphElementFactory |
createGraphElementFactory(GraphMLParser parser,
Graph graph)
Create an GraphElementFactory instance that creates the graph elements for the graph instance. |
protected HierarchySupport |
createHierarchySupport(Graph graph,
GraphMLWriter writer)
|
protected InputHandlerProvider |
createNodePortReaderProvider()
Creates a provider for NodePortGraphicsReader ,
NodePortGeometryReader , and NodePortUserDataReader . |
protected OutputHandlerProvider |
createNodePortWriterHandlerProvider()
Creates a provider for NodePortGraphicsWriter ,
NodePortGeometryWriter , and NodePortUserDataWriter . |
protected InputHandlerProvider |
createPostprocessorInputHandlerProvider()
Creates a provider for PostprocessorInputHandler . |
protected InputHandlerProvider |
createReadEdgeRealizerHandlerProvider()
Creates a provider for ReadEdgeRealizerHandler . |
protected InputHandlerProvider |
createReadNodeRealizerHandlerProvider()
Creates a provider for ReadNodeRealizerHandler . |
protected InputHandlerProvider |
createResourceInputHandlerProvider()
Creates a provider that registers a handler for reading shared resources. |
protected OutputHandlerProvider |
createResourceOutputHandlerProvider()
Creates a provider that registers a handler for writing shared resources. |
protected OutputHandlerProvider |
createWriteEdgeRealizerHandlerProvider()
Creates a provider for WriteEdgeRealizerHandler . |
protected OutputHandlerProvider |
createWriteNodeRealizerHandlerProvider()
Creates a provider for WriteNodeRealizerHandler . |
void |
removeEdgeRealizerSerializer(EdgeRealizerSerializer ers)
Unregister a EdgeRealizerSerializer instance that has been registered with addEdgeRealizerSerializer(EdgeRealizerSerializer) |
void |
removeNodeRealizerSerializer(NodeRealizerSerializer nrs)
Unregister a NodeRealizerSerializer instance that has been registered with addNodeRealizerSerializer(NodeRealizerSerializer) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Graph2DGraphMLHandler()
Method Detail |
---|
protected void configureLookup(Graph graph, GraphMLWriter writer)
configureLookup
in class GraphMLHandler
graph
- The Graph that is writtenwriter
- The writer to configure.GraphMLWriter.setLookup(Class,Object)
protected HierarchySupport createHierarchySupport(Graph graph, GraphMLWriter writer)
protected void configureInputHandlers(Graph graph, GraphMLParser parser)
Calls
createPostprocessorInputHandlerProvider()
,
createReadEdgeRealizerHandlerProvider()
,
createReadNodeRealizerHandlerProvider()
,
createNodePortReaderProvider()
, and
createResourceInputHandlerProvider()
.
configureInputHandlers
in class GraphMLHandler
graph
- The graph that will be parsedparser
- The parser to configure.protected InputHandlerProvider createNodePortReaderProvider()
NodePortGraphicsReader
,
NodePortGeometryReader
, and NodePortUserDataReader
.
Called from configureInputHandlers(y.base.Graph, y.io.graphml.input.GraphMLParser)
.
NodePortGraphicsReader
,
NodePortGeometryReader
, and NodePortUserDataReader
.protected InputHandlerProvider createPostprocessorInputHandlerProvider()
PostprocessorInputHandler
.
Called from configureInputHandlers(y.base.Graph, y.io.graphml.input.GraphMLParser)
.
PostprocessorInputHandler
.protected InputHandlerProvider createReadEdgeRealizerHandlerProvider()
ReadEdgeRealizerHandler
.
Called from configureInputHandlers(y.base.Graph, y.io.graphml.input.GraphMLParser)
.
ReadEdgeRealizerHandler
.protected InputHandlerProvider createReadNodeRealizerHandlerProvider()
ReadNodeRealizerHandler
.
Called from configureInputHandlers(y.base.Graph, y.io.graphml.input.GraphMLParser)
.
ReadNodeRealizerHandler
.protected InputHandlerProvider createResourceInputHandlerProvider()
configureInputHandlers(y.base.Graph, y.io.graphml.input.GraphMLParser)
.
protected void configureOutputHandlers(Graph graph, GraphMLWriter writer)
Calls
createWriteNodeRealizerHandlerProvider()
,
createWriteEdgeRealizerHandlerProvider()
,
createNodePortWriterHandlerProvider()
, and
createResourceOutputHandlerProvider()
.
configureOutputHandlers
in class GraphMLHandler
graph
- The graph that will be writtenwriter
- The writer to configure.protected OutputHandlerProvider createResourceOutputHandlerProvider()
configureOutputHandlers(y.base.Graph, y.io.graphml.output.GraphMLWriter)
.
protected OutputHandlerProvider createNodePortWriterHandlerProvider()
NodePortGraphicsWriter
,
NodePortGeometryWriter
, and NodePortUserDataWriter
.
Called from configureOutputHandlers(y.base.Graph, y.io.graphml.output.GraphMLWriter)
.
NodePortGraphicsWriter
,
NodePortGeometryWriter
, and NodePortUserDataWriter
.protected OutputHandlerProvider createWriteEdgeRealizerHandlerProvider()
WriteEdgeRealizerHandler
.
Called from configureOutputHandlers(y.base.Graph, y.io.graphml.output.GraphMLWriter)
.
WriteEdgeRealizerHandler
.protected OutputHandlerProvider createWriteNodeRealizerHandlerProvider()
WriteNodeRealizerHandler
.
Called from configureOutputHandlers(y.base.Graph, y.io.graphml.output.GraphMLWriter)
.
WriteNodeRealizerHandler
.protected void configureSerializationHandlers(Graph graph, GraphMLWriter writer)
Font
,
Color
,
Boolean
,
Byte
,
Short
,
Integer
,
Long
,
Float
,
Double
,
String
, and
TransformAttribute
.
configureSerializationHandlers
in class GraphMLHandler
graph
- The graph that will be written.writer
- The writer to configure.protected void configureDeserializationHandlers(Graph graph, GraphMLParser parser)
Font
,
Color
,
Boolean
,
Byte
,
Short
,
Integer
,
Long
,
Float
,
Double
,
String
, and
TransformAttribute
.
configureDeserializationHandlers
in class GraphMLHandler
graph
- The graph that will be parsed.parser
- The parser to configure.protected void configureLookup(Graph graph, GraphMLParser parser)
configureLookup
in class GraphMLHandler
graph
- The graph that is parsedparser
- The parser to configure.GraphMLParser.setLookup(Class,Object)
protected void configureGraphMLWriter(Graph graph, GraphMLWriter graphMLWriter)
WriteEventListener
for the yfiles.foldertype
attribute.
configureGraphMLWriter
in class GraphMLHandler
graph
- The graph that is writtengraphMLWriter
- The writer to configure.protected void configureGraphMLParser(Graph graph, GraphMLParser graphMLParser)
ParseEventListener
for the yfiles.foldertype
attribute.
configureGraphMLParser
in class GraphMLHandler
graph
- The graph that is parsed.graphMLParser
- the parser to configure.protected GraphElementFactory createGraphElementFactory(GraphMLParser parser, Graph graph)
GraphMLHandler
GraphElementFactory
instance that creates the graph elements for the graph
instance.
createGraphElementFactory
in class GraphMLHandler
parser
- The parser to use.graph
- The graph that is populated.
GraphElementFactory
instance that is configured for the given parameters.protected void configureDefaultRealizerSerializers()
protected void configureSerializationProperties(Graph graph, GraphMLWriter writer)
GraphMLHandler
.
configureSerializationProperties
in class GraphMLHandler
graph
- The graph to write.writer
- The writer to configure.GraphMLWriter.setSerializationProperty(Object,Object)
protected void configureDeserializationProperties(Graph graph, GraphMLParser parser)
GraphMLHandler
GraphMLHandler
.
configureDeserializationProperties
in class GraphMLHandler
graph
- The graph to parse.parser
- The parser to configure.GraphMLParser.setDeserializationProperty(Object,Object)
public void addNodeRealizerSerializer(NodeRealizerSerializer nrs)
nrs
- The NodeRealizerSerializer to register.public void addEdgeRealizerSerializer(EdgeRealizerSerializer ers)
ers
- The EdgeRealizerSerializer to register.public void removeNodeRealizerSerializer(NodeRealizerSerializer nrs)
addNodeRealizerSerializer(NodeRealizerSerializer)
nrs
- The NodeRealizerSerializer to unregister.addNodeRealizerSerializer(NodeRealizerSerializer)
public void removeEdgeRealizerSerializer(EdgeRealizerSerializer ers)
addEdgeRealizerSerializer(EdgeRealizerSerializer)
ers
- The EdgeRealizerSerializer to unregister.addEdgeRealizerSerializer(EdgeRealizerSerializer)
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |