throws OWLOntologyStorageException, OWLOntologyCreationException {
StringDocumentTarget target = new StringDocumentTarget();
OWLDocumentFormat fromFormat = m.getOntologyFormat(ont);
if (fromFormat.isPrefixOWLOntologyFormat()
&& format.isPrefixOWLOntologyFormat()) {
PrefixDocumentFormat fromPrefixFormat = fromFormat
.asPrefixOWLOntologyFormat();
PrefixDocumentFormat toPrefixFormat = format
.asPrefixOWLOntologyFormat();
toPrefixFormat.copyPrefixesFrom(fromPrefixFormat);
}
boolean addMissingTypes = true;
if (format instanceof RDFDocumentFormat) {
format.setAddMissingTypes(addMissingTypes);
}