Examples of addTriplePattern()


Examples of com.hp.hpl.jena.sparql.syntax.ElementGroup.addTriplePattern()

                ElementGroup group = new ElementGroup();
                group.addTriplePattern(new Triple(wfNode, NodeFactory.createURI(WFDESC_IRI + "hasSubProcess"),
                    processNode));
                group.addTriplePattern(new Triple(processNode, NodeFactory.createURI(ONTOLOGY_IRI
                    + "requiresInstallation"), installationNode));
                group.addTriplePattern(new Triple(installationNode, NodeFactory.createURI(ONTOLOGY_IRI + "dependsOn"),
                    dependencyNode));
                group.addTriplePattern(new Triple(dependencyNode, NodeFactory.createURI(SKOS_LABEL), dependencyLabel));
                query.addElement(group);
                ElementFilter filter = new ElementFilter(new E_StrContains(new ExprVar(dependencyLabel),
                    new NodeValueString(dependencyLabelPattern)));
View Full Code Here

Examples of com.hp.hpl.jena.sparql.syntax.ElementGroup.addTriplePattern()

                    processNode));
                group.addTriplePattern(new Triple(processNode, NodeFactory.createURI(ONTOLOGY_IRI
                    + "requiresInstallation"), installationNode));
                group.addTriplePattern(new Triple(installationNode, NodeFactory.createURI(ONTOLOGY_IRI + "dependsOn"),
                    dependencyNode));
                group.addTriplePattern(new Triple(dependencyNode, NodeFactory.createURI(SKOS_LABEL), dependencyLabel));
                query.addElement(group);
                ElementFilter filter = new ElementFilter(new E_StrContains(new ExprVar(dependencyLabel),
                    new NodeValueString(dependencyLabelPattern)));
                query.addElementFilter(filter);
            }
View Full Code Here

Examples of org.wikier.trioo.jtrioo.rdf.sparql.SelectQuery.addTriplePattern()

  @SuppressWarnings("rawtypes")
  public Object find(String uri) {
    SelectQuery q = new SelectQuery();
    Variable x = new Variable("x");
    q.addTriplePattern(new TriplePattern(x, new AbbrevRdfType(), new Variable("type")));
    q.addFilter("str(" + x.toString() +") = \"" + uri + "\"");
    QueryCodeGenerator qg = new QueryCodeGenerator();
    qg.visit(q);
    QueryExecutor qe = this.session.getQueryExecutor();
    ResultSet rs = qe.execSelect(qg.toString());
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.