Assume that we have the following shapes:
==========================
ex:Person
a owl:Thing ;
a sh:NodeShape ;
sh:property ex:Person-hasFriend ;
.
ex:Person-hasFriend
a sh:PropertyShape ;
sh:path ex:hasFriend ;
sh:class ex:Person ;
.
ex:NicePerson
a sh:NodeShape ;
rdfs:subClassOf ex:Person ;
.
==========================
and the following instance data:
==========================
ex:Alice a ex:NicePerson .
ex:Peter a ex:NicePerson .
ex:Peter ex:hasFriend ex:Alice .
==========================
The validation for the above instance data will fail, because ex:Alice is explicitly a ex:NicePerson instead of a ex:Person. However, ex:Alice is indeed implicitly a ex:Person (RDFS inference). Is there a solution to define a superclass in a property shape in order to validate the instances of its subclasses? The reason why I am asking is that we currently have to list all of the subclasses with "sh:or" in a property shape, in order to pass the validation, which is very tedious.
Thanks.
Best regards, Kai