本文整理汇总了Java中org.semanticweb.owlapi.model.OWLOntology.getDisjointClassesAxioms方法的典型用法代码示例。如果您正苦于以下问题:Java OWLOntology.getDisjointClassesAxioms方法的具体用法?Java OWLOntology.getDisjointClassesAxioms怎么用?Java OWLOntology.getDisjointClassesAxioms使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.semanticweb.owlapi.model.OWLOntology
的用法示例。
在下文中一共展示了OWLOntology.getDisjointClassesAxioms方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getExplicitOWLDisjointnessAxioms
import org.semanticweb.owlapi.model.OWLOntology; //导入方法依赖的package包/类
/**
* OWLDisjointAxiom(A,B,C)
* @param reasoner
* @param ontology
* @param cls
* @return
*/
public static OWLClassNodeSet getExplicitOWLDisjointnessAxioms(OWLReasoner reasoner, OWLOntology ontology, OWLClass cls){
OWLClassNodeSet nodeSet = new OWLClassNodeSet();
for (OWLDisjointClassesAxiom ax : ontology.getDisjointClassesAxioms(cls)) {
for (OWLClassExpression op : ax.getClassExpressions()) {
if (!op.isAnonymous() && !op.equals(cls)) { //Op must be differnt to ce
nodeSet.addNode(reasoner.getEquivalentClasses(op));
}
}
}
return nodeSet;
}
示例2: getDisjointClasses
import org.semanticweb.owlapi.model.OWLOntology; //导入方法依赖的package包/类
public NodeSet<OWLClass> getDisjointClasses(OWLClassExpression ce) {
ensurePrepared();
OWLClassNodeSet nodeSet = new OWLClassNodeSet();
if (!ce.isAnonymous()) {
for (OWLOntology ontology : getRootOntology().getImportsClosure()) {
for (OWLDisjointClassesAxiom ax : ontology.getDisjointClassesAxioms(ce.asOWLClass())) {
for (OWLClassExpression op : ax.getClassExpressions()) {
if (!op.isAnonymous()) {
nodeSet.addNode(getEquivalentClasses(op));
}
}
}
}
}
return nodeSet;
}