Hello Egon,
The default declaration for "bif:" namespace-prefix is "bif:"
namespace-absolute-iri. So the most popular workaround for "smart"
clients is
sparql SELECT * WHERE {?s ?p ?o . ?o <bif:contains> "aspirin" .};
i.e. just write it as an absolute IRI.
Similar trick works for "sql:" prefix.
Best Regards,
Ivan Mikhailov
OpenLink Software
http://virtuoso.openlinksw.com
On Thu, 2009-10-15 at 14:08 +0200, Egon Willighagen wrote:
> 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
>