# HG changeset patch # User one # Date 1345198360 -32400 # Node ID 667546c44b367617c0896a12e3a0e18ea6b0bb55 # Parent b5c58242b5879d40ea5941349a085a08824e51b2 modify MakeNode.java diff -r b5c58242b587 -r 667546c44b36 src/begin/MakeNode.java --- /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 + */ + + + + + + } + +}