man.addAxiom(ont, rule);
StringDocumentTarget documentTarget = new StringDocumentTarget();
man.saveOntology(ont, ontologyFormat, documentTarget);
OWLOntologyManager man2 = OWLManager.createOWLOntologyManager();
OWLOntology ont2 = man2
.loadOntologyFromOntologyDocument(new StringDocumentSource(
documentTarget.toString(),
OWLOntologyDocumentSourceBase
.getNextDocumentIRI("string:ontology"),
ontologyFormat, null));
Set<SWRLRule> rules = ont2.getAxioms(AxiomType.SWRL_RULE);