Package com.tinkerpop.rexster

Examples of com.tinkerpop.rexster.RexsterResourceContext


    @Test
    public void evaluateSparqlNoReturnKeysNoShowTypes() {
        String sparqlQuery = "SELECT ?x ?y WHERE { ?x <http://tinkerpop.com#knows> ?y }";

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

        SparqlExtension extension = new SparqlExtension();
        ExtensionResponse extensionResponse = extension.evaluateSparql(this.ctx, this.graph, sparqlQuery);

        Assert.assertNotNull(extensionResponse);
View Full Code Here


    @Test
    public void doFramesWorkOnVertexShortUrl() {
        final UriInfo uri = mockTheUri(false, "");

        // can do a slimmed down RexsterResourceContext
        this.ctx = new RexsterResourceContext(this.rag, uri, null, null, null, null, null, null);

        ExtensionResponse extResp = this.framesExtension.doFramesWorkOnVertex(this.ctx, this.graph, this.graph.getVertex(1));

        Assert.assertNotNull(extResp);
        Assert.assertNotNull(extResp.getJerseyResponse());
View Full Code Here

    @Test
    public void doFramesWorkOnVertexBadMapping() {
        final UriInfo uri = mockTheUri(true, "not-a-frame-in-config");

        // can do a slimmed down RexsterResourceContext
        this.ctx = new RexsterResourceContext(this.rag, uri, null, null, null, null, null, null);

        ExtensionResponse extResp = this.framesExtension.doFramesWorkOnVertex(this.ctx, this.graph, this.graph.getVertex(1));

        Assert.assertNotNull(extResp);
        Assert.assertNotNull(extResp.getJerseyResponse());
View Full Code Here

    @Test
    public void doFramesWorkOnVertexInvalidFrameRequested() {
        final UriInfo uri = mockTheUri(true, "notreal");

        // can do a slimmed down RexsterResourceContext
        this.ctx = new RexsterResourceContext(this.rag, uri, null, null, null, null, null, null);

        ExtensionResponse extResp = this.framesExtension.doFramesWorkOnVertex(this.ctx, this.graph, this.graph.getVertex(1));

        Assert.assertNotNull(extResp);
        Assert.assertNotNull(extResp.getJerseyResponse());
View Full Code Here

    @Test
    public void doFramesWorkOnVertexWrapWithPersonFrame() {
        final UriInfo uri = mockTheUri(true, "person");

        // can do a slimmed down RexsterResourceContext
        this.ctx = new RexsterResourceContext(this.rag, uri, null, null, null, null, null, null);

        ExtensionResponse extResp = this.framesExtension.doFramesWorkOnVertex(this.ctx, this.graph, this.graph.getVertex(1));

        Assert.assertNotNull(extResp);
        Assert.assertNotNull(extResp.getJerseyResponse());
View Full Code Here

    @Test
    public void doFramesWorkOnEdgeShortUrl() {
        final UriInfo uri = mockTheUri(false, "");

        // can do a slimmed down RexsterResourceContext
        this.ctx = new RexsterResourceContext(this.rag, uri, null, null, null, null, null, null);

        ExtensionResponse extResp = this.framesExtension.doFramesWorkOnEdge(this.ctx, this.graph, this.graph.getEdge(11), "in");

        Assert.assertNotNull(extResp);
        Assert.assertNotNull(extResp.getJerseyResponse());
View Full Code Here

    @Test
    public void doFramesWorkOnEdgeBadMapping() {
        final UriInfo uri = mockTheUri(true, "not-a-frame-in-config");

        // can do a slimmed down RexsterResourceContext
        this.ctx = new RexsterResourceContext(this.rag, uri, null, null, null, null, null, null);

        ExtensionResponse extResp = this.framesExtension.doFramesWorkOnEdge(this.ctx, this.graph, this.graph.getEdge(11), "in");

        Assert.assertNotNull(extResp);
        Assert.assertNotNull(extResp.getJerseyResponse());
View Full Code Here

    @Test
    public void doFramesWorkOnEdgeInvalidFrameRequested() {
        final UriInfo uri = mockTheUri(true, "notreal");

        // can do a slimmed down RexsterResourceContext
        this.ctx = new RexsterResourceContext(this.rag, uri, null, null, null, null, null, null);

        ExtensionResponse extResp = this.framesExtension.doFramesWorkOnEdge(this.ctx, this.graph, this.graph.getEdge(11), "in");

        Assert.assertNotNull(extResp);
        Assert.assertNotNull(extResp.getJerseyResponse());
View Full Code Here

    @Test
    public void doFramesWorkOnEdgeWrapWithCreatedFrameStandardDirection() {
        final UriInfo uri = mockTheUri(true, "created");

        // can do a slimmed down RexsterResourceContext
        this.ctx = new RexsterResourceContext(this.rag, uri, null, null, null, null, null, null);

        ExtensionResponse extResp = this.framesExtension.doFramesWorkOnEdge(this.ctx, this.graph, this.graph.getEdge(11), "in");

        Assert.assertNotNull(extResp);
        Assert.assertNotNull(extResp.getJerseyResponse());
View Full Code Here

    @Test
    public void doFramesWorkOnEdgeNoDirection() {
        final UriInfo uri = mockTheUri(true, "created");

        // can do a slimmed down RexsterResourceContext
        this.ctx = new RexsterResourceContext(this.rag, uri, null, null, null, null, null, null);

        ExtensionResponse extResp = this.framesExtension.doFramesWorkOnEdge(this.ctx, this.graph, this.graph.getEdge(11), null);

        Assert.assertNotNull(extResp);
        Assert.assertNotNull(extResp.getJerseyResponse());
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.