Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Spring Select fragment
String sparql = "SELECT ?a ?b WHERE { ?a <urn:test:b> ?b } LIMIT 5";
List<Map<String,String>> results = snarlTemplate.query(sparql, new RowMapper<Map<String,String>>() {
@Override
public Map<String,String> mapRow(BindingSet bindingSet) {
Map<String,String> map = new HashMap<String,String>();
map.put("a", bindingSet.getValue("a").stringValue());
map.put("b", bindingSet.getValue("b").stringValue());
return map;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.