Yesterday I uploaded a Bioclipse feature that adds a rdf manager to handle RDF content, which includes SPARQL support. The below snippet shows application to the solubility data [3]:
This file contains 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
// download and process the ONS Solubility RDF data | |
ons = rdf.createStore() | |
rdf.importURL(ons,"http://github.com/egonw/onssolubility/raw/master/ons.solubility.rdf/ons.rdf") | |
rdf.sparql(ons,"SELECT DISTINCT ?type WHERE { ?s a ?type }") | |
// or, list all solutes: | |
rdf.sparql(ons,"SELECT ?s WHERE { ?s a <http://spreadsheet.google.com/plwwufp30hfq0udnEmRD1aQ/onto#Solute> }") | |
// or, just dump the whole database to the console | |
rdf.dump(ons) |
See also: