String temp = scopeId + "/" + ontologyId;
OntologySpace space = scope.getCoreSpace();
if (temp.equals(space.getID())) rb = Response.ok(space.export(OWLOntology.class, merge));
else {
space = scope.getCustomSpace();
if (temp.equals(space.getID())) rb = Response.ok(space.export(OWLOntology.class, merge));
else {
OWLOntology o = null;
IRI ontologyIri = IRI.create(ontologyId);
OntologySpace spc = scope.getCustomSpace();
if (spc != null && spc.hasOntology(ontologyIri)) {