本文整理汇总了Java中org.semanticweb.owlapi.model.OWLAxiom.isOfType方法的典型用法代码示例。如果您正苦于以下问题:Java OWLAxiom.isOfType方法的具体用法?Java OWLAxiom.isOfType怎么用?Java OWLAxiom.isOfType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.semanticweb.owlapi.model.OWLAxiom
的用法示例。
在下文中一共展示了OWLAxiom.isOfType方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addPositiveAxioms
import org.semanticweb.owlapi.model.OWLAxiom; //导入方法依赖的package包/类
public void addPositiveAxioms(Set<? extends OWLAxiom> axioms) {
for (OWLAxiom axiom : axioms) {
if (axiom.isOfType(AxiomType.EQUIVALENT_CLASSES)) {
addEquation((OWLEquivalentClassesAxiom) axiom);
} else if (axiom.isOfType(AxiomType.SUBCLASS_OF)) {
addSubsumption((OWLSubClassOfAxiom) axiom);
} else {
throw new RuntimeException("Unsupported axiom type: " + axiom);
}
}
}
示例2: addNegativeAxioms
import org.semanticweb.owlapi.model.OWLAxiom; //导入方法依赖的package包/类
public void addNegativeAxioms(Set<? extends OWLAxiom> axioms) {
for (OWLAxiom axiom : axioms) {
if (axiom.isOfType(AxiomType.EQUIVALENT_CLASSES)) {
addDisequation((OWLEquivalentClassesAxiom) axiom);
} else if (axiom.isOfType(AxiomType.SUBCLASS_OF)) {
addDissubsumption((OWLSubClassOfAxiom) axiom);
} else {
throw new RuntimeException("Unsupported axiom type: " + axiom);
}
}
}
示例3: isRelevantAxiom
import org.semanticweb.owlapi.model.OWLAxiom; //导入方法依赖的package包/类
/**
* @param axiom
* the owl axiom to test
* @return {@code true} if the owl axiom can be converted to ELK axiom
*/
@SuppressWarnings("static-method")
public boolean isRelevantAxiom(OWLAxiom axiom) {
return axiom.isLogicalAxiom() || axiom.isOfType(AxiomType.DECLARATION);
}