* if an exception is raised during render
*/
protected void render(@Nonnull OWLOntologyDocumentSource source)
throws IOException {
if (ontologyManagerFactories.isEmpty()) {
throw new OWLRuntimeException(
"No ontology manager factories available, parsing is impossible");
}
// it is expected that only one implementation of
// OWLOntologyManagerFactory will be available, but if there is more
// than one, no harm done
try {
for (OWLOntologyManagerFactory f : ontologyManagerFactories) {
OWLOntology ontology = f.get()
.loadOntologyFromOntologyDocument(source);
new RioRenderer(ontology, getRDFHandler(), getRDFFormat()
.getOWLFormat()).render();
return;
}
} catch (OWLOntologyCreationException e) {
throw new OWLRuntimeException(e);
}
}