Search this API

y.io.graphml.graph2d
Class Graph2DGraphMLHandler

java.lang.Object
  extended by y.io.graphml.GraphMLHandler
      extended by y.io.graphml.graph2d.Graph2DGraphMLHandler

public class Graph2DGraphMLHandler
extends GraphMLHandler

This class adds configuration to GraphMLHandler for handling Graph2D instances.

The following configuration is added:

 

Nested Class Summary
 
Nested classes/interfaces inherited from class y.io.graphml.GraphMLHandler
GraphMLHandler.BoolDataAcceptorInputHandler, GraphMLHandler.BooleanDataProviderOutputHandler, GraphMLHandler.DoubleDataAcceptorInputHandler, GraphMLHandler.DoubleDataProviderOutputHandler, GraphMLHandler.FloatDataAcceptorInputHandler, GraphMLHandler.FloatDataProviderOutputHandler, GraphMLHandler.InputHandlerQueryPredicate, GraphMLHandler.IntDataAcceptorInputHandler, GraphMLHandler.IntDataProviderOutputHandler, GraphMLHandler.LongDataAcceptorInputHandler, GraphMLHandler.LongDataProviderOutputHandler, GraphMLHandler.StringDataAcceptorInputHandler, GraphMLHandler.StringDataProviderOutputHandler
 
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 configureDeserializationProperties(Graph graph, GraphMLParser parser)
          Configure important deserialization properties of GraphMLHandler.
protected  void configureInputHandlers(Graph graph, GraphMLParser parser)
          Register input handlers for Node- and EdgeRealizers, 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)
          Register output handlers for Node- and EdgeRealizers, PostProcessors and embedded resources.
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  GraphMLParser createGraphMLParser(Graph graph)
          Creates a parser and registers a ParseEventListener for the yfiles.foldertype attribute.
protected  GraphMLWriter createGraphMLWriter(Graph graph)
          Creates a writer and registers a WriteEventListener for the yfiles.foldertype attribute.
protected  HierarchySupport createHierarchySupport(Graph graph, GraphMLWriter writer)
           
 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 y.io.graphml.GraphMLHandler
addDeserializationHandler, addInputDataAcceptor, addInputDataAcceptor, addInputDataAcceptor, addInputDataAcceptor, addInputDataAcceptor, addInputDataAcceptor, addInputDataAcceptorFuture, addInputDataAcceptorFuture, addInputDataAcceptorFuture, addInputHandlerProvider, addNamespace, addOutputDataProvider, addOutputDataProvider, addOutputDataProvider, addOutputDataProvider, addOutputHandlerProvider, addParseEventListener, addRegisteredOutputDataProvider, addRegisteredOutputDataProvider, addRegisteredOutputDataProvider, addSchemaLocation, addSerializationHandler, addWriteEventListener, configureDeserializationHandlers, configureNamespaces, configureParseEvents, configureSchemaLocations, configureSerializationHandlers, configureWriteEvents, configureXMLWriter, createXMLWriter, createXMLWriter, fireDeserializationEvent, fireQueryInputHandlersProviders, fireQueryOutputHandlersEvent, fireSerializationEvent, getDeserializationProperty, getKeyName, getKeyScope, getKeyType, getKeyUri, getSerializationProperty, isClearGraphBeforeRead, isWriteXMLSchema, matchesName, matchesScope, matchesType, matchesUri, onGraphMLParserHandleDeserialization, onGraphMLParserQueryInputHandlers, onGraphMLWriterHandleSerialization, onGraphMLWriterQueryOutputHandlers, read, read, removeDeserializationHandler, removeDeserializationProperty, removeInputHandlerProvider, removeOutputHandlerProvider, removeParseEventListener, removeSerializationHandler, removeSerializationProperty, removeWriteEventListener, setClearGraphBeforeRead, setDeserializationProperty, setSerializationProperty, setWriteXMLSchema, write, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Graph2DGraphMLHandler

public Graph2DGraphMLHandler()
Method Detail

configureLookup

protected void configureLookup(Graph graph,
                               GraphMLWriter writer)
Adds HierarchySupport and embedded resource support to the base lookup.

Overrides:
configureLookup in class GraphMLHandler
Parameters:
graph - The Graph that is written
writer - The writer to configure.
See Also:
GraphMLWriter.setLookup(Class,Object)

createHierarchySupport

protected HierarchySupport createHierarchySupport(Graph graph,
                                                  GraphMLWriter writer)

configureInputHandlers

protected void configureInputHandlers(Graph graph,
                                      GraphMLParser parser)
Register input handlers for Node- and EdgeRealizers, PostProcessors and embedded resources.

Overrides:
configureInputHandlers in class GraphMLHandler
Parameters:
graph - The graph that will be parsed
parser - The parser to configure.

configureOutputHandlers

protected void configureOutputHandlers(Graph graph,
                                       GraphMLWriter writer)
Register output handlers for Node- and EdgeRealizers, PostProcessors and embedded resources.

Overrides:
configureOutputHandlers in class GraphMLHandler
Parameters:
graph - The graph that will be written
writer - The writer to configure.

configureLookup

protected void configureLookup(Graph graph,
                               GraphMLParser parser)
Adds HierarchySupport and embedded resource support to the base lookup.

Overrides:
configureLookup in class GraphMLHandler
Parameters:
graph - The graph that is parsed
parser - The parser to configure.
See Also:
GraphMLParser.setLookup(Class,Object)

createGraphMLWriter

protected GraphMLWriter createGraphMLWriter(Graph graph)
Creates a writer and registers a WriteEventListener for the yfiles.foldertype attribute.

Overrides:
createGraphMLWriter in class GraphMLHandler
Parameters:
graph - The graph that is written
Returns:
A new core writer instance.

createGraphMLParser

protected GraphMLParser createGraphMLParser(Graph graph)
Creates a parser and registers a ParseEventListener for the yfiles.foldertype attribute.

Overrides:
createGraphMLParser in class GraphMLHandler
Parameters:
graph - The graph that is parsed.
Returns:
A new core parser instance.

createGraphElementFactory

protected GraphElementFactory createGraphElementFactory(GraphMLParser parser,
                                                        Graph graph)
Description copied from class: GraphMLHandler
Create an GraphElementFactory instance that creates the graph elements for the graph instance.

Overrides:
createGraphElementFactory in class GraphMLHandler
Parameters:
parser - The parser to use.
graph - The graph that is populated.
Returns:
An GraphElementFactory instance that is configured for the given parameters.

configureDefaultRealizerSerializers

protected void configureDefaultRealizerSerializers()
Registers RealizerSerializers for all Realizer types in the yFiles for Java library.


configureSerializationProperties

protected void configureSerializationProperties(Graph graph,
                                                GraphMLWriter writer)
Configure important serialization properties of GraphMLHandler.

Overrides:
configureSerializationProperties in class GraphMLHandler
Parameters:
graph - The graph to write.
writer - The writer to configure.
See Also:
GraphMLWriter.setSerializationProperty(Object,Object)

configureDeserializationProperties

protected void configureDeserializationProperties(Graph graph,
                                                  GraphMLParser parser)
Description copied from class: GraphMLHandler
Configure important deserialization properties of GraphMLHandler.

Overrides:
configureDeserializationProperties in class GraphMLHandler
Parameters:
graph - The graph to parse.
parser - The parser to configure.
See Also:
GraphMLParser.setDeserializationProperty(Object,Object)

addNodeRealizerSerializer

public void addNodeRealizerSerializer(NodeRealizerSerializer nrs)
Register a NodeRealizerSerializer instance.

Parameters:
nrs - The NodeRealizerSerializer to register.

addEdgeRealizerSerializer

public void addEdgeRealizerSerializer(EdgeRealizerSerializer ers)
Register a EdgeRealizerSerializer instance.

Parameters:
ers - The EdgeRealizerSerializer to register.

removeNodeRealizerSerializer

public void removeNodeRealizerSerializer(NodeRealizerSerializer nrs)
Unregister a NodeRealizerSerializer instance that has been registered with addNodeRealizerSerializer(NodeRealizerSerializer)

Parameters:
nrs - The NodeRealizerSerializer to unregister.
See Also:
addNodeRealizerSerializer(NodeRealizerSerializer)

removeEdgeRealizerSerializer

public void removeEdgeRealizerSerializer(EdgeRealizerSerializer ers)
Unregister a EdgeRealizerSerializer instance that has been registered with addEdgeRealizerSerializer(EdgeRealizerSerializer)

Parameters:
ers - The EdgeRealizerSerializer to unregister.
See Also:
addEdgeRealizerSerializer(EdgeRealizerSerializer)

© Copyright 2000-2011,
yWorks GmbH.
All rights reserved.