// first remove a random axiom
List<OWLAxiom> axiomsToRemove = new ArrayList<OWLAxiom>( TestUtils.selectRandomAxioms( ontology, 1 ) );
for( OWLAxiom axiomToRemove : axiomsToRemove ) {
OWL.manager.applyChange( new RemoveAxiom(ontology, axiomToRemove ) );
}
// add the axiom back but do not classify
for( OWLAxiom axiomToAdd : axiomsToRemove ) {
OWL.manager.applyChange( new AddAxiom(ontology, axiomToAdd ) );
}
// remove another random axiom
List<OWLAxiom> axiomsToRemove2 = new ArrayList<OWLAxiom>( TestUtils.selectRandomAxioms( ontology, 1 ) );
for( OWLAxiom axiomToRemove : axiomsToRemove2 ) {
OWL.manager.applyChange( new RemoveAxiom(ontology, axiomToRemove ) );
}
// classify (i.e., update)
modular.classify();