Search in sources :

Example 81 with QueryIterator

use of org.apache.jena.sparql.engine.QueryIterator 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 82 with QueryIterator

use of org.apache.jena.sparql.engine.QueryIterator in project jena by apache.

the class EvaluatorSimple method distinct.

@Override
public Table distinct(Table table) {
    QueryIterator qIter = table.iterator(getExecContext());
    qIter = new QueryIterDistinct(qIter, getExecContext());
    return new TableN(qIter);
}
Also used : QueryIterator(org.apache.jena.sparql.engine.QueryIterator) TableN(org.apache.jena.sparql.algebra.table.TableN)

Example 83 with QueryIterator

use of org.apache.jena.sparql.engine.QueryIterator in project jena by apache.

the class EvaluatorSimple method dump.

private static void dump(Table table) {
    System.out.println("Table: " + Lib.className(table));
    QueryIterator qIter = table.iterator(null);
    ResultSet rs = new ResultSetStream(table.getVarNames(), null, table.iterator(null));
    ResultSetFormatter.out(rs);
}
Also used : QueryIterator(org.apache.jena.sparql.engine.QueryIterator) ResultSet(org.apache.jena.query.ResultSet) ResultSetStream(org.apache.jena.sparql.engine.ResultSetStream)

Example 84 with QueryIterator

use of org.apache.jena.sparql.engine.QueryIterator in project jena by apache.

the class EvaluatorSimple method order.

@Override
public Table order(Table table, List<SortCondition> conditions) {
    QueryIterator qIter = table.iterator(getExecContext());
    qIter = new QueryIterSort(qIter, conditions, getExecContext());
    return new TableN(qIter);
}
Also used : QueryIterator(org.apache.jena.sparql.engine.QueryIterator) TableN(org.apache.jena.sparql.algebra.table.TableN)

Example 85 with QueryIterator

use of org.apache.jena.sparql.engine.QueryIterator in project jena by apache.

the class EvaluatorSimple method reduced.

@Override
public Table reduced(Table table) {
    QueryIterator qIter = table.iterator(getExecContext());
    qIter = new QueryIterReduced(qIter, getExecContext());
    return new TableN(qIter);
}
Also used : QueryIterator(org.apache.jena.sparql.engine.QueryIterator) TableN(org.apache.jena.sparql.algebra.table.TableN)

Aggregations

QueryIterator (org.apache.jena.sparql.engine.QueryIterator)126 Binding (org.apache.jena.sparql.engine.binding.Binding)27 Op (org.apache.jena.sparql.algebra.Op)15 Node (org.apache.jena.graph.Node)13 TableN (org.apache.jena.sparql.algebra.table.TableN)13 ArrayList (java.util.ArrayList)12 ResultSetStream (org.apache.jena.sparql.engine.ResultSetStream)10 Var (org.apache.jena.sparql.core.Var)9 ResultSet (org.apache.jena.query.ResultSet)8 QueryIterPlainWrapper (org.apache.jena.sparql.engine.iterator.QueryIterPlainWrapper)8 Triple (org.apache.jena.graph.Triple)6 ExecutionContext (org.apache.jena.sparql.engine.ExecutionContext)6 BasicPattern (org.apache.jena.sparql.core.BasicPattern)5 QueryIterConcat (org.apache.jena.sparql.engine.iterator.QueryIterConcat)5 Table (org.apache.jena.sparql.algebra.Table)4 DatasetGraph (org.apache.jena.sparql.core.DatasetGraph)4 HashSet (java.util.HashSet)3 Plan (org.apache.jena.sparql.engine.Plan)3 BindingMap (org.apache.jena.sparql.engine.binding.BindingMap)3 Procedure (org.apache.jena.sparql.procedure.Procedure)3