Search in sources :

Example 1 with ElementService

use of org.apache.jena.sparql.syntax.ElementService in project jena by apache.

the class TestService method makeElt.

/*package*/
static ElementService makeElt(EnvTest env) {
    Node serviceNode = NodeFactory.createURI(env.datasetURL());
    ElementGroup elt = new ElementGroup();
    Element elt1 = new ElementTriplesBlock(bgp);
    elt.addElement(elt1);
    ElementService eltService = new ElementService(SERVICE, elt);
    return eltService;
}
Also used : ElementService(org.apache.jena.sparql.syntax.ElementService) Node(org.apache.jena.graph.Node) Element(org.apache.jena.sparql.syntax.Element) ElementTriplesBlock(org.apache.jena.sparql.syntax.ElementTriplesBlock) ElementGroup(org.apache.jena.sparql.syntax.ElementGroup)

Example 2 with ElementService

use of org.apache.jena.sparql.syntax.ElementService in project jena by apache.

the class TestService method makeOpElt.

/*package*/
static OpService makeOpElt(EnvTest env) {
    Node serviceNode = NodeFactory.createURI(env.datasetURL());
    ElementGroup elt = new ElementGroup();
    Element elt1 = new ElementTriplesBlock(bgp);
    elt.addElement(elt1);
    Op subOp = Algebra.compile(elt1);
    ElementService eltService = new ElementService(SERVICE, elt);
    OpService opService = new OpService(serviceNode, subOp, eltService, false);
    return opService;
}
Also used : Op(org.apache.jena.sparql.algebra.Op) ElementService(org.apache.jena.sparql.syntax.ElementService) Node(org.apache.jena.graph.Node) Element(org.apache.jena.sparql.syntax.Element) ElementTriplesBlock(org.apache.jena.sparql.syntax.ElementTriplesBlock) OpService(org.apache.jena.sparql.algebra.op.OpService) ElementGroup(org.apache.jena.sparql.syntax.ElementGroup)

Example 3 with ElementService

use of org.apache.jena.sparql.syntax.ElementService in project jena by apache.

the class ElementRewriter method visit.

@Override
public void visit(ElementService el) {
    el.getElement().visit(this);
    push(new ElementService(changeNode(el.getServiceNode()), getResult(), el.getSilent()));
}
Also used : ElementService(org.apache.jena.sparql.syntax.ElementService)

Aggregations

ElementService (org.apache.jena.sparql.syntax.ElementService)3 Node (org.apache.jena.graph.Node)2 Element (org.apache.jena.sparql.syntax.Element)2 ElementGroup (org.apache.jena.sparql.syntax.ElementGroup)2 ElementTriplesBlock (org.apache.jena.sparql.syntax.ElementTriplesBlock)2 Op (org.apache.jena.sparql.algebra.Op)1 OpService (org.apache.jena.sparql.algebra.op.OpService)1