1

I'm using Neo4j API and Gephi API in Eclipse Java, and i want to import my Neo4j Database into Gephi, i'm using this part of code

//Import file
 String URL = "/res/test.graphdb";  
 Container container;
 try {
      File file = new File(getClass().getResource(URL).toURI());
      container = importController.importFile(file);
      container.getLoader().setEdgeDefault(EdgeDefault.UNDIRECTED);   
 } catch (Exception ex) {
      ex.printStackTrace();
      System.out.println(e);
      return;
 }

when i execute the code it shows this Error :

java.lang.NullPointerException

Because the variable container is always equal to null. But when i use a file .gexf or .gml in the URL it works perfectly.

So this is my question :

Is there a way to use Neo4j database in Gephi API ? or convert a Neo4j Databse into .graphml or .gexf to use it with Gephi API ?

Jon.Snow
  • 33
  • 4
  • I am not familiar with the Gephi API but I wouldn't expect it to have a Neo4j loader, since from the Gephi GUI you can't load Neo4j databases directly by opening them. There is a special plugin for that anyway. Would it be a solution for you to export you graph programmatically from Neo4j and load it to Gephi? – Yannis P. Feb 16 '16 at 12:20
  • There is a Neo4j plugin for Gephi available here: https://github.com/gephi/gephi-plugins/tree/neo4j-plugin – William Lyon Feb 16 '16 at 20:07

0 Answers0