我在我的Neo4j服務器上安裝了Tinkerpop Gremlin插件。如何使用藍圖API連接到Neo4j服務器?
我想從Java連接到它並執行的Gremlin查詢和我按照本指南:https://github.com/tinkerpop/gremlin/wiki/Using-Gremlin-through-Java
我會在第一行權卡住:
Graph g = ... // a reference to a Blueprints graph
我應該給這裏實例化g
?
我有工作Cypher
的例子,我嘗試將g
實例化爲RestAPIFacade。但它不會那樣工作。
編輯: 我現在看到,Neo4jGraph是我失蹤的實現(我錯過了依賴藍圖neo4j圖)。
Graph g = new Neo4jGraph(GraphDatabaseService)
我仍然缺少關於如何使用GraphDatabaseService的信息。
這樣的事情? Graph graph = TinkerGraphFactory.createTinkerGraph(); (向下滾動...) –
這就是製作新圖。我正嘗試連接到服務器。我明白了,我應該問的問題是如何打開與GraphDatabaseService的連接,然後才能使用圖表類 –
從那以後有什麼好運氣?我在完全相同的問題... –