}
first = false;
} else {
int num_tokens = tokens.length;
if ( num_tokens != vars.size() ) {
throw new ARQException(String.format("Line %d has %d values instead of %d.", line, num_tokens, vars.size()));
}
BindingMap binding = BindingFactory.create();
for ( int i = 0; i < tokens.length; i++ ) {
String token = tokens[i];
Tokenizer tokenizer = TokenizerFactory.makeTokenizerString(token);
if ( tokenizer.hasNext() && token.length() > 0 ) {
Node node = tokenizer.next().asNode();
binding.add(vars.get(i), node);
}
}
bindings.add(binding);
}
}
} catch ( IOException ex ) {
throw new ARQException(ex) ;
}
return new ResultSetStream(varNames, null, new QueryIterPlainWrapper(bindings.iterator()));
}