public CloseableIteration<BindingSet, QueryEvaluationException> evaluate(final Intersection intersection,
final BindingSet bindings)
throws QueryEvaluationException
{
Iteration<BindingSet, QueryEvaluationException> leftArg, rightArg;
leftArg = new DelayedIteration<BindingSet, QueryEvaluationException>() {
@Override
protected Iteration<BindingSet, QueryEvaluationException> createIteration()
throws QueryEvaluationException
{
return evaluate(intersection.getLeftArg(), bindings);
}
};
rightArg = new DelayedIteration<BindingSet, QueryEvaluationException>() {
@Override
protected Iteration<BindingSet, QueryEvaluationException> createIteration()
throws QueryEvaluationException
{
return evaluate(intersection.getRightArg(), bindings);
}
};
return new IntersectIteration<BindingSet, QueryEvaluationException>(leftArg, rightArg);
}