Search in sources :

Example 1 with QueryIterTriplePattern

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

the class StageGeneratorAlt method execute.

@Override
public QueryIterator execute(BasicPattern pattern, QueryIterator input, ExecutionContext execCxt) {
    // Test ::  execCxt.getActiveGraph() 
    if (!(execCxt.getActiveGraph() instanceof GraphBase))
        // not based on GraphBase (which most Graph implementations are). 
        return other.execute(pattern, input, execCxt);
    System.err.println("MyStageGenerator.compile:: triple patterns = " + pattern.size());
    // Stream the triple matches together, one triple matcher at a time. 
    QueryIterator qIter = input;
    for (Triple triple : pattern.getList()) qIter = new QueryIterTriplePattern(qIter, triple, execCxt);
    return qIter;
}
Also used : Triple(org.apache.jena.graph.Triple) QueryIterTriplePattern(org.apache.jena.sparql.engine.iterator.QueryIterTriplePattern) QueryIterator(org.apache.jena.sparql.engine.QueryIterator) GraphBase(org.apache.jena.graph.impl.GraphBase)

Aggregations

Triple (org.apache.jena.graph.Triple)1 GraphBase (org.apache.jena.graph.impl.GraphBase)1 QueryIterator (org.apache.jena.sparql.engine.QueryIterator)1 QueryIterTriplePattern (org.apache.jena.sparql.engine.iterator.QueryIterTriplePattern)1