Package com.tinkerpop.rexster

Examples of com.tinkerpop.rexster.RexsterResourceContext


        values.put(8);
        values.put(100000);
        requestObject.put("values", values);
        requestObject.put("type", "id");

        this.ctx = new RexsterResourceContext(null, null, null, requestObject, null, null, null, null);

        ExtensionResponse response = batchExtension.getEdges(this.ctx, graph);

        Assert.assertEquals(Response.Status.OK.getStatusCode(), response.getJerseyResponse().getStatus());
        JSONObject entity = (JSONObject) response.getJerseyResponse().getEntity();
View Full Code Here


        values.put("(f,0.5)");
        values.put("(f,0.4)");
        requestObject.put("values", values);
        requestObject.put("type", "index");

        this.ctx = new RexsterResourceContext(null, null, null, requestObject, null, null, null, null);

        ExtensionResponse response = batchExtension.getEdges(this.ctx, graph);

        Assert.assertEquals(Response.Status.BAD_REQUEST.getStatusCode(), response.getJerseyResponse().getStatus());
View Full Code Here

        values.put("(f,0.4)");
        requestObject.put("values", values);
        requestObject.put("type", "index");
        requestObject.put("key", "weight");

        this.ctx = new RexsterResourceContext(null, null, null, requestObject, null, null, null, null);

        ExtensionResponse response = batchExtension.getEdges(this.ctx, graph);

        Assert.assertEquals(Response.Status.OK.getStatusCode(), response.getJerseyResponse().getStatus());
        JSONObject entity = (JSONObject) response.getJerseyResponse().getEntity();
View Full Code Here

        values.put("(f,0.5)");
        values.put("(f,0.7)");
        requestObject.put("values", values);
        requestObject.put("type", "keyindex");

        this.ctx = new RexsterResourceContext(null, null, null, requestObject, null, null, null, null);

        ExtensionResponse response = batchExtension.getEdges(this.ctx, graph);

        Assert.assertEquals(Response.Status.BAD_REQUEST.getStatusCode(), response.getJerseyResponse().getStatus());
View Full Code Here

        values.put("(f,0.7)");
        requestObject.put("values", values);
        requestObject.put("type", "keyindex");
        requestObject.put("key", "weight");

        this.ctx = new RexsterResourceContext(null, null, null, requestObject, null, null, null, null);

        ExtensionResponse response = batchExtension.getEdges(this.ctx, graph);

        Assert.assertEquals(Response.Status.OK.getStatusCode(), response.getJerseyResponse().getStatus());
        JSONObject entity = (JSONObject) response.getJerseyResponse().getEntity();
View Full Code Here

        requestObject.put("tx", txList);

        RexsterApplicationGraph rag = new RexsterApplicationGraph("graph", this.graph);

        this.ctx = new RexsterResourceContext(rag, null, null, requestObject, null, null, null, null);

        ExtensionResponse response = batchExtension.postTx(this.ctx, this.graph, rag);

        Assert.assertEquals(Response.Status.OK.getStatusCode(), response.getJerseyResponse().getStatus());
        JSONObject entity = (JSONObject) response.getJerseyResponse().getEntity();
View Full Code Here

    }

    @Test
    public void evaluateGetOnGraphWithBindings() throws Exception {
        String json = "{\"params\":{\"x\":1, \"y\":2, \"z\":\"test\", \"list\":[3,2,1,0], \"map\":{\"mapx\":[300,200,100]}}}";
        RexsterResourceContext rexsterResourceContext = new RexsterResourceContext(null, uriInfo,
                httpServletRequest, new JSONObject(new JSONTokener(json)), null, extensionMethodNoApi, null, new MetricRegistry());

        ExtensionResponse extensionResponse = this.gremlinExtension.evaluateGetOnGraph(
                rexsterResourceContext, graph, "[x+y, z, list.size, map.mapx.size]");
        JSONObject jsonResponse = assertResponseAndGetEntity(extensionResponse,
View Full Code Here

TOP

Related Classes of com.tinkerpop.rexster.RexsterResourceContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.