문제

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();

    }
도움이 되었습니까?

해결책

you could either

Would that work?

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top