I have an OWL 2 ontology containing several named individuals belonging to a class that need to have the same object property with the same value.
I would like to make this property assertion "on the class" in such a way that a reasoner could infer the property to be had by all of its members, thus without needing an explicit assertion for each. (obtaining something similar to a class-based object-oriented property inheritance)
A simple example could be an ontology containing the individuals milkBottle1
, milkBottle2
, milkBottle3
that belong to the class Milk
. They should all have the property containsNutrient
with the value protein
, but clearly this is something that is shared by all members of the Milk
class and should only be explicitly asserted once.
I have found the same question only here, but the only answer suggests an inappropriate solution: to make the class a subclass of a property restriction class. This leads the reasoner to infer the class to be equivalent to the Nothing class (since there are no named individuals with such property), thus creating an inconsistence because of the assignment of individuals to it.
I am aware that this is a straightforward task using a SWRL rule like
Milk(?a) → containsNutrient(?a, protein)
but I'd like to avoid them if possible.
Is this possible without workarounds in OWL 2? If so, how can it be done?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…