In my ontology, I have very generic object properties, i.e. the range of which is very large, i.e. the domain of these object properties are classes that are very high in the tree of entities. The range of these object properties are also very generic.
E.g. data_prop1 has domain class1. Suppose that class2 is a level3-child of class1. By definition of data_prop1, data_prop1 applies on class2.
I would like to prevent this, using a class restriction on class2
An easy way would be to :
1) create a specific 'empty_class' entity
2) create a restriction class on class2 of the form :
class2 data_prop1 empty_class.
Doing this, my program would detect the range in the data restriction and compare it to empty_class to do the appropriate processing.
I would like to know is there is a more standard way to do this (i.e. without creating additional classes or other objects)
Thank you in advance for your help.
I wish you a good day.
There is no standard way to do that, because this is normally not allowed in ontologies. If you assert some fact at a given level of the class hierarchy, it MUST remain true at the lowest levels. You cannot have "exception", such as a general rule like "all birds fly" and then state that "ostrich are birds but they don't fly".