GraphML I/O Demos

The following demos show how to use, customize, and extend the GraphML input and output facilities provided by yFiles.

Class Description
demo.io.graphml.GraphMLDemoDemonstrates basic usage of GraphMLIOHandler to load and save in the GraphML file format.
demo.io.graphml.GenericNodeRealizerDemoDemonstrates how to create customized node realizers of type GenericNodeRealizer, how to add user data and how to read and write these customized types in GraphML format.
demo.io.graphml.CustomNodeRealizerSerializerDemo A simple customization of the basic GraphMLDemo that uses objects of type CustomNodeRealizer as the graph's default node realizer. To enable encoding and parsing of this node realizer type a specific serializer implementation is registered with the GraphMLIOHandler.
demo.io.graphml.CustomNodeRealizerCustom NodeRealizer for use with CustomNodeRealizerSerializerDemo.
demo.io.graphml.CustomNodeRealizerSerializerCustom NodeRealizerSerializer that handles GraphML reading and writing of CustomNodeRealizer.
demo.io.graphml.SimpleAttributesDemoDemonstrates how to configure GraphMLIOHandler to be able to handle extra node and edge and of simple type. Additional data for a node or an edge can be edited by right-clicking on the corresponding element.
demo.io.graphml.DynamicAttributesDemoDemonstrates how to configure GraphMLIOHandler to be able to handle attributes dynamically.
demo.io.graphml.PostprocessorDemoDemonstrates postprocessing actions that can be specified within a GraphML file. These actions allow to process the parsed graph structure before it gets returned by the GraphML parser.
demo.io.graphml.XmlXslDemo Demonstrates how to use class XmlXslIOHandler to read XML content with the help of additional style sheets.

Running the Demos

From Within an IDE

Set <yFilesDir>/src as your source directory. Then add <yFilesDir>/lib/y.jar and the source folder <yFilesDir>/src to your classpath. Now you should be ready to compile and run all executable demo classes.

With Ant

First make sure you have the build tool Ant installed on your system. Now you can use the demo build script build.xml located in <yFilesDir>/src/demo to launch each demo by specifying its simple class name as a target. Alternatively, launch the interactive demo driver by specifying run as target to conveniently access all demos.