Hi all,

my apologies if this has already been discussed a million times
before, but I have not been able to find an answer with Google...

I am using Jena to do queries to remote SPARQL end points in the Jena
plugin for Bioclipse [0], and the Virtuoso end points typically
support the use of bif:contains, even with the bif prefix
unspecified... For example, with the SPARQL against
http://bio2rdf.org/sparql:

  SELECT * WHERE {?s ?p ?o . ?o bif:contains "aspirin" .}

However, Jena complains about the missing bif prefix (logical, fair):

------------------------------------------------------------------------------------------------------------------------
com.hp.hpl.jena.query.QueryParseException: Line 1, column 31: Unresolved
prefixed name: bif:contains
------------------------------------------------------------------------------------------------------------------------

This email thread lists the bif namespace [1], so I tried:

PREFIX bif: <http://www.openlinksw.com/schema/sparql/extensions#>
SELECT * WHERE {?s ?p ?o . ?o bif:contains "aspirin" .}

But that fails with the end point with:

------------------------------------------------------------------------------------------------------------------------
37000 Error SP030: SPARQL compiler, line 1: Prefixes 'sql:' and 'bif:'
are reserved for SQL names at
'<http://www.openlinksw.com/schema/sparql/extensions#>' before
'SELECT'

SPARQL query:
define sql:signal-void-variables 1 PREFIX bif:
<http://www.openlinksw.com/schema/sparql/extensions#>
SELECT * WHERE {?s ?p ?o . ?o bif:contains "aspirin" .}
------------------------------------------------------------------------------------------------------------------------

What workaround or solution should I be thinking about to solve this problem?

Egon

0.http://chem-bla-ics.blogspot.com/2009/08/bioclipse-and-sparql-end-points-2.html
1.http://www.mail-archive.com/[email protected]/msg00494.html

-- 
Post-doc @ Uppsala University
Homepage: http://egonw.github.com/
Blog: http://chem-bla-ics.blogspot.com/
PubList: http://www.citeulike.org/user/egonw/tag/papers

Reply via email to