Re: Musings on SPARQL Queries

Thanks very much, Ivan, that is indeed most helpful! (It also shows the 
dangers of relying too much on one implementation). I'm working on the 
resource grouping doc today and hope to get the part where this fits in.

Cheers

Phil.

Ivan Herman wrote:
> Phil,
> 
> I was just playing/testing some SPARQL endpoints on my machine, and I
> glanced through your document...
> 
> I ran the following query:
> 
> BASE <http://www.fosi.org/projects/powder/multiple_examples.rdf>
> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
> PREFIX foaf: <http://xmlns.com/foaf/0.1/>
> PREFIX owl: <http://www.w3.org/2002/07/owl#>
> PREFIX dcterms: <http://purl.org/dc/terms/>
> PREFIX wdr: <http://www.w3.org/2007/05/powder#>
> PREFIX ex: <http://example.org#>
> 
> SELECT ?maker ?rs ?setProp ?setValue ?ds ?dsProp ?dsValue ?issued
> ?validUntil
> FROM <http://www.fosi.org/projects/powder/multiple_examples.rdf>
> WHERE {
>   <http://www.fosi.org/projects/powder/multiple_examples.rdf#DR3>
> foaf:hasMaker ?maker .
>   <http://www.fosi.org/projects/powder/multiple_examples.rdf#DR3>
> wdr:hasScope ?rs.
>   <http://www.fosi.org/projects/powder/multiple_examples.rdf#DR3>
> wdr:hasDescription ?ds .
> 
>   OPTIONAL {?rs ?setProp ?setValue} .
>   OPTIONAL {?ds ?dsProp ?dsValue} .
>   OPTIONAL
> {<http://www.fosi.org/projects/powder/multiple_examples.rdf#DR3>
> dcterms:issued ?issued} .
>   OPTIONAL
> {<http://www.fosi.org/projects/powder/multiple_examples.rdf#DR3>
> wdr:validUntil ?validUntil}
> }
> 
> 
> On Joseki and on Virtuoso Open Link, and both gave a correct result, see
> the attached HTML file. As you could see, I had difficulties in getting
> BASE working correctly (at least on Virtuoso), I will have to test it
> more, but as far as your document goes, I think the conclusion should be
> that query #8 should work.
> 
> I hope it helps
> 
> Ivan
> 
> 
> 
> Phil Archer wrote:
>> Hi all,
>>
>> As trailed earlier, I've been playing with SPARQL queries on the sort of
>> data we're starting to build. In particular, I want to see how the
>> resource grouping issue tumbles out and whether the queries become so
>> ridiculous as to warrant a serious consideration of an alternative
>> approach.
>>
>> To this end I've created a file full of DRs with different (and
>> increasingly complex) Resource Sets and worked through some test
>> queries. It's not finished yet but I've been at it all day and we're
>> heading into a holiday weekend so it'll have to do for now. I believe,
>> however, that with a small number of queries it's possible to extract
>> all the necessary data from a DR, including all the attribution, scope
>> and description data. Obviously it gets more difficult if you have
>> complex data but essentially, it's looking quite simple - I think.
>>
>> Cédric - can I ask you to upload this to the (public) web space please.
>> Meanwhile, it's attached.
>>
>> Cheers
>>
>> Phil.
> 

Received on Wednesday, 30 May 2007 09:33:00 UTC