Set<OWLAxiom> module = ModularityUtils.extractModule( loader.getOntology(), entities, moduleType );
try {
OWLOntology moduleOnt = loader.getManager().createOntology( module );
loader.getManager().saveOntology( moduleOnt, new RDFXMLOntologyFormat(),
new SystemOutDocumentTarget() );
} catch( OWLException e ) {
throw new RuntimeException( e );
}
}