class SampleResource {

	@POST
	@Consumes("application/json")
	public Response post(JsonNode node) {
		Resource resource;
		try {
			resource = store.create(node);
		} catch (Exception e) {
			return Response.serverError().build();
		}

		final URI uri = UriBuilder.fromPath(resource.getURI().path()).build();

		return Response.created(uri).build();
	}

}