Search in sources :

Example 1 with QueryIterExtendByVar

use of org.apache.jena.sparql.engine.iterator.QueryIterExtendByVar in project jena by apache.

the class SpatialOperationPFBase method variableSubject.

private QueryIterator variableSubject(Binding binding, Node s, SpatialMatch match, ExecutionContext execCxt) {
    Var v = Var.alloc(s);
    List<Node> r = query(match);
    // Make distinct. Note interaction with limit is imperfect
    r = Iter.iter(r).distinct().toList();
    QueryIterator qIter = new QueryIterExtendByVar(binding, v, r.iterator(), execCxt);
    return qIter;
}
Also used : QueryIterator(org.apache.jena.sparql.engine.QueryIterator) QueryIterExtendByVar(org.apache.jena.sparql.engine.iterator.QueryIterExtendByVar) Var(org.apache.jena.sparql.core.Var) Node(org.apache.jena.graph.Node) QueryIterExtendByVar(org.apache.jena.sparql.engine.iterator.QueryIterExtendByVar)

Example 2 with QueryIterExtendByVar

use of org.apache.jena.sparql.engine.iterator.QueryIterExtendByVar in project jena by apache.

the class listMember method execObjectBound.

@Override
protected QueryIterator execObjectBound(Binding binding, Var listVar, Node predicate, Node object, ExecutionContext execCxt) {
    // Given a concrete node, find lists it's in
    GNode gnode = new GNode(execCxt.getActiveGraph(), object);
    List<Node> lists = GraphList.listFromMember(gnode);
    return new QueryIterExtendByVar(binding, listVar, lists.iterator(), execCxt);
}
Also used : GNode(org.apache.jena.sparql.util.graph.GNode) Node(org.apache.jena.graph.Node) GNode(org.apache.jena.sparql.util.graph.GNode) QueryIterExtendByVar(org.apache.jena.sparql.engine.iterator.QueryIterExtendByVar)

Aggregations

Node (org.apache.jena.graph.Node)2 QueryIterExtendByVar (org.apache.jena.sparql.engine.iterator.QueryIterExtendByVar)2 Var (org.apache.jena.sparql.core.Var)1 QueryIterator (org.apache.jena.sparql.engine.QueryIterator)1 GNode (org.apache.jena.sparql.util.graph.GNode)1