Hey everyone,

* Emil asked me to post this to the Neo mailing list.

I just built a GraphML stream parser for TinkerGraph graphs (an in-memory,
bare-bone graph framework writing in Java). Given that the TinkerGraph
data model is identical to the Neo4j data model, you might be interested
for two reasons -- its simple and its a serialization that makes sense.

So here is an example XML representation of this graph [
http://tinkerpop.com/docs/graph-example-1.jpg ]

http://github.com/tinkerpop/gremlin/raw/53ffea1441cb614fe17d86662ef783abc8cc771f/trunk/src/test/resources/com/tinkerpop/gremlin/db/tg/graph-example-1.xml

And then here is the StAX parser I wrote in under 30 minutes with test cases.

http://github.com/tinkerpop/gremlin/raw/53ffea1441cb614fe17d86662ef783abc8cc771f/trunk/src/main/java/com/tinkerpop/gremlin/db/tg/parser/TinkerGraphML.java

[TEST CASE:
http://github.com/tinkerpop/gremlin/raw/53ffea1441cb614fe17d86662ef783abc8cc771f/trunk/src/test/java/com/tinkerpop/gremlin/db/tg/parser/TinkerGraphMLTest.java
]

You guys might want to support a GraphML representation such as this.
Moreover, I'm going to generalize this parser to work for the General
Graph API (not just TinkerGraph) and thus, can be used to build Neo4j
graphs if that happens to be the backend.

FINAL NOTE: Right now TinkerGraph and the General Graph API are in Gremlin
[ http://github.com/tinkerpop/gremlin ], but as they develop, they will be
moved out and become their own packages.

See ya,
Marko.

http://markorodriguez.com
_______________________________________________
Neo mailing list
[email protected]
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to