while(results.hasNext()){
BindingSet result = results.next();
Value value = result.getValue(query.getRootVariableName());
if(value instanceof URI){
//copy all data to the model and create the representation
RdfRepresentation rep = createRepresentationGraph(con, valueFactory, (URI)value);
model.add(queryRoot, queryResult, value); //link the result with the query result
representations.add(rep);
} //ignore non URI results
}
con.commit();