Difficulties on a simple query involving inference / subclassing

Hello,

I have some difficulties on a trivial query across subclasses using inferencing. For data

grt:ClinicalTrial rdf:type owl:Class .

:studies rdf:type owl:Class .
:studies owl:subClassOf grt:ClinicalTrial .

grt:A a :studies .
grt:B a grt:ClinicalTrial .

I had expected the following query to return A and B:

SELECT ?s
WHERE
{
    ?s a grt:ClinicalTrial .
    # ?s ?p ?o .
}

However, the query (targeted at local context) only yields B. Why does it not return A as well ? Inferencing is turned on in the query window and I have tried both SL and RDFS. Am I lacking something in my data model ?

Ultimately, I would like it to run across two virtual graphs. I can query them individually just fine, but am failing to query for ClinicalTrial from virtual graph 1 and have returned also the studies from a second virtual graph. But it does not seem to be related to virtual graphs, but to inferencing on subclasses in general.

Lars

I think you want rdfs:subClassOf. It's not in the owl namespace

Thanks, it works now as expected. Stupid copy-paste error I need to reframe having worked a lot with syntax checking compilers ... :slight_smile:

Lars

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.