Examples of UriRefOrVariable


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

                "<http://www.w3.org/2001/vcard-rdf/3.0#FN> ?name . } " +
                "WHERE { ?x <http://xmlns.com/foaf/0.1/name> ?name . }";

        ResourceOrVariable s = new ResourceOrVariable(
                new UriRef("http://example.org/person#Alice"));
        UriRefOrVariable p = new UriRefOrVariable(
                new UriRef("http://www.w3.org/2001/vcard-rdf/3.0#FN"));
        ResourceOrVariable o = new ResourceOrVariable(new Variable("name"));
        Set<TriplePattern> constructTriplePatterns = new HashSet<TriplePattern>();
        constructTriplePatterns.add(new SimpleTriplePattern(s, p, o));
        SimpleConstructQuery constructQuery = new SimpleConstructQuery(constructTriplePatterns);

        s = new ResourceOrVariable(new Variable("x"));
        p = new UriRefOrVariable(new UriRef("http://xmlns.com/foaf/0.1/name"));
        Set<TriplePattern> triplePatterns = new HashSet<TriplePattern>();
        triplePatterns.add(new SimpleTriplePattern(s, p, o));

        SimpleBasicGraphPattern bgp = new SimpleBasicGraphPattern(triplePatterns);
        SimpleGroupGraphPattern queryPattern = new SimpleGroupGraphPattern();
View Full Code Here

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

        final String queryString = "ASK WHERE { ?x <http://xmlns.com/foaf/0.1/name> " +
                "\"Alice\"^^<http://www.w3.org/2001/XMLSchema#string> . }";

        ResourceOrVariable s = new ResourceOrVariable(new Variable("x"));
        UriRefOrVariable p = new UriRefOrVariable(
                new UriRef("http://xmlns.com/foaf/0.1/name"));
        ResourceOrVariable o = new ResourceOrVariable(
                LiteralFactory.getInstance().createTypedLiteral("Alice"));

        Set<TriplePattern> triplePatterns = new HashSet<TriplePattern>();
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.