public OWLOntologyFormat parse(OWLOntologyInputSource inputSource, OWLOntology ontology) throws OWLParserException {
try {
final RDFXMLOntologyFormat format = new RDFXMLOntologyFormat();
if (owlOntologyManager == null) {
throw new OWLRuntimeException("Cannot parse because OWLOntologyManager is null!");
}
final RDFParser parser = new RDFParser() {
public void startPrefixMapping(String prefix, String uri) throws SAXException {
super.startPrefixMapping(prefix, uri);
format.addPrefixNamespaceMapping(prefix, uri);