问题描述
我如何分别检索以下不相交的公理。分开是指与逆类表达式分开的简单类表达式。因为当前的代码给了我逆和没有逆表达式,但我不知道如何得到公理 3,4 和 5。我需要分别翻译这些公理。谢谢!
for(OWLClass c : ontology.getClassesInSignature()) {
for(OWLAxiom ax : ontology.getdisjointClassesAxioms(c)) {
for (OWLClassExpression x : ((OWLdisjointClassesAxiom)ax).getClassExpressions()) {
if (x.isAnonymous()) {
System.out.println(x);
if (x instanceof OWLObjectSomeValuesFrom) {
OWLObjectSomeValuesFrom someValuesFrom = (OWLObjectSomeValuesFrom) x;
OWLObjectPropertyExpression property = someValuesFrom.getproperty();
if(property.getInverseproperty().isAnonymous()) {
System.out.println("disjointwithoutInverse("+c.asOWLClass().getIRI().getShortForm()+","+property.asOWLObjectproperty().getIRI().getShortForm()+").");
}
else {
System.out.println("disjointwithInverse("+c.asOWLClass().getIRI().getShortForm()+","+property.getNamedproperty().asOWLObjectproperty().getIRI().getShortForm()+").");
}
}
}
}
}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)