Created
July 30, 2011 19:30
-
-
Save kendall/1115894 to your computer and use it in GitHub Desktop.
Spring Select fragment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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