当前位置: 首页>>代码示例>>Java>>正文


Java OWLClass.isOWLNothing方法代码示例

本文整理汇总了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;
}
 
开发者ID:usplssb,项目名称:SemanticSCo,代码行数:19,代码来源:SemanticReasoner.java

示例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;
}
 
开发者ID:usplssb,项目名称:SemanticSCo,代码行数:20,代码来源:SemanticReasoner.java

示例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);
}
 
开发者ID:lmazuel,项目名称:onagui,代码行数:8,代码来源:OWLAPIContainer.java


注:本文中的org.semanticweb.owlapi.model.OWLClass.isOWLNothing方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。