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?

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top