Search in sources :

Example 1 with BindingProjectNamed

use of org.apache.jena.sparql.engine.binding.BindingProjectNamed in project jena by apache.

the class QueryIterDistinctReduced method hasNextBinding.

@Override
protected final boolean hasNextBinding() {
    // Already waiting to go.
    if (slot != null)
        return true;
    // Always moves.
    for (; getInput().hasNext(); ) {
        Binding b = getInput().nextBinding();
        // Hide unnamed and internal variables.
        // Don't need to worry about rename scope vars 
        // (they are projected away in sub-SELECT ?var { ... }) 
        b = new BindingProjectNamed(b);
        if (isFreshSighting(b)) {
            slot = b;
            return true;
        }
    }
    return false;
}
Also used : Binding(org.apache.jena.sparql.engine.binding.Binding) BindingProjectNamed(org.apache.jena.sparql.engine.binding.BindingProjectNamed)

Example 2 with BindingProjectNamed

use of org.apache.jena.sparql.engine.binding.BindingProjectNamed in project jena by apache.

the class QueryIterDistinct method getInputNext.

/** Return the binding from the input, hiding any variables to be ignored. */
private Binding getInputNext() {
    Binding b = getInput().next();
    // Hide unnamed and internal variables.
    b = new BindingProjectNamed(b);
    return b;
}
Also used : Binding(org.apache.jena.sparql.engine.binding.Binding) BindingProjectNamed(org.apache.jena.sparql.engine.binding.BindingProjectNamed)

Aggregations

Binding (org.apache.jena.sparql.engine.binding.Binding)2 BindingProjectNamed (org.apache.jena.sparql.engine.binding.BindingProjectNamed)2