Question

Is there a "simple" way to get a certain ontology from the OWLOntologyManager? I loaded a ontology and the depencies with the manager and i can access a HasSet with OWLOntologyManager.getOntologies() where i can see all imported ontologies.

There is also a OWLOntologyManager.getOntology(IRI) function BUT this function only works if the ontology has no versionID, too bad the ontology i want to get has a versionID and this function will just return null.

Any ideas?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top