@Override protected boolean accept(BindingSet outputBindings) throws QueryEvaluationException { return QueryResults.bindingSetsCompatible(inputBindings, outputBindings); } }
@Override protected boolean accept(BindingSet outputBindings) throws QueryEvaluationException { return QueryResults.bindingSetsCompatible(inputBindings, outputBindings); } }
if (QueryResults.bindingSetsCompatible(excluded, object)) {
if (QueryResults.bindingSetsCompatible(excluded, object)) {
@Override protected BindingSet getNextElement() throws QueryEvaluationException { BindingSet result = super.getNextElement(); // Ignore all results that are not compatible with the input bindings while (result != null && !QueryResults.bindingSetsCompatible(inputBindings, result)) { result = super.getNextElement(); } if (result != null) { // Make sure the provided problemVars are part of the returned results // (necessary in case of e.g. LeftJoin and Union arguments) QueryBindingSet extendedResult = null; for (String problemVar : problemVars) { if (!result.hasBinding(problemVar)) { if (extendedResult == null) { extendedResult = new QueryBindingSet(result); } extendedResult.addBinding(problemVar, inputBindings.getValue(problemVar)); } } if (extendedResult != null) { result = extendedResult; } } return result; }
@Override public boolean push(BindingSet bs) throws InterruptedException { if (bs == null) { return parent.push(null); } if (QueryResults.bindingSetsCompatible(bindings, bs)) { // Make sure the provided problemVars are part of the returned results // (necessary in case of e.g. LeftJoin and Union arguments) QueryBindingSet extendedResult = null; for (String problemVar : problemVars) { if (!bs.hasBinding(problemVar)) { if (extendedResult == null) { extendedResult = new QueryBindingSet(bs); } extendedResult.addBinding(problemVar, bindings.getValue(problemVar)); } } if (extendedResult != null) { bs = extendedResult; } return parent.push(bs); } return true; } };
@Override protected BindingSet getNextElement() throws QueryEvaluationException { BindingSet result = super.getNextElement(); // Ignore all results that are not compatible with the input bindings while (result != null && !QueryResults.bindingSetsCompatible(inputBindings, result)) { result = super.getNextElement(); } if (result != null) { // Make sure the provided problemVars are part of the returned results // (necessary in case of e.g. LeftJoin and Union arguments) QueryBindingSet extendedResult = null; for (String problemVar : problemVars) { if (!result.hasBinding(problemVar)) { if (extendedResult == null) { extendedResult = new QueryBindingSet(result); } extendedResult.addBinding(problemVar, inputBindings.getValue(problemVar)); } } if (extendedResult != null) { result = extendedResult; } } return result; }