Search in sources :

Example 21 with Table

use of org.apache.jena.sparql.algebra.Table in project jena by apache.

the class EvaluatorDispatch method visit.

@Override
public void visit(OpUnion opUnion) {
    Table left = eval(opUnion.getLeft());
    Table right = eval(opUnion.getRight());
    Table table = evaluator.union(left, right);
    push(table);
}
Also used : Table(org.apache.jena.sparql.algebra.Table)

Example 22 with Table

use of org.apache.jena.sparql.algebra.Table in project jena by apache.

the class EvaluatorDispatch method visit.

@Override
public void visit(OpService opService) {
    QueryIterator qIter = Service.exec(opService, ARQ.getContext());
    Table table = TableFactory.create(qIter);
    push(table);
}
Also used : Table(org.apache.jena.sparql.algebra.Table) QueryIterator(org.apache.jena.sparql.engine.QueryIterator)

Example 23 with Table

use of org.apache.jena.sparql.algebra.Table in project jena by apache.

the class EvaluatorDispatch method visit.

@Override
public void visit(OpSequence opSequence) {
    // Evaluation is as a sequence of joins.
    Table table = TableFactory.createUnit();
    for (Iterator<Op> iter = opSequence.iterator(); iter.hasNext(); ) {
        Op op = iter.next();
        Table eltTable = eval(op);
        table = evaluator.join(table, eltTable);
    }
    push(table);
}
Also used : Op(org.apache.jena.sparql.algebra.Op) Table(org.apache.jena.sparql.algebra.Table)

Example 24 with Table

use of org.apache.jena.sparql.algebra.Table in project jena by apache.

the class EvaluatorDispatch method visit.

@Override
public void visit(OpSlice opSlice) {
    Table table = eval(opSlice.getSubOp());
    table = evaluator.slice(table, opSlice.getStart(), opSlice.getLength());
    push(table);
}
Also used : Table(org.apache.jena.sparql.algebra.Table)

Example 25 with Table

use of org.apache.jena.sparql.algebra.Table in project jena by apache.

the class EvaluatorDispatch method visit.

@Override
public void visit(OpPropFunc opPropFunc) {
    Table table = eval(opPropFunc.getSubOp());
    table = evaluator.propertyFunction(table, opPropFunc.getProperty(), opPropFunc.getSubjectArgs(), opPropFunc.getObjectArgs());
    push(table);
}
Also used : Table(org.apache.jena.sparql.algebra.Table)

Aggregations

Table (org.apache.jena.sparql.algebra.Table)37 Var (org.apache.jena.sparql.core.Var)4 QueryIterator (org.apache.jena.sparql.engine.QueryIterator)4 Binding (org.apache.jena.sparql.engine.binding.Binding)4 Node (org.apache.jena.graph.Node)3 Op (org.apache.jena.sparql.algebra.Op)3 Graph (org.apache.jena.graph.Graph)2 ARQInternalErrorException (org.apache.jena.sparql.ARQInternalErrorException)2 OpGraph (org.apache.jena.sparql.algebra.op.OpGraph)2 TableEmpty (org.apache.jena.sparql.algebra.table.TableEmpty)2 BasicPattern (org.apache.jena.sparql.core.BasicPattern)2 DatasetGraph (org.apache.jena.sparql.core.DatasetGraph)2 ExecutionContext (org.apache.jena.sparql.engine.ExecutionContext)2 Test (org.junit.Test)2 InternalErrorException (org.apache.jena.atlas.lib.InternalErrorException)1 Triple (org.apache.jena.graph.Triple)1 OpBGP (org.apache.jena.sparql.algebra.op.OpBGP)1 OpTable (org.apache.jena.sparql.algebra.op.OpTable)1 TableN (org.apache.jena.sparql.algebra.table.TableN)1 QueryIterConcat (org.apache.jena.sparql.engine.iterator.QueryIterConcat)1