Skip to content
This repository was archived by the owner on Nov 19, 2019. It is now read-only.

neo4j-contrib/cypher-http-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

cypher-http-examples

Examples on how to connect to the Cypher endpoints from Java with different http libraries

Infrastructure

There is a CypherClient interface with different implementations for different http libraries.

public interface CypherClient {
    ExecutionResult query(String statement, Map<String,Object> params);
}
```

`ExecutionResult` is an interface with methods: 

public interface ExecutionResult extends Iterable<List> { List getColumns();

Iterator<List<Object>> iterator();

Iterator<Map<String,Object>> rowIterator();

}


A `Util` class takes care of URL handling, JSON conversion and postData and `ExecutionResult` instantiation.

## Jersey 

Uses `Client, WebResource and ClientResponse` to access the Cypher endpoint.

````xml
      <dependency>
          <groupId>com.sun.jersey</groupId>
          <artifactId>jersey-client</artifactId>
          <version>1.9</version>
      </dependency>

About

Examples on how to connect to the Cypher endpoints from Java with different http libraries

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages