本文整理汇总了Java中org.semanticweb.owlapi.reasoner.NodeSet.containsEntity方法的典型用法代码示例。如果您正苦于以下问题:Java NodeSet.containsEntity方法的具体用法?Java NodeSet.containsEntity怎么用?Java NodeSet.containsEntity使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.semanticweb.owlapi.reasoner.NodeSet
的用法示例。
在下文中一共展示了NodeSet.containsEntity方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: hasFilterClass
import org.semanticweb.owlapi.reasoner.NodeSet; //导入方法依赖的package包/类
/**
* Check that there is an axiom, which use a class (in its signature) that
* has a ancestor in the root term set.
*
* @param axioms set to check
* @param rootTerms set root of terms
* @return boolean
*/
private boolean hasFilterClass(Set<OWLClassAxiom> axioms, Set<OWLClass> rootTerms) {
if (axioms != null && !axioms.isEmpty()) {
for (OWLClassAxiom ax : axioms) {
if (ax instanceof OWLEquivalentClassesAxiom) {
Set<OWLClass> signature = ax.getClassesInSignature();
for (OWLClass sigCls : signature) {
NodeSet<OWLClass> superClasses = reasoner.getSuperClasses(sigCls, false);
for(OWLClass root : rootTerms) {
if (superClasses.containsEntity(root)) {
return true;
}
}
}
}
}
}
return false;
}
示例2: isMf
import org.semanticweb.owlapi.reasoner.NodeSet; //导入方法依赖的package包/类
private boolean isMf(OWLClass cls) {
final NodeSet<OWLClass> superClasses = reasoner.getSuperClasses(cls, false);
return superClasses.containsEntity(mf) || mf.equals(cls);
}
示例3: isBp
import org.semanticweb.owlapi.reasoner.NodeSet; //导入方法依赖的package包/类
private boolean isBp(OWLClass cls) {
final NodeSet<OWLClass> superClasses = reasoner.getSuperClasses(cls, false);
return superClasses.containsEntity(bp) || bp.equals(cls);
}