Examples of BasicGraphPattern


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

                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));
View Full Code Here

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

        AskQuery askQuery = (AskQuery) q;

        GraphPattern gp = (GraphPattern) askQuery.getQueryPattern()
                .getGraphPatterns().toArray()[0];
        Assert.assertTrue(BasicGraphPattern.class.isAssignableFrom(gp.getClass()));
        BasicGraphPattern bgp = (BasicGraphPattern) gp;

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

        Assert.assertTrue(triplePatterns.contains(
                new SimpleTriplePattern(new Variable(variable),
                new UriRef(predicate), new PlainLiteralImpl(object))));
View Full Code Here

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

                .equals(new Variable(variable)));

        GraphPattern gp = (GraphPattern) selectQuery.getQueryPattern()
                .getGraphPatterns().toArray()[0];
        Assert.assertTrue(BasicGraphPattern.class.isAssignableFrom(gp.getClass()));
        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));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.