11The Java binding for the Neo4j Server REST API wraps the REST calls behind the well known
2- [ GraphDatabaseService] ( http://api.neo4j.org/1.2/org/neo4j/graphdb/GraphDatabaseService.html ) API.
2+ [ GraphDatabaseService] ( http://api.neo4j.org/1.8.M07/org/neo4j/graphdb/GraphDatabaseService.html ) API.
3+
4+ ** Please note** , that the performance semantics are not the same, as most of these operations will cause a network
5+ request to the server. Make sure to minimize the fine grained operations and rely more on cypher and traversals to get
6+ your data and on batching and cypher to update the graph.
7+
8+ You can also use the ` RestAPIFacade ` directly to interact with your Neo4j-Server, without the GraphDatabaseService Wrapper.
9+
10+ Note
11+ ----
12+ The behavior of "transactions" changed in 1.8, in 1.7 they were no-op, i.e. just ignored. So you could just leave them off to not confuse people.
13+
14+ In 1.8 it tries to collect all operations within a tx as a batch-operation which will then be executed on the server.
15+
16+ This has the implication that the results retrieved within that "tx" are not immediately available but only after you called tx.success and tx.finish
17+
18+
319
420Currently supports:
521___________________
622 * all the node and relationship operations
7- * the new Index API
8- * Basic Http Auth (Digest)
9- * preliminary traversal support
10- * cypher, gremlin support
11- * support for batch API
23+ * [ cypher operations] ( http://docs.neo4j.org/chunked/milestone/rest-api-cypher.html )
24+ * [ REST-batch operations] ( http://docs.neo4j.org/chunked/milestone/rest-api-batch-ops.html )
25+ * Basic Http Auth (Digest) (Important for using [ Neo4j on Heroku] ( https://devcenter.heroku.com/articles/neo4j )
26+ * index creation and index operations (add, get, query, delete)
27+ * (Auto Index configuration)[ http://docs.neo4j.org/chunked/milestone/rest-api-configurable-auto-indexes.html ]
28+ * limited [ traversal API] ( http://docs.neo4j.org/chunked/milestone/rest-api-traverse.html ) but with dynamic language support
1229 * preliminary support for arbitrary server plugins and extensions
30+ * gremlin support
1331
14- Open issues:
15- ____________
16- * full traversal support
17-
1832Usage:
1933------
2034
@@ -23,24 +37,21 @@ Build it locally. Then use the maven / ivy dependency or copy the jar into your
2337 <dependency>
2438 <groupId>org.neo4j</groupId>
2539 <artifactId>neo4j-rest-graphdb</artifactId>
26- <version>1.6.M02 </version>
40+ <version>1.8.M07 </version>
2741 </dependency>
2842
2943 GraphDatabaseService gds = new RestGraphDatabase("http://localhost:7474/db/data");
3044 GraphDatabaseService gds = new RestGraphDatabase("http://localhost:7474/db/data",username,password);
3145
46+ // or using the RestAPI directly
47+ RestAPI restAPI = new RestAPIFacade("http://localhost:7474/db/data",username,password);
48+
49+ // as a Spring Bean, e.g. in [Spring Data Neo4j](http://www.springsource.org/spring-data/neo4j)
3250 <bean id="graphDbService" class="org.neo4j.rest.graphdb.RestGraphDatabase" destroy-method="shutdown">
3351 <constructor-arg index="0" value="http://localhost:7474/db/data" />
3452 </bean>
3553 </pre>
3654
37- ** Please note: Transactions are not supported over this API.**
38-
39- Unit Test:
40- ----------
41- to start tests you will need the https://github.com/jexp/neo4j-clean-remote-db-addon to cleanup the database while
42-
43-
4455References / Community:
4556-----------------------
4657
0 commit comments