SPARQL end points, Jena and bif:contains
I have been having fun with SPARQL in Bioclipse for a while now, and blogged at several occasions:
- NMRShiftDB enters rdf.openmolecules.net #2: SPARQL end point with Virtuoso
- Bioclipse and SPARQL end points #2: MyExperiment
- Bioclipse and SPARQL end points
One thing I had not been able to work out, is that Virtuoso uses a (rather nice) bif:contains extension that support indexing. However, Jena would complain with:
com.hp.hpl.jena.query.QueryParseException: Line 1, column 31: Unresolved
prefixed name: bif:contains
Defining the prefix did not solve the problem either, but Ivan Mikhailov just replied to my post to the virtuoso-user mailing list providing the solution.
The solution is in the fact that bif: is in its own namespace, which makes it possible to replace bif:contains by its
full reference <bif:contains>. I directly gave that a try in Bioclipse, and just succesfull ran this Bioclipse
script snippet:
rdf.sparqlRemote(
"http://bio2rdf.org/sparql",
"SELECT * WHERE {?s ?p ?o . ?o <bif:contains> \"aspirin\" .};"
);
Thanx, Ivan!
Additional details
Description
I have been having fun with SPARQL in Bioclipse for a while now, and blogged at several occasions:
Identifiers
- GUID
- https://doi.org/10.59350/g7yhg-frs33
- URL
- https://chem-bla-ics.linkedchemistry.info/2009/10/15/sparql-end-points-jena-and-bifcontains.html
Dates
- Issued
-
2009-10-15T02:00:00
- Updated
-
2026-03-19T01:00:00