Mercurial > hg > Members > nobuyasu > TestNeo4j
changeset 2:667546c44b36 draft
modify MakeNode.java
author | one |
---|---|
date | Fri, 17 Aug 2012 19:12:40 +0900 |
parents | b5c58242b587 |
children | 25cd3d012798 |
files | src/begin/MakeNode.java |
diffstat | 1 files changed, 33 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/begin/MakeNode.java Fri Aug 17 19:12:40 2012 +0900 @@ -0,0 +1,33 @@ +package begin; + +import javax.ws.rs.core.MediaType; + +import com.sun.jersey.api.client.Client; +import com.sun.jersey.api.client.ClientResponse; +import com.sun.jersey.api.client.WebResource; + +public class MakeNode { + + final static String nodeEntryPointUri = "http://localhost:7474/db/data/node"; + + public static void main(String[] args) { + + /* + * make node + */ + WebResource resource = Client.create().resource(nodeEntryPointUri); + ClientResponse response = resource.accept(MediaType.APPLICATION_JSON).type(MediaType.APPLICATION_JSON).entity( + "{}"/*Empty Node*/).post(ClientResponse.class); + System.out.println(String.format("POST to [%s], status code [%d], location header [%s]",nodeEntryPointUri, response.getStatus(), response.getLocation().toString())); + + /* + * add property + */ + + + + + + } + +}