// does not contain class A or classB, we simply get references to
// objects from a data factory that represent class A and class B
OWLClass clsA = factory.getOWLClass(IRI.create(ontologyIRI + "#A"));
OWLClass clsB = factory.getOWLClass(IRI.create(ontologyIRI + "#B"));
// Now create the axiom
OWLAxiom axiom = factory.getOWLSubClassOfAxiom(clsA, clsB);
// We now add the axiom to the ontology, so that the ontology states
// that A is a subclass of B. To do this we create an AddAxiom change
// object. At this stage neither classes A or B, or the axiom are
// contained in the ontology. We have to add the axiom to the ontology.
AddAxiom addAxiom = new AddAxiom(ontology, axiom);