Accessing Neo4j using the Java REST bindings
Neo4j can also be accessed using the Java REST bindings, which allows it to be accessed from remote nodes easily. In this recipe, we will take a look at the ways of accessing Neo4j from Java using the REST bindings.
Getting ready
The Neo4j REST interface provides an easy way to access Neo4j graph database remotely.
Follow these instructions to go through this recipe:
Start the Neo4j graph database server using the following command:
$ ./neo4j start
To check whether the REST interface is running fine, open http://localhost:7474/db/data/
in a browser.
How to do it...
This problem can be dealt with in two ways, which are described as follows:
Developing your own Neo4j REST client
There are many REST Java client libraries that can be utilized to write your own REST API client for Neo4j. The bad part is that you have to deal with all the possible scenarios and error cases. One example is using the Jersey client, which is shown in the following code:
final String...