use of org.eclipse.rdf4j.query.QueryEvaluationException in project rdf4j by eclipse.
the class ServiceJoinConversionIteration method convert.
@Override
protected BindingSet convert(BindingSet bIn) throws QueryEvaluationException {
// overestimate the capacity
SPARQLQueryBindingSet res = new SPARQLQueryBindingSet(bIn.size() + bindings.size());
int bIndex = -1;
Iterator<Binding> bIter = bIn.iterator();
while (bIter.hasNext()) {
Binding b = bIter.next();
String name = b.getName();
if (name.equals("__rowIdx")) {
bIndex = Integer.parseInt(b.getValue().stringValue());
continue;
}
res.addBinding(b.getName(), b.getValue());
}
// is dealt with in another place)
if (bIndex == -1)
throw new QueryEvaluationException("Invalid join. Probably this is due to non-standard behavior of the SPARQL endpoint. " + "Please report to the developers.");
res.addAll(bindings.get(bIndex));
return res;
}
Aggregations