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


Java OWLObjectMinCardinality.getCardinality方法代码示例

本文整理汇总了Java中org.semanticweb.owlapi.model.OWLObjectMinCardinality.getCardinality方法的典型用法代码示例。如果您正苦于以下问题:Java OWLObjectMinCardinality.getCardinality方法的具体用法?Java OWLObjectMinCardinality.getCardinality怎么用?Java OWLObjectMinCardinality.getCardinality使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.semanticweb.owlapi.model.OWLObjectMinCardinality的用法示例。


在下文中一共展示了OWLObjectMinCardinality.getCardinality方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: visit

import org.semanticweb.owlapi.model.OWLObjectMinCardinality; //导入方法依赖的package包/类
@Override
public OWLClassExpression visit(OWLObjectMinCardinality ce) {
	// >= 0 r.C \equiv \top
	int cardinality = ce.getCardinality();
	if (cardinality == 0) {
		return df.getOWLThing();
	}
	OWLClassExpression filler = ce.getFiller();
	OWLClassExpression shortenedFiller = filler.accept(this);
	if(shortenedFiller.isOWLNothing()){// >= n r.\bot \equiv \bot if n != 0
		return df.getOWLNothing();
	} else if(!filler.equals(shortenedFiller)){
		return df.getOWLObjectMinCardinality(ce.getCardinality(), ce.getProperty(), shortenedFiller);
	}
	return ce;
}
 
开发者ID:SmartDataAnalytics,项目名称:OWL2SPARQL,代码行数:17,代码来源:OWLClassExpressionMinimizer.java

示例2: visit

import org.semanticweb.owlapi.model.OWLObjectMinCardinality; //导入方法依赖的package包/类
@Nonnull
@Override
public OWLClassExpression visit(OWLObjectMinCardinality ce) {
    boolean neg = negated;
    int card = ce.getCardinality();
    if (negated) {
        card = ce.getCardinality() - 1;
        if (card < 0) {
            card = 0;
        }
    }
    negated = false;
    OWLClassExpression filler = ce.getFiller().accept(this);
    OWLClassExpression nnf = null;
    if (neg) {
        nnf = dataFactory.getOWLObjectMaxCardinality(card,
                ce.getProperty(), filler);
    } else {
        nnf = dataFactory.getOWLObjectMinCardinality(card,
                ce.getProperty(), filler);
    }
    negated = neg;
    return nnf;
}
 
开发者ID:matthewhorridge,项目名称:owlapi-gwt,代码行数:25,代码来源:NNF.java

示例3: visit

import org.semanticweb.owlapi.model.OWLObjectMinCardinality; //导入方法依赖的package包/类
public OWLClassExpression visit(OWLObjectMinCardinality d) {
    if (d.getCardinality()==0)
        return m_factory.getOWLNothing();
    else {
        OWLClassExpression filler=getNNF(d.getFiller());
        return m_factory.getOWLObjectMaxCardinality(d.getCardinality()-1,d.getProperty().getSimplified(),filler);
    }
}
 
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:9,代码来源:ExpressionManager.java

示例4: visit

import org.semanticweb.owlapi.model.OWLObjectMinCardinality; //导入方法依赖的package包/类
@Override
public void visit(OWLObjectMinCardinality ce) {
    hashCode = primes[45];
    hashCode = hashCode * MULT + ce.getProperty().hashCode();
    hashCode = hashCode * MULT + ce.getCardinality();
    hashCode = hashCode * MULT + ce.getFiller().hashCode();
}
 
开发者ID:matthewhorridge,项目名称:owlapi-gwt,代码行数:8,代码来源:HashCode.java

示例5: visit

import org.semanticweb.owlapi.model.OWLObjectMinCardinality; //导入方法依赖的package包/类
public Boolean visit(OWLObjectMinCardinality object) {
    return object.getCardinality()>0;
}
 
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:4,代码来源:OWLNormalization.java


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