Thursday, October 15, 2009

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:
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:
  "SELECT * WHERE {?s ?p ?o . ?o <bif:contains> \"aspirin\" .};"

Thanx, Ivan!

1 comment:

  1. Thanks Egon and Ivan, you helped me get Virtuoso + Jena going and saved me quite some time asking and waiting for answer in the mailing lists for this bif:contains issue!