com.tinkerpop.rexster
Class VertexResource

java.lang.Object
  extended by com.tinkerpop.rexster.BaseResource
      extended by com.tinkerpop.rexster.AbstractSubResource
          extended by com.tinkerpop.rexster.VertexResource

public class VertexResource
extends AbstractSubResource


Field Summary
 
Fields inherited from class com.tinkerpop.rexster.AbstractSubResource
extensionCache
 
Fields inherited from class com.tinkerpop.rexster.BaseResource
httpServletRequest, producesVariantList, resultObject, securityContext, servletContext, sh, uriInfo
 
Constructor Summary
VertexResource()
           
VertexResource(javax.ws.rs.core.UriInfo ui, javax.servlet.http.HttpServletRequest req, RexsterApplication ra)
           
 
Method Summary
 javax.ws.rs.core.Response deleteVertex(String graphName, String id)
          DELETE http://host/graph/vertices/id graph.removeVertex(graph.getVertex(id));

DELETE http://host/graph/vertices/id?key1&key2 Vertex v = graph.getVertex(id); v.removeProperty(key1); v.removeProperty(key2);

 javax.ws.rs.core.Response deleteVertexExtension(String graphName, String id)
           
 javax.ws.rs.core.Response deleteVertexExtension(String graphName, String id, org.codehaus.jettison.json.JSONObject json)
           
 javax.ws.rs.core.Response getSingleVertex(String graphName, String id)
          GET http://host/graph/vertices/id graph.getVertex(id);
 javax.ws.rs.core.Response getSingleVertexRexsterJson(String graphName, String id)
           
 javax.ws.rs.core.Response getSingleVertexRexsterTypedJson(String graphName, String id)
           
 javax.ws.rs.core.Response getVertexEdges(String graphName, String vertexId, String direction)
          GET http://host/graph/vertices/id/direction graph.getVertex(id).get{Direction}Edges();
 javax.ws.rs.core.Response getVertexEdgesRexsterTypedJson(String graphName, String vertexId, String direction)
           
 javax.ws.rs.core.Response getVertexExtension(String graphName, String id)
           
 javax.ws.rs.core.Response getVertices(String graphName)
          GET http://host/graph/vertices graph.getVertices();
 javax.ws.rs.core.Response getVerticesRexsterJson(String graphName)
           
 javax.ws.rs.core.Response headVertexExtension(String graphName, String id)
           
 javax.ws.rs.core.Response headVertexExtension(String graphName, String id, org.codehaus.jettison.json.JSONObject json)
           
 javax.ws.rs.core.Response optionsSingleVertex()
           
 javax.ws.rs.core.Response optionsVertexEdges()
           
 javax.ws.rs.core.Response optionsVertexExtension(String graphName, String id)
           
 javax.ws.rs.core.Response optionsVertexExtension(String graphName, String id, org.codehaus.jettison.json.JSONObject json)
           
 javax.ws.rs.core.Response optionsVertices()
           
 javax.ws.rs.core.Response postNullVertexOnUri(javax.ws.rs.core.Request request, String graphName)
          POST http://host/graph/vertices graph.addVertex(null);
 javax.ws.rs.core.Response postNullVertexRexsterConsumesJson(javax.ws.rs.core.Request request, String graphName, org.codehaus.jettison.json.JSONObject json)
           
 javax.ws.rs.core.Response postNullVertexRexsterConsumesTypedJson(javax.ws.rs.core.Request request, String graphName, org.codehaus.jettison.json.JSONObject json)
           
 javax.ws.rs.core.Response postVertexConsumesJson(javax.ws.rs.core.Request request, String graphName, String id, org.codehaus.jettison.json.JSONObject json)
          POST http://host/graph/vertices/id Vertex v = graph.addVertex(id); v.setProperty(key,value);
 javax.ws.rs.core.Response postVertexExtension(String graphName, String id)
           
 javax.ws.rs.core.Response postVertexExtension(String graphName, String id, org.codehaus.jettison.json.JSONObject json)
           
 javax.ws.rs.core.Response postVertexOnUri(javax.ws.rs.core.Request request, String graphName, String id)
          POST http://host/graph/vertices/id?key=value Vertex v = graph.addVertex(id); v.setProperty(key,value);
 javax.ws.rs.core.Response postVertexRexsterConsumesTypedJson(javax.ws.rs.core.Request request, String graphName, String id, org.codehaus.jettison.json.JSONObject json)
           
 javax.ws.rs.core.Response putVertexConsumesJson(javax.ws.rs.core.Request request, String graphName, String id, org.codehaus.jettison.json.JSONObject json)
          PUT http://host/graph/vertices/id Vertex v = graph.addVertex(id); v.setProperty(key,value);
 javax.ws.rs.core.Response putVertexConsumesTypedJson(javax.ws.rs.core.Request request, String graphName, String id, org.codehaus.jettison.json.JSONObject json)
           
 javax.ws.rs.core.Response putVertexConsumesUri(javax.ws.rs.core.Request request, String graphName, String id)
          PUT http://host/graph/vertices/id?key=value remove all properties v.setProperty(key,value);
 javax.ws.rs.core.Response putVertexExtension(String graphName, String id)
           
 javax.ws.rs.core.Response putVertexExtension(String graphName, String id, org.codehaus.jettison.json.JSONObject json)
           
 
Methods inherited from class com.tinkerpop.rexster.AbstractSubResource
findExtensionClasses, findExtensionMethod, getRexsterApplicationGraph, invokeExtension, invokeExtension, invokeExtension, invokeExtension, parseUriForExtensionSegment, tryAppendRexsterAttributesIfJson
 
Methods inherited from class com.tinkerpop.rexster.BaseResource
buildOptionsResponse, buildOptionsResponse, generateErrorObject, generateErrorObject, generateErrorObjectJsonFail, getNonRexsterRequest, getNonRexsterRequestKeys, getRequestObject, getRequestObject, getRequestObjectFlat, getRexsterApplication, getTimeAlive, getUriPath, setRequestObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VertexResource

public VertexResource()

VertexResource

public VertexResource(javax.ws.rs.core.UriInfo ui,
                      javax.servlet.http.HttpServletRequest req,
                      RexsterApplication ra)
Method Detail

optionsVertices

public javax.ws.rs.core.Response optionsVertices()

getVertices

public javax.ws.rs.core.Response getVertices(String graphName)
GET http://host/graph/vertices graph.getVertices();


getVerticesRexsterJson

public javax.ws.rs.core.Response getVerticesRexsterJson(String graphName)

optionsSingleVertex

public javax.ws.rs.core.Response optionsSingleVertex()

getSingleVertex

public javax.ws.rs.core.Response getSingleVertex(String graphName,
                                                 String id)
GET http://host/graph/vertices/id graph.getVertex(id);


getSingleVertexRexsterJson

public javax.ws.rs.core.Response getSingleVertexRexsterJson(String graphName,
                                                            String id)

getSingleVertexRexsterTypedJson

public javax.ws.rs.core.Response getSingleVertexRexsterTypedJson(String graphName,
                                                                 String id)

headVertexExtension

public javax.ws.rs.core.Response headVertexExtension(String graphName,
                                                     String id,
                                                     org.codehaus.jettison.json.JSONObject json)

headVertexExtension

public javax.ws.rs.core.Response headVertexExtension(String graphName,
                                                     String id)

putVertexExtension

public javax.ws.rs.core.Response putVertexExtension(String graphName,
                                                    String id,
                                                    org.codehaus.jettison.json.JSONObject json)

putVertexExtension

public javax.ws.rs.core.Response putVertexExtension(String graphName,
                                                    String id)

optionsVertexExtension

public javax.ws.rs.core.Response optionsVertexExtension(String graphName,
                                                        String id,
                                                        org.codehaus.jettison.json.JSONObject json)

optionsVertexExtension

public javax.ws.rs.core.Response optionsVertexExtension(String graphName,
                                                        String id)

deleteVertexExtension

public javax.ws.rs.core.Response deleteVertexExtension(String graphName,
                                                       String id,
                                                       org.codehaus.jettison.json.JSONObject json)

deleteVertexExtension

public javax.ws.rs.core.Response deleteVertexExtension(String graphName,
                                                       String id)

postVertexExtension

public javax.ws.rs.core.Response postVertexExtension(String graphName,
                                                     String id,
                                                     org.codehaus.jettison.json.JSONObject json)

postVertexExtension

public javax.ws.rs.core.Response postVertexExtension(String graphName,
                                                     String id)

getVertexExtension

public javax.ws.rs.core.Response getVertexExtension(String graphName,
                                                    String id)

optionsVertexEdges

public javax.ws.rs.core.Response optionsVertexEdges()

getVertexEdges

public javax.ws.rs.core.Response getVertexEdges(String graphName,
                                                String vertexId,
                                                String direction)
GET http://host/graph/vertices/id/direction graph.getVertex(id).get{Direction}Edges();


getVertexEdgesRexsterTypedJson

public javax.ws.rs.core.Response getVertexEdgesRexsterTypedJson(String graphName,
                                                                String vertexId,
                                                                String direction)

postNullVertexRexsterConsumesJson

public javax.ws.rs.core.Response postNullVertexRexsterConsumesJson(@Context
                                                                   javax.ws.rs.core.Request request,
                                                                   String graphName,
                                                                   org.codehaus.jettison.json.JSONObject json)

postNullVertexRexsterConsumesTypedJson

public javax.ws.rs.core.Response postNullVertexRexsterConsumesTypedJson(@Context
                                                                        javax.ws.rs.core.Request request,
                                                                        String graphName,
                                                                        org.codehaus.jettison.json.JSONObject json)

postNullVertexOnUri

public javax.ws.rs.core.Response postNullVertexOnUri(@Context
                                                     javax.ws.rs.core.Request request,
                                                     String graphName)
POST http://host/graph/vertices graph.addVertex(null);


postVertexConsumesJson

public javax.ws.rs.core.Response postVertexConsumesJson(@Context
                                                        javax.ws.rs.core.Request request,
                                                        String graphName,
                                                        String id,
                                                        org.codehaus.jettison.json.JSONObject json)
POST http://host/graph/vertices/id Vertex v = graph.addVertex(id); v.setProperty(key,value);


postVertexRexsterConsumesTypedJson

public javax.ws.rs.core.Response postVertexRexsterConsumesTypedJson(@Context
                                                                    javax.ws.rs.core.Request request,
                                                                    String graphName,
                                                                    String id,
                                                                    org.codehaus.jettison.json.JSONObject json)

postVertexOnUri

public javax.ws.rs.core.Response postVertexOnUri(@Context
                                                 javax.ws.rs.core.Request request,
                                                 String graphName,
                                                 String id)
POST http://host/graph/vertices/id?key=value Vertex v = graph.addVertex(id); v.setProperty(key,value);


putVertexConsumesJson

public javax.ws.rs.core.Response putVertexConsumesJson(@Context
                                                       javax.ws.rs.core.Request request,
                                                       String graphName,
                                                       String id,
                                                       org.codehaus.jettison.json.JSONObject json)
PUT http://host/graph/vertices/id Vertex v = graph.addVertex(id); v.setProperty(key,value);


putVertexConsumesTypedJson

public javax.ws.rs.core.Response putVertexConsumesTypedJson(@Context
                                                            javax.ws.rs.core.Request request,
                                                            String graphName,
                                                            String id,
                                                            org.codehaus.jettison.json.JSONObject json)

putVertexConsumesUri

public javax.ws.rs.core.Response putVertexConsumesUri(@Context
                                                      javax.ws.rs.core.Request request,
                                                      String graphName,
                                                      String id)
PUT http://host/graph/vertices/id?key=value remove all properties v.setProperty(key,value);


deleteVertex

public javax.ws.rs.core.Response deleteVertex(String graphName,
                                              String id)
DELETE http://host/graph/vertices/id graph.removeVertex(graph.getVertex(id));

DELETE http://host/graph/vertices/id?key1&key2 Vertex v = graph.getVertex(id); v.removeProperty(key1); v.removeProperty(key2);



Copyright © 2009-2012. All Rights Reserved.