Ali
Ali

Reputation: 617

Importing GraphML files in JUNG

I am new to JUNG, can any one show me how to import a GraphML to JUNG.

Upvotes: 1

Views: 1651

Answers (1)

Pieter-Jan
Pieter-Jan

Reputation: 1685

I'm not sure if you're working with a database, but if you are this is very easy with Neo4J. Neo4J supports import/export from .graphml files. Once you have everything done, you can hook up your Neo4J database to JUNG using blueprints. It takes no more than 2 lines of code:

com.tinkerpop.blueprints.Graph g = new Neo4JGraph(gds);
GraphJung gj = new GraphJung(g);

In which gds is the GraphDatabaseService object from Neo4J. Like I said, very easy, and you can imagine the possibilities with a powerful graph database behind your application.

Upvotes: 1

Related Questions