Is there some way to state in RDF/RDFs, that any resource that has a given property is a subclass of a specific class? (or the other case with the object not the subject)
rdfs:domain (respectively range) is close to that but the definition of domain includes "instance", not "subclass":
rdfs:domain is an instance of rdf:Property that is used to state that any resource that has a given property is an instance of one or more classes. RDF Schema 1.1
As an example szenario where this is needed (as range, not domain), imagine that you want to express that :John :likes :Vegetable
, where :Vegetable
is a subclass of food.
:likes rdfs:range owl:Class
would cover the example but it would be too general.
:likes rdfs:range :Food
would be incorrect, because :Vegetable
is not an instance of :Food
but a subclass.
Something like :likes rdfs:range Powerset(:Food)
would be better but I don't know how to specify that using RDF and RDFs.
In Java, it would be:
public abstract class Person
{
public static class Food {}
abstract Class<? extends Food> likes();
}
One could model that using OWL axioms with universal quantification but I wonder if that is possible without OWL, because I have large amount of statments that I want to upload to a SPARQL endpoint and expressing OWL axioms in RDF increases the amount of triples by a large amount and makes practical use such as SPARQL queries more complex.