for (String s : customs)
log.debug("\tDetected custom ontology {}", s);
// Create the scope
log.debug("Rebuilding scope \"{}\"", scopeId);
Scope sc = null;
sc = /* factory. */createOntologyScope(scopeId, new BlankOntologySource());
// Populate the core space
if (cores.length > 0) {
OntologySpace corespc = sc.getCoreSpace();
corespc.tearDown();
for (int i = 0; i < cores.length; i++)
try {
corespc.addOntology(new RootOntologySource(IRI.create(cores[i])));
} catch (Exception ex) {
log.warn("Failed to import ontology " + cores[i], ex);
continue;
}
}
sc.setUp();
registerScope(sc);
sc.getCustomSpace().tearDown();
for (String locationIri : customs) {
try {
OntologyInputSource<?> src = new RootOntologySource(IRI.create(locationIri));
sc.getCustomSpace().addOntology(src);
log.debug("Added ontology from location {}", locationIri);
} catch (UnmodifiableOntologyCollectorException e) {
log.error("An error occurred while trying to add the ontology from location: "
+ locationIri, e);
continue;
}
}
sc.getCustomSpace().setUp();
}
/**
* Try to get activation policies
*/