Package org.apache.clerezza.rdf.core.sparql.query

Examples of org.apache.clerezza.rdf.core.sparql.query.ResourceOrVariable


        this(new ResourceOrVariable(subject), new UriRefOrVariable(predicate),
                new ResourceOrVariable(object));
    }

    public SimpleTriplePattern(NonLiteral subject, Variable predicate, Variable object) {
        this(new ResourceOrVariable(subject), new UriRefOrVariable(predicate),
                new ResourceOrVariable(object));
    }
View Full Code Here


        this(new ResourceOrVariable(subject), new UriRefOrVariable(predicate),
                new ResourceOrVariable(object));
    }

    public SimpleTriplePattern(Variable subject, UriRef predicate, Variable object) {
        this(new ResourceOrVariable(subject), new UriRefOrVariable(predicate),
                new ResourceOrVariable(object));
    }
View Full Code Here

        this(new ResourceOrVariable(subject), new UriRefOrVariable(predicate),
                new ResourceOrVariable(object));
    }

    public SimpleTriplePattern(NonLiteral subject, UriRef predicate, Variable object) {
        this(new ResourceOrVariable(subject), new UriRefOrVariable(predicate),
                new ResourceOrVariable(object));
    }
View Full Code Here

        this(new ResourceOrVariable(subject), new UriRefOrVariable(predicate),
                new ResourceOrVariable(object));
    }

    public SimpleTriplePattern(Variable subject, Variable predicate, Resource object) {
        this(new ResourceOrVariable(subject), new UriRefOrVariable(predicate),
                new ResourceOrVariable(object));
    }
View Full Code Here

        this(new ResourceOrVariable(subject), new UriRefOrVariable(predicate),
                new ResourceOrVariable(object));
    }

    public SimpleTriplePattern(NonLiteral subject, Variable predicate, Resource object) {
        this(new ResourceOrVariable(subject), new UriRefOrVariable(predicate),
                new ResourceOrVariable(object));
    }
View Full Code Here

        this(new ResourceOrVariable(subject), new UriRefOrVariable(predicate),
                new ResourceOrVariable(object));
    }

    public SimpleTriplePattern(Variable subject, UriRef predicate, Resource object) {
        this(new ResourceOrVariable(subject), new UriRefOrVariable(predicate),
                new ResourceOrVariable(object));
    }
View Full Code Here

        this(new ResourceOrVariable(subject), new UriRefOrVariable(predicate),
                new ResourceOrVariable(object));
    }

    public SimpleTriplePattern(NonLiteral subject, UriRef predicate, Resource object) {
        this(new ResourceOrVariable(subject), new UriRefOrVariable(predicate),
                new ResourceOrVariable(object));
    }
View Full Code Here

        BasicGraphPattern bgp = (BasicGraphPattern) gp;

        Set<TriplePattern> triplePatterns = bgp.getTriplePatterns();
        Assert.assertTrue(triplePatterns.size()==1);

        ResourceOrVariable s = new ResourceOrVariable(new UriRef(subject));
        UriRefOrVariable p = new UriRefOrVariable(new UriRef(predicate));
        ResourceOrVariable o = new ResourceOrVariable(new Variable(variable));

        Assert.assertTrue(triplePatterns.contains(
                new SimpleTriplePattern(s, p, o)));
    }
View Full Code Here

        ConstructQuery constructQuery = (ConstructQuery) q;
        Set<TriplePattern> triplePatterns = constructQuery
                .getConstructTemplate();
        Assert.assertTrue(triplePatterns.size()==1);

        ResourceOrVariable s = new ResourceOrVariable(new UriRef(subject1));
        UriRefOrVariable p = new UriRefOrVariable(new UriRef(predicate1));
        ResourceOrVariable o = new ResourceOrVariable(new Variable(variable1));

        Assert.assertTrue(triplePatterns.contains(
                new SimpleTriplePattern(s, p, o)));

        GraphPattern gp = (GraphPattern) constructQuery.getQueryPattern()
                .getGraphPatterns().toArray()[0];
        Assert.assertTrue(BasicGraphPattern.class.isAssignableFrom(gp.getClass()));
        BasicGraphPattern bgp = (BasicGraphPattern) gp;
        triplePatterns = bgp.getTriplePatterns();
        Assert.assertTrue(triplePatterns.size()==1);

        s = new ResourceOrVariable(new Variable(variable2));
        p = new UriRefOrVariable(new UriRef(predicate2));

        Assert.assertTrue(triplePatterns.contains(
                new SimpleTriplePattern(s, p, o)));
    }
View Full Code Here

        BasicGraphPattern bgp = (BasicGraphPattern) gp;

        Set<TriplePattern> triplePatterns = bgp.getTriplePatterns();
        Assert.assertTrue(triplePatterns.size()==1);

        ResourceOrVariable s = new ResourceOrVariable(new UriRef(base+subject));
        UriRefOrVariable p = new UriRefOrVariable(new UriRef(prefixUri+predicate));
        ResourceOrVariable o = new ResourceOrVariable(new Variable(variable));

        Assert.assertTrue(triplePatterns.contains(
                new SimpleTriplePattern(s, p, o)));
    }
View Full Code Here

TOP

Related Classes of org.apache.clerezza.rdf.core.sparql.query.ResourceOrVariable

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.