use of org.apache.jena.sparql.engine.QueryIterator in project jena by apache.
the class ExecutionDispatch method visit.
@Override
public void visit(OpSlice opSlice) {
QueryIterator input = pop();
QueryIterator qIter = opExecutor.execute(opSlice, input);
push(qIter);
}
use of org.apache.jena.sparql.engine.QueryIterator in project jena by apache.
the class ExecutionDispatch method visit.
@Override
public void visit(OpDiff opDiff) {
QueryIterator input = pop();
QueryIterator qIter = opExecutor.execute(opDiff, input);
push(qIter);
}
use of org.apache.jena.sparql.engine.QueryIterator in project jena by apache.
the class ListBase method allLists.
protected QueryIterator allLists(Binding binding, Collection<Node> x, Var listVar, Node predicate, PropFuncArg argObject, ExecutionContext execCxt) {
// BFI: Find all lists; work hard.
QueryIterConcat qIter = new QueryIterConcat(execCxt);
for (Node n : x) {
Binding b = BindingFactory.binding(binding, listVar, n);
QueryIterator q = execOneList(b, n, predicate, argObject, execCxt);
qIter.add(q);
}
return qIter;
}
use of org.apache.jena.sparql.engine.QueryIterator in project jena by apache.
the class container method execEvaluatedConcrete.
// Ask directly.
private QueryIterator execEvaluatedConcrete(Binding binding, Node containerNode, Node predicate, Node member, ExecutionContext execCxt) {
QueryIterator input = QueryIterSingleton.create(binding, execCxt);
Graph graph = execCxt.getActiveGraph();
QueryIterator qIter = new QueryIterTriplePattern(input, new Triple(containerNode, predicate, member), execCxt);
return qIter;
}
use of org.apache.jena.sparql.engine.QueryIterator in project jena by apache.
the class QueryTest method unique.
private static ResultSetRewindable unique(ResultSetRewindable results) {
// VERY crude. Utilises the fact that bindings have value equality.
List<Binding> x = new ArrayList<>();
Set<Binding> seen = new HashSet<>();
for (; results.hasNext(); ) {
Binding b = results.nextBinding();
if (seen.contains(b))
continue;
seen.add(b);
x.add(b);
}
QueryIterator qIter = new QueryIterPlainWrapper(x.iterator());
ResultSet rs = new ResultSetStream(results.getResultVars(), ModelFactory.createDefaultModel(), qIter);
return ResultSetFactory.makeRewindable(rs);
}
Aggregations