Package com.tinkerpop.blueprints

Examples of com.tinkerpop.blueprints.KeyIndexableGraph


        Assert.assertTrue(response.getEntity() instanceof JSONObject);

        final JSONObject json = (JSONObject) response.getEntity();
        Assert.assertTrue(json.has(Tokens.QUERY_TIME));

        final KeyIndexableGraph g = (KeyIndexableGraph) this.toyGraph;
        Assert.assertFalse(g.getIndexedKeys(Vertex.class).contains("test"));
    }
View Full Code Here


        Assert.assertTrue(response.getEntity() instanceof JSONObject);

        final JSONObject json = (JSONObject) response.getEntity();
        Assert.assertTrue(json.has(Tokens.QUERY_TIME));

        final KeyIndexableGraph g = (KeyIndexableGraph) this.toyGraph;
        Assert.assertFalse(g.getIndexedKeys(Edge.class).contains("weight"));
    }
View Full Code Here

        Assert.assertTrue(response.getEntity() instanceof JSONObject);

        final JSONObject json = (JSONObject) response.getEntity();
        Assert.assertTrue(json.has(Tokens.QUERY_TIME));

        final KeyIndexableGraph g = (KeyIndexableGraph) this.toyGraph;
        Assert.assertEquals(3, g.getIndexedKeys(Vertex.class).size());
        Assert.assertTrue(g.getIndexedKeys(Vertex.class).contains("lang"));
    }
View Full Code Here

        Assert.assertTrue(response.getEntity() instanceof JSONObject);

        final JSONObject json = (JSONObject) response.getEntity();
        Assert.assertTrue(json.has(Tokens.QUERY_TIME));

        final KeyIndexableGraph g = (KeyIndexableGraph) this.toyGraph;
        Assert.assertEquals(2, g.getIndexedKeys(Edge.class).size());
        Assert.assertTrue(g.getIndexedKeys(Edge.class).contains("other"));
    }
View Full Code Here

    protected ResourceHolder<KeyIndexResource> constructKeyIndexResource(final boolean useToyGraph,
                                                                       final HashMap<String, Object> parameters,
                                                                       final MediaType mediaType) {
        // add key indices to the toy graph
        final KeyIndexableGraph keyIndexableGraph = (KeyIndexableGraph) this.toyGraph;
        keyIndexableGraph.createKeyIndex("name", Vertex.class);
        keyIndexableGraph.createKeyIndex("test", Vertex.class);
        keyIndexableGraph.createKeyIndex("weight", Edge.class);

        final UriInfo uri = this.mockery.mock(UriInfo.class);
        final HttpServletRequest httpServletRequest = this.mockery.mock(HttpServletRequest.class);

        final Request request = this.mockery.mock(Request.class);
View Full Code Here

        final HashMap<String, Object> parameters = new HashMap<String, Object>();
        parameters.put(Tokens.KEY, "weight");
        parameters.put(Tokens.VALUE, "(f,0.4)");

        final EdgeResource resource = this.constructEdgeResource(true, parameters).getResource();
        final KeyIndexableGraph graph = (KeyIndexableGraph) this.toyGraph;
        graph.createKeyIndex("weight", Edge.class);

        assertEdgesOkResponseJsonStructure(2, 2, resource.getAllEdges(graphName));
    }
View Full Code Here

        final HashMap<String, Object> parameters = new HashMap<String, Object>();
        parameters.put(Tokens.KEY, "name");
        parameters.put(Tokens.VALUE, "marko");

        final VertexResource resource = this.constructVertexResource(true, parameters).getResource();
        final KeyIndexableGraph graph = (KeyIndexableGraph) this.toyGraph;
        graph.createKeyIndex("name", Vertex.class);

        final Response response = resource.getVertices(graphName);
        assertVerticesOkResponseJsonStructure(1, 1, response);

        final JSONObject json = (JSONObject) response.getEntity();
View Full Code Here

TOP

Related Classes of com.tinkerpop.blueprints.KeyIndexableGraph

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.