if (session != null) {
set.add(session.export(OWLOntology.class, true));
}
if (set.size() == 1) return set.iterator().next();
OWLOntologyMerger merger = new OWLOntologyMerger(new OWLOntologySetProvider() {
@Override
public Set<OWLOntology> getOntologies() {
return set;
}
});
return merger.createMergedOntology(createOWLOntologyManager(),
IRI.create("reasoners:input-" + System.currentTimeMillis()));
} catch (OWLOntologyCreationException e) {
String message = "The network for scope/session cannot be retrieved";
log.error(message + ":", e);
throw new IllegalArgumentException(message);