Neo4j…how to get a visual representation of my data?

可紊 提交于 2019-12-08 07:59:41

问题


I have loaded an embedded instance of Neo4j with some data, and would like to know how I can now view this graph. I saw an intro video here: http://video.neo4j.org/m9FD/how-to-get-started-with-neo4j-119/. Here the guy opened an instance in his web browser via Heroku and was able not only see the data in the graph, but also enter new data and search for both nodes and relationships. How do I see the data I have entered into the graph-database?

graphDb = new GraphDatabaseFactory().newEmbeddedDatabase( "var/graphDb" );
        registerShutdownHook(graphDb);

        WrappingNeoServerBootstrapper srv = new WrappingNeoServerBootstrapper( graphDb );
        srv.start();

        for (Statement s : statements){

            Transaction tx = graphDb.beginTx();
            try{
                firstNode = graphDb.createNode();
                firstNode.setProperty("message", s.getFirstTerm());
                secondNode = graphDb.createNode();
                secondNode.setProperty( "message", s.getSecondTerm());

                relation = firstNode.createRelationshipTo(secondNode, s.getRelationshipType());
                //relation.setProperty("message", "crazy cruel");
                tx.success();
            }
            finally{
                tx.finish();
            }
        }
        srv.stop();

    }

回答1:


you could either

  • fire up a server as part of your embedded instance, see http://docs.neo4j.org/chunked/snapshot/server-embedded.html
  • use Neoclipse and point it to your (shut down) database, see http://vimeo.com/12014944 aand https://github.com/neo4j/neoclipse

  • install Neo4j Server http://docs.neo4j.org/chunked/snapshot/server.html, point out your database and use the webadmin tool for visualization.

Would that work?



来源:https://stackoverflow.com/questions/12043402/neo4j-how-to-get-a-visual-representation-of-my-data

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!