// values, a value partition class, a property we...
// 1) Make the classes which represent the values, subclasses of the
// value partition class
for (OWLClassExpression valuePartitionValue : valuePartitionClasses) {
assert valuePartitionValue != null;
addChange(new AddAxiom(targetOntology, getDataFactory()
.getOWLSubClassOfAxiom(valuePartitionValue,
valuePartitionClass)));
}
// 2) Make the values disjoint
addChange(new AddAxiom(targetOntology, getDataFactory()
.getOWLDisjointClassesAxiom(valuePartitionClasses)));
// 3) Add a covering axiom to the value partition
OWLClassExpression union = getDataFactory().getOWLObjectUnionOf(
valuePartitionClasses);
addChange(new AddAxiom(targetOntology, getDataFactory()
.getOWLSubClassOfAxiom(valuePartitionClass, union)));
// 4) Make the property functional
addChange(new AddAxiom(targetOntology, getDataFactory()
.getOWLFunctionalObjectPropertyAxiom(valuePartitionProperty)));
// 5) Set the range of the property to be the value partition
addChange(new AddAxiom(targetOntology, getDataFactory()
.getOWLObjectPropertyRangeAxiom(valuePartitionProperty,
valuePartitionClass)));
}