OWL Punning using the same resource as object of rdf:type and rdfs:subClassOf?
Using Punning, one can model the same RDF resource as both a class and an individual at the same time. However in the examples I looked at, a resource is never used as object of both rdf:type
and rdfs:subClassOf
for the same subject. Is that an acceptable way of modelling or would a paper describing that dataset be rejected to due horrible modelling practices? I do not want to use any OWL reasoning or inferencing, just SHACL validation, which this would enable.
Example
:Animal a owl:Class.
:family a owl:ObjectProperty; rdfs:domain :Animal.
:order a owl:ObjectProperty; rdfs:domain :Animal.
:Elefant rdfs:subClassOf :Animal;
rdf:type :Animal;
:family :Elephantidae;
:order :Proboscidea.
The reason I need both is that I want a subclass hierarchy, but I also have some properties that I want to attach to each one, and rdfs:domain only works with individuals, not classes.
Alternative
Alternatively, I could model it in the following way but that feels much less elegant to me:
:Animal a owl:Class.
:AnimalSubClass a owl:Class.
:family a owl:ObjectProperty; rdfs:domain :AnimalSubclass.
:order a owl:ObjectProperty; rdfs:domain :AnimalSubclass.
:Elefant rdfs:subClassOf :Animal;
rdf:type :AnimalSubClass;
:family :Elephantidae;
:order :Proboscidea.
Solution 1:
I would probably go with your first approach rather than the alternative. Particularly because punning does not have a substantial affect on reasoning in OWL 2. In OWL 1 it caused an ontology to be in the OWL Full profile rather than the OWL DL profile. For OWL 2 this is no longer the case. See OWL 2 DL and OWL 2 Full.