On Thu, 2008-07-31 at 14:33 -0700, Peter Ansell wrote:
> Have you tried
> 
> FILTER( bif:contains(?name, '"blood*"'))
> 
> It my actually result in a different compilation strategy although it does 
> the same thing as far as I know.
> 
> I also wasn't aware that GRAPH operated outside of UNION. I would tend to put 
> the two GRAPH's into the UNION parts myself as follows.
> 
> BASE   <http://www.semantic-systems-biology.org/>
> PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>
> PREFIX ssb:<http://www.semantic-systems-biology.org/SSB#>
> SELECT ?name ?unique_id
> WHERE {
> {
> GRAPH <OBO> 
> {
>    ?unique_id rdfs:label ?name.
>    FILTER( bif:contains(?name, '"blood*"'))
> }
> }
> UNION
> {
> GRAPH <OBO>
> {
>    ?unique_id ssb:name ?name.
>    FILTER( bif:contains(?name, '"blood*"'))
> }
> }
> }
> 
> I was also under the impression that GRAPH names needed to be IRI/URI syntax. 
> Does BASE influence the GRAPH reference?

Yes, BASE <http://www.semantic-systems-biology.org/> turns <OBO> into
<http://www.semantic-systems-biology.org/OBO>


BTW the query can be written as

BASE   <http://www.semantic-systems-biology.org/>
PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>
PREFIX ssb:<http://www.semantic-systems-biology.org/SSB#>
SELECT ?name ?unique_id FROM <OBO>
WHERE {
  { 
    ?unique_id rdfs:label ?name .
    ?name bif:contains '"blood*"' .
  }
  UNION
  {
    ?unique_id ssb:name ?name.
    ?name bif:contains '"blood*"' .
  }
}

The generated SQL seems to be adequate (and identical for both syntax variants).

Re. failed REGEX(), I need some small data and a full text of the query because 
I'm unable to reproduce the problem.

Best Regards,

Ivan Mikhailov,
OpenLink Software.



Reply via email to