If I get you right, you can use the OntologyManager.getVersions(IRI ontology)
function to do this. It will return a java.util.Set<OWLOntology>
that contains all ontologies that have the specified ontology IRI.
You can find the Javadoc for this method here.