}
OWLOntologyID id = new OWLOntologyID(of(ontologyIRI), absent());
IRI documentIRI = getDocumentIRIFromMappers(id, true);
if (documentIRI != null) {
if (documentIRIsByID.values().contains(documentIRI) && !allowExists) {
throw new OWLOntologyDocumentAlreadyExistsException(documentIRI);
}
// The ontology might be being loaded, but its IRI might
// not have been set (as is probably the case with RDF/XML!)
OWLOntology ontByDocumentIRI = getOntologyByDocumentIRI(documentIRI);
if (ontByDocumentIRI != null) {