I'm trying to access to the property inherited of a parent class in RDF. I define an instance of my child class using the rdfs property subClassOf.
With a turtle syntax :
ex:myClass1 a owl:class;
rdfs:range xsd:integer.
ex:myClass2 rdfs:subClassOf ex:myClass1.
# defining instance of my class
ex:instance1 ex:myClass1 1 .
ex:instance2 ex:myClass2 2 .
If I want to access to the property ex:property of all ex:myClass1 and his child. Can I admit that ex:myClass2 is a ex:myClass1 and write this SPARQL query
SELECT ?instance ?value WHERE{
?instance ex:myClass1 ?value .
}
to obtain the two values I've defined? Or rdfs:subClassOf doesn't define a child class as a more specificaly version of the parent class?