* patch from garpinc against nulls -
* http://issues.semweb4j.org/browse/RTGO-65
*/
public QueryRow next() {
QuerySolution qs = this.resultSet.nextSolution();
QueryRowImpl row = new QueryRowImpl();
for(String v : this.table.getVariables()) {
RDFNode node = qs.get(v);
assert node != null : "null node for varname " + v
+ ". Do you have unbound variables in the query?";
try {
row.put(v, TypeConversion.toRDF2Go((node == null ? null : node.asNode())));
} catch(ModelRuntimeException e) {
throw new ModelRuntimeException(e);
}
}
return row;