本文整理汇总了Java中org.semanticweb.owlapi.model.OWLClass.isOWLNothing方法的典型用法代码示例。如果您正苦于以下问题:Java OWLClass.isOWLNothing方法的具体用法?Java OWLClass.isOWLNothing怎么用?Java OWLClass.isOWLNothing使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.semanticweb.owlapi.model.OWLClass
的用法示例。
在下文中一共展示了OWLClass.isOWLNothing方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: findDirectSubclasses
import org.semanticweb.owlapi.model.OWLClass; //导入方法依赖的package包/类
public LinkedList<String> findDirectSubclasses(){
LinkedList<String> directSubclasses = new LinkedList<>();
//Get all direct subclasses and set LinkedList directSubclasses
Set<OWLClass> subClasses = classifier.getSubClasses(owlClass,true).getFlattened();
//For each direct subclass
Iterator it = subClasses.iterator();
while(it.hasNext()){
OWLClass oClass = (OWLClass)it.next();
//If is not the element owl:Nothing, add to LinkedList directSubclasses
if(!oClass.isOWLNothing())
directSubclasses.add(oClass.getIRI().toString());
}
return directSubclasses;
}
示例2: findIndirectSubclasses
import org.semanticweb.owlapi.model.OWLClass; //导入方法依赖的package包/类
public LinkedList<String> findIndirectSubclasses(){
LinkedList<String> indirectSubclasses = new LinkedList<>();
//Get all subclasses and add them to LinkedList "indirectSubclasses"
Set<OWLClass> subClasses = classifier.getSubClasses(owlClass,false).getFlattened();
Iterator it = subClasses.iterator();
while(it.hasNext()){
OWLClass oClass = (OWLClass)it.next();
//If is not the element owl:Nothing, add to LinkedList indirectSubclasses
if(!oClass.isOWLNothing())
indirectSubclasses.add(oClass.getIRI().toString());
}
//Remove direct subclasses from LinkedList "indirectSubclasses"
indirectSubclasses.removeAll(findDirectSubclasses());
return indirectSubclasses;
}
示例3: visit
import org.semanticweb.owlapi.model.OWLClass; //导入方法依赖的package包/类
@Override
public OWLEntity visit(OWLClass desc) {
if(!desc.isOWLNothing()) {
visitor.visit(desc);
}
return super.visit(desc);
}