use of org.semanticweb.owlapi.functional.renderer.FunctionalSyntaxStorerFactory in project webprotege by protegeproject.
the class RootOntologyLoader method loadRootOntology.
public OWLOntology loadRootOntology() {
// The delegate - we use the concurrent ontology manager
OWLOntologyManager delegateManager = WebProtegeOWLManager.createConcurrentOWLOntologyManager();
// We only support the binary format for speed
delegateManager.getOntologyStorers().add(new RDFXMLStorerFactory());
delegateManager.getOntologyStorers().add(new OWLXMLStorerFactory());
delegateManager.getOntologyStorers().add(new FunctionalSyntaxStorerFactory());
delegateManager.getOntologyStorers().add(new ManchesterSyntaxStorerFactory());
delegateManager.getOntologyParsers().add(new BinaryOWLOntologyDocumentParserFactory());
// The wrapper manager
ProjectOWLOntologyManager manager = new ProjectOWLOntologyManager();
manager.setDelegate(delegateManager);
int threadPriority = Thread.currentThread().getPriority();
try {
Thread.currentThread().setPriority(3);
OWLOntology rootOntology = documentStore.initialiseOntologyManagerWithProject(manager.getDelegate());
manager.sealDelegate();
return rootOntology;
} catch (OWLOntologyCreationException | OWLOntologyStorageException e) {
throw new RuntimeException("Failed to load project: " + e.getMessage(), e);
} finally {
Thread.currentThread().setPriority(threadPriority);
}
}
Aggregations