} catch (OWLOntologyCreationException e) {
throw new RuntimeException(e);
}
else if (ref instanceof UriRef) {
log.debug("Deferring addition to stored Clerezza graph {} (if available).", ref);
key = addOntology(new GraphSource((UriRef) ref));
} else if (ref instanceof OWLOntologyID) {
OWLOntologyID idref = (OWLOntologyID) ref;
log.debug("Deferring addition to stored ontology with public key {} (if available).", ref);
if (!ontologyProvider.hasOntology(idref)) throw new MissingOntologyException(this, idref);
key = idref;