public void removeOntology(OWLOntologyID publicKey) throws OntologyCollectorModificationException {
if (publicKey == null) throw new IllegalArgumentException(
"Cannot remove an ontology by providing a null public key.");
if (publicKey.getOntologyIRI() == null) throw new IllegalArgumentException(
"Cannot remove an ontology whose public key has a null ontology IRI.");
if (locked) throw new UnmodifiableOntologyCollectorException(this);
Set<OWLOntologyID> aliases = ontologyProvider.listAliases(publicKey);
aliases.add(publicKey);
boolean removed = false;
for (OWLOntologyID alias : aliases)