I have a class Person, and a set of data properties: First_Name, Surname, Gender, DoB, Country_of_Birth. The data properties have their Domains set to Person. What i would like to set up in my ontology is a rule which states that every Person must have exactly 1 of each of these properties.
So in Protege, I set up Person as a subclass of "First_Name exactly 1 xsd:string", "Surname exactly 1 xsd:string" and so on. I then set up an Individual with a Surname, but no First_Name, Gender etc.
I then run the reasoner. What I would expect is for it to throw a fit about inconsistency (Surname is being assigned to an individual which does not conform to the requirements to be a Person) but no, the reasoner infers that the Individual is a Person despite the fact that it does not have the required properties.
Is this proper behaviour? How do I make the ontology behave in the way that I want it to? Because what I want is for the ontology to be robust against incomplete data (so you can't add a person with no name, for example).
Yes, that is proper behavior due to Protege using the open world assumption rather than the closed world assumption of for example relational databases. Under the open world assumption nothing can be assumed that is not stated explicitly or can be derived from explicitly known information. When you create an individual (possibly of type
Person
) for which you assigned noFirst_Name
, under the open world assumption the reasoner merely assumes that theFirst_Name
is not known, not that it does not exist (as is the case for the closed world assumption). Hence, the reason why the reasoner gives no inconsistency even though it infers that the individual must be of typePerson
. To get an inconsistency you have to state that it is known that the individual is both aPerson
and does not have aFirst_Name
. This can be achieved for an individualjohn
by asserting: