W3C home > Mailing lists > Public > public-rdf-dawg-comments@w3.org > May 2005

Re: SPARQL: extracting a subgraph is practically non-trivial, perhaps too hard

From: Dan Connolly <connolly@w3.org>
Date: Thu, 12 May 2005 10:01:08 -0500
To: Nicolas F Rouquette <nicolas.rouquette@jpl.nasa.gov>, public-rdf-dawg-comments@w3.org
Message-Id: <1115910069.13402.416.camel@localhost>

> 1) Extracting the list of the ontologies defined in DOLCE.

Hmm... I would expect to do that ala...

 SELECT ?ont WHERE { ?ONT rdf:type owl:Ontology }.

Does DOLCE not declare its ontologies using rdf:type owl:Ontology?

> I understand that SPARQL was specifically designed for context-free
> that could be executed very efficiently and that extracting _:x in this example
> requires tracking _:x and all of his "descendent" triples.
> Be as it may,
> it does not change the fact that this type of "projection" or "extraction"
> from an OWL ontology is  a reasonable thing to ask for.

Hmm... yes, in fact, we have adopted a closely related use case...

 2.17 Building Ontology Tools (Semantic Web)

note the "Motivates: Extensibility Mechanism" link below; i.e. we think
this sort of query might involve things beyond SPARQL 1.0.

Meanwhile, I think your query might be doable, if somewhat awkward,
using OPTIONAL...

> The problem boils down to a context-sensitive graph query
> to retrieve things like:
> ns1:requisite
>       rdf:type      owl:ObjectProperty ;
>       rdfs:domain   [ rdf:type      owl:Class ;
>                       owl:unionOf   (ns1:information-object ns1:course 
> ns1:role ns1:figure)
>                     ] ;
>       rdfs:range    ns1:parameter ;
>       rdfs:subPropertyOf  :immediate-relation-i ;
>       owl:inverseOf  ns1:requisite-for .
> In this case, there's a triple:
> ns1:requisite rdfs:domain _:x
> where _:x corresponds to this:
> [ rdf:type      owl:Class ;
>   owl:unionOf   (ns1:information-object ns1:course ns1:role ns1:figure)
> ]

You might try:

 { ?C rdfs:domain ?D.
   ?D rdf:type ?DT.
   ?D owl:unionOf ?DU }
WHERE { ?C rdfs:domain ?D.
        OPTIONAL { ?D rdf:type ?DT }
        OPTIONAL { ?D olw:unionOf ?DU }

and so on.

The lists are particularly problematic. We don't have a good design
for that, and we don't plan to in this version. See issue accessingCollections.

Dan Connolly, W3C http://www.w3.org/People/Connolly/
D3C2 887B 0F92 6005 C541  0875 0F91 96DE 6E52 C29E
see you at XTech in Amsterdam 24-27 May?
Received on Thursday, 12 May 2005 15:01:12 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:52:06 UTC