On Fri, 2011-01-14 at 16:18 -0500, Squint6 wrote:
>
>
> Hi,
>
> I have a model to which I have added only the following:
>
> :Person rdfs:subClassOf :Mammal
> :Mammal rdfs:subClassOf :Animal
>
> I also have the following query:
> SELECT ?y
> WHERE
> { <http://mystuff/esa/Person>
> <http://www.w3.org/2000/01/rdf-schema#subClassOf> ?y}
>
> With no inferencing I expect this query to only return :Mammal, and it does.
> However, if I turn on RDFS, OWL, OWL-MINI or OWL-MICRO inferencing I would
> expect it to return :Mammal and :Animal. It does this in RDFS and OWL-MICRO,
> but not in OWL or OWL-MINI. If I add the additional statement that
> rdfs:subClassOf is transitive then it also works in OWL and OWL-MINI. Any
> ideas what is going on or what I am doing wrong or where my thinking is
> confused?
>
> I am using jena 2.6.4 and arq 2.8.7
Odd, definitely a bug, I've logged it in Jira.
Basically the OWL (and OWL_MINI) reasoners expect the classes to be
declared as owl:Class. If you add those declarations then you get the
rdfs:subClassOf inferences that you expect.
However, they are both supposed to be OWL Full reasoners and so the
inferences ought to be made anyway - without the class declarations the
data is still legal RDFS and so legal OWL Full even though it falls
outside DL.
I suspect the reason this has survived unnoticed for so long is that
most people either work with OWL ontologies and so tend to have the
class declarations around, or tend to use OWL_MICRO (which is the best
default OWL rule set choice anyway), or work with RDFS and so expect to
just use the RDFS reasoner. Certainly our test cases seem to have fallen
into that trap :(
[The right long term fix would be to scrap all of these choices anyway
in favour of OWL RL :) If only there were time to look at that.]
Dave