RDFXMLOntologyFormat rdfxmlFormat = new RDFXMLOntologyFormat();
// Some ontology formats support prefix names and prefix IRIs. When we save the ontology in the new format we
// will copy the prefixes over so that we have nicely abbreviated IRIs in the new ontology document
if (format.isPrefixOWLOntologyFormat()) {
owlxmlFormat.copyPrefixesFrom(format.asPrefixOWLOntologyFormat());
}
// manager.saveOntology(ontology, owlxmlFormat, IRI.create(file.toURI())); //uses the owl ontology format
// manager.saveOntology(ontology, IRI.create(file.toURI())); //uses...some type of RDF format, but not the same as SWEET
manager.saveOntology(ontology, rdfxmlFormat, IRI.create(file.toURI()));