// Restrictions //Now we want to say that Person has exactly 1 Age,
// exactly 1 Gender and, only has gender that is male or female. We will
// deal with these restrictions one by one and then combine them as a
// superclass (Necessary conditions) of Person. All anonymous class
// expressions extend OWLClassExpression. First, hasAge exactly 1
OWLDataExactCardinality hasAgeRestriction = factory
.getOWLDataExactCardinality(1, hasAge);
// Now the hasGender exactly 1
OWLObjectExactCardinality hasGenderRestriction = factory
.getOWLObjectExactCardinality(1, hasGender);
// And finally, the hasGender only {male female} To create this