Use case for optional clauses

VIVID is a visualization tool that generates densely-packed displays of 
instance data.
It produces machine-generated SPARQL queries to retrieve the data it 
needs.  These
queries always contain optional clauses, and the larger ones contain 
multiple levels
of nested optionals.  Below is a sample of a relatively small query 
generated by VIVID.

My guess is that any GUI tool that retrieves batch quantities of RDF data
will have a similar need for optional clauses.

Cheers, Bob

SELECT ?Book, ?title, ?coverage, ?title2, ?isPartOf, ?description, 
?date, ?creator, ?title3, ?nationality
WHERE (?Book, 
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>,           
<http://www.siderean.com/bookdemo#Book>)
    AND (OPTIONAL (?Book, <http://purl.org/dc/elements/1.1/title>, ?title))
    AND (OPTIONAL ((?Book, <http://purl.org/dc/elements/1.1/coverage>, 
?coverage)
                   AND (OPTIONAL (?coverage, 
<http://purl.org/dc/elements/1.1/title>, ?title2))
                   AND (OPTIONAL (?coverage, 
<http://purl.org/dc/terms/isPartOf>, ?isPartOf))))
    AND (OPTIONAL (?Book, <http://purl.org/dc/elements/1.1/description>, 
?description))
    AND (OPTIONAL (?Book, <http://purl.org/dc/elements/1.1/date>, ?date))
    AND (OPTIONAL ((?Book, <http://purl.org/dc/elements/1.1/creator>, 
?creator)
                   AND (OPTIONAL (?creator, 
<http://purl.org/dc/elements/1.1/title>, ?title3))
                   AND (OPTIONAL (?creator, 
<http://www.siderean.com/bookdemo#nationality>,     ?nationality))))

Received on Thursday, 2 December 2004 16:46:46 UTC