case OWL_FORMAT:
ontologyFormat = new OWLXMLOntologyFormat();break;
case RDF_FORMAT:
ontologyFormat = new RDFXMLOntologyFormat();break;
case NTRIPLE_FORMAT:
throw new IOntologyException("Unsupported export format");
case OBO_FORMAT:
ontologyFormat = new OBOOntologyFormat();break;
case TURTLE_FORMAT:
ontologyFormat = new TurtleOntologyFormat();break;
}
try {
manager.saveOntology(ontology, ontologyFormat, out);
} catch (OWLOntologyStorageException e) {
if(e.getCause() instanceof ProtocolException)
throw new IOntologyException("Unable to save ontology opened from URL "+getIRI()+". You should use IOntology.write() to save it as a file first.",e);
throw new IOntologyException("Unable to save ontology "+getIRI(),e);
}
}