Skip to content
Simple streaming graphml file format writer with support for generating yEd shaped graphic nodes and edges
Branch: develop
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
doc/images Added example in the readme Jun 15, 2016
src Added points to paths Jun 24, 2016
.gitignore added git ignore / changed file mode Jun 12, 2016
.travis.yml Added jdk hint for travis Jun 18, 2016
LICENSE-2.0.txt Added apache license Jun 16, 2016 Enhanced readme and removed clutter Jun 20, 2016
pom.xml set version for compiler plugin Jun 27, 2016


The library is intended to be used as a sequential writer for the GraphML file format:

This library writes XML nodes, graphs and edges with necessary namespace initialization ahead.

There is explicitly no graph model, complex layout logic or any other fancy stuff. This library just writes. Note: All objects which define a graphic state could be reused after they are written to the stream, so a minimal processing memory footprint is possible.

Typically this is where you start with:

  1. Build a nice graph model with any of the freely available libraries or your own
  2. Do some operations on the graph, express your relations etc.
  3. Use this library to write a representational GraphML file
  4. View it in an external tool, like yEd or any other GraphML supporting renderer

Furthermore it has support for writing yEd ( compatible graphic nodes and edges.

Example code to render a simple graph

	GraphWriter graphWriter = new GraphWriter(new FileOutputStream("target/simple.graphml"));

	YedNode<ShapeNode> node = new YedNode<>(ShapeNode.asRectangle(0d, 0d, 250d, 30d, "Data"));
	// write the node
	graphWriter.node(node, graphWriter.getNextId());
	// re-set text for next node
	node.nodeGraphics.firstLabel().text = "Task1";
	// adjust y coordinate
	node.nodeGraphics.geometry.y = 250d;
	// write the next node
	graphWriter.node(node, graphWriter.getNextId());
		edgeGraphics = new PolyLineEdge();
	edgeGraphics.addLabel(EdgeLabel.sourceHead("source head"));
		edge = new YedEdge<>(edgeGraphics);
	// write the edge, connecting from node "2" to "1"
	graphWriter.edge(edge, graphWriter.getNextId(), "2", "1");

[Resulting graph, viewed in yEd]

Dependency for maven projects



Travis CI: Build Status

You can’t perform that action at this time.