I've made an ontology in Protégé 5 using OWL/XML syntax. I have included a class Cerveza and another class Color among others. Under Color, I have 3 subclasess: Claro (pale), Medio (medium) and Oscuro (dark):
I made a data property called EBC xsd:int, which domain is class Cerveza:
So I made a restriction to class Claro to have maximum 12 EBC degrees:
Then I create an individual called kk and I assert the property EBC=10:
I started reasoner Pellet, and it is inferring that, as kk has EBC kk has to belong to class Cerveza. But I was expecting somehow to infer that kk belongs to Class Color / Subclass claro.
What is wrong in this design?
You are confusing datatype restrictions (7.5) and data property cardinality restrictions (8.5).
Instead of:
Class: Claro
SubClassOf: EBC max 12 xsd:int
you should write:
Class: Claro
EquivalentTo: EBC some xsd:int[<= 12]