[英]OWL-API getting an ontology from the OWLOntologyManager
Is there a "simple" way to get a certain ontology from the OWLOntologyManager
? 是否有从
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. 我使用管理器加载了一个本体和缺陷,并且可以使用
OWLOntologyManager.getOntologies()
访问HasSet,在这里可以看到所有导入的本体。
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. 还有一个
OWLOntologyManager.getOntology(IRI)
函数,但该函数仅在本体没有versionID的情况下才有效, OWLOntologyManager.getOntology(IRI)
我要获取的本体具有versionID
并且此函数将仅返回null。
Any ideas? 有任何想法吗?
If I get you right, you can use the OntologyManager.getVersions(IRI ontology)
function to do this. 如果我理解正确,则可以使用
OntologyManager.getVersions(IRI ontology)
函数来执行此操作。 It will return a java.util.Set<OWLOntology>
that contains all ontologies that have the specified ontology IRI. 它将返回一个
java.util.Set<OWLOntology>
,其中包含具有指定本体IRI的所有本体。
You can find the Javadoc for this method here . 您可以在此处找到此方法的Javadoc。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.