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

> 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
queries
> 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)
 http://www.w3.org/TR/rdf-dawg-uc/#u2.17

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...
http://www.w3.org/TR/2005/WD-rdf-sparql-query-20050419/#optionals

> 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:

CONSTRUCT
 { ?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.
http://www.w3.org/2001/sw/DataAccess/issues#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