private void checkForOntologyIDChange(OWLOntologyChange change) {
if (change instanceof SetOntologyID) {
SetOntologyID setID = (SetOntologyID) change;
OWLOntology existingOntology = ontologiesByID.get(((SetOntologyID) change).getNewOntologyID());
if (existingOntology != null && !change.getOntology().equals(existingOntology)) {
throw new OWLOntologyRenameException(change, ((SetOntologyID) change).getNewOntologyID());
}
renameOntology(setID.getOriginalOntologyID(), setID.getNewOntologyID());
resetImportsClosureCache();
}
}