use of org.aksw.simba.autoindex.es.model.Entity in project autoindex by dice-group.
the class SparqlHandler method getResults.
public ArrayList<Entity> getResults(int instances_limit) {
ResultSet results = this.getallinstances(instances_limit);
ArrayList<Entity> entity_list = new ArrayList<Entity>();
while (results.hasNext()) {
QuerySolution qs = results.next();
entity_list.add(new Entity(qs.getResource("type").getURI(), qs.getLiteral("label").getString(), Double.parseDouble(qs.getLiteral("v").getString())));
}
return entity_list;
}
Aggregations