this.query = query;
}
private ResultBinding convertBinding(Binding binding) {
ResultBinding pelletBinding = new ResultBindingImpl();
GraphLoader loader = pellet.getLoader();
for( Iterator<?> vars = binding.vars(); vars.hasNext(); ) {
Var var = (Var) vars.next();
Node value = binding.get( var );
if( value != null ) {
ATermAppl pelletVar = ATermUtils.makeVar( var.getVarName() );
ATermAppl pelletValue = loader.node2term( value );
pelletBinding.setValue( pelletVar, pelletValue );
}
}
return pelletBinding;