.getOWLObjectExactCardinality(1, hasGender);
// And finally, the hasGender only {male female} To create this
// restriction, we need an OWLObjectOneOf class expression since male
// and female are individuals We can just list as many individuals as we
// need as the argument of the method.
OWLObjectOneOf maleOrFemale = factory.getOWLObjectOneOf(male, female);
// Now create the actual restriction
OWLObjectAllValuesFrom hasGenderOnlyMaleFemale = factory
.getOWLObjectAllValuesFrom(hasGender, maleOrFemale);
// Finally, we bundle these restrictions up into an intersection, since
// we want person to be a subclass of the intersection of them