com.tinkerpop.rexster
Class IndexResource

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

public class IndexResource
extends AbstractSubResource

Author:
Marko A. Rodriguez (http://markorodriguez.com)

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
IndexResource()
           
IndexResource(javax.ws.rs.core.UriInfo ui, javax.servlet.http.HttpServletRequest req, RexsterApplication ra)
           
 
Method Summary
 javax.ws.rs.core.Response deleteIndex(String graphName, String indexName)
          DELETE http://host/graph/indices/indexName graph.dropIndex(indexName);

DELETE http://host/graph/indices/indexName?key=key1&value=value1&id=id1 Index index = graph.getIndex(indexName,...) index.remove(key, value, graph.getVertex(id1));

 javax.ws.rs.core.Response deleteIndex(String graphName, String indexName, org.codehaus.jettison.json.JSONObject json)
           
 javax.ws.rs.core.Response getAllIndices(String graphName)
          GET http://host/graph/indices get.getIndices();
 javax.ws.rs.core.Response getElementsFromIndex(String graphName, String indexName)
          GET http://host/graph/indices/indexName?key=key1&value=value1 Index index = graph.getIndex(indexName,...); index.get(key,value);
 javax.ws.rs.core.Response getElementsFromIndexRexsterTypedJson(String graphName, String indexName)
           
 javax.ws.rs.core.Response getIndexCount(String graphName, String indexName)
          GET http://host/graph/indices/indexName/count?key=?&value=?
 javax.ws.rs.core.Response optionsAllIndices()
           
 javax.ws.rs.core.Response optionsElementsFromIndex()
           
 javax.ws.rs.core.Response optionsIndexCount()
           
 javax.ws.rs.core.Response postIndex(String graphName, String indexName)
           
 javax.ws.rs.core.Response postIndex(String graphName, String indexName, org.codehaus.jettison.json.JSONObject json)
          POST http://host/graph/indices/indexName?key=key1&value=value1&class=vertex&id=id1 Index index = graph.getIndex(indexName,...); index.put(key,value,graph.getVertex(id1));

POST http://host/graph/indices/indexName?class=vertex&type=automatic&keys=[name,age] graph.createIndex(indexName,Vertex.class,AUTOMATIC, {name, age})

 javax.ws.rs.core.Response putElementInIndex(String graphName, String indexName)
          PUT http://host/graph/indices/indexName?key=key1&value=value1&class=vertex&id=id1
 javax.ws.rs.core.Response putElementInIndex(String graphName, String indexName, org.codehaus.jettison.json.JSONObject json)
          PUT http://host/graph/indices/indexName?key=key1&value=value1&class=vertex&id=id1
 
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

IndexResource

public IndexResource()

IndexResource

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

optionsAllIndices

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

getAllIndices

public javax.ws.rs.core.Response getAllIndices(String graphName)
GET http://host/graph/indices get.getIndices();


optionsElementsFromIndex

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

getElementsFromIndex

public javax.ws.rs.core.Response getElementsFromIndex(String graphName,
                                                      String indexName)
GET http://host/graph/indices/indexName?key=key1&value=value1 Index index = graph.getIndex(indexName,...); index.get(key,value);


getElementsFromIndexRexsterTypedJson

public javax.ws.rs.core.Response getElementsFromIndexRexsterTypedJson(String graphName,
                                                                      String indexName)

optionsIndexCount

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

getIndexCount

public javax.ws.rs.core.Response getIndexCount(String graphName,
                                               String indexName)
GET http://host/graph/indices/indexName/count?key=?&value=?


deleteIndex

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

deleteIndex

public javax.ws.rs.core.Response deleteIndex(String graphName,
                                             String indexName)
DELETE http://host/graph/indices/indexName graph.dropIndex(indexName);

DELETE http://host/graph/indices/indexName?key=key1&value=value1&id=id1 Index index = graph.getIndex(indexName,...) index.remove(key, value, graph.getVertex(id1));


postIndex

public javax.ws.rs.core.Response postIndex(String graphName,
                                           String indexName,
                                           org.codehaus.jettison.json.JSONObject json)
POST http://host/graph/indices/indexName?key=key1&value=value1&class=vertex&id=id1 Index index = graph.getIndex(indexName,...); index.put(key,value,graph.getVertex(id1));

POST http://host/graph/indices/indexName?class=vertex&type=automatic&keys=[name,age] graph.createIndex(indexName,Vertex.class,AUTOMATIC, {name, age})


postIndex

public javax.ws.rs.core.Response postIndex(String graphName,
                                           String indexName)

putElementInIndex

public javax.ws.rs.core.Response putElementInIndex(String graphName,
                                                   String indexName,
                                                   org.codehaus.jettison.json.JSONObject json)
PUT http://host/graph/indices/indexName?key=key1&value=value1&class=vertex&id=id1


putElementInIndex

public javax.ws.rs.core.Response putElementInIndex(String graphName,
                                                   String indexName)
PUT http://host/graph/indices/indexName?key=key1&value=value1&class=vertex&id=id1



Copyright © 2009-2012. All Rights Reserved.