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


Java OWLObjectExactCardinality类代码示例

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


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

示例1: visit

import org.semanticweb.owlapi.model.OWLObjectExactCardinality; //导入依赖的package包/类
@Override
public HandlerResult visit(OWLObjectExactCardinality ce) {
	if (ce.getCardinality() == 0) {
		// remove the ce if the max cardinality is zero
		return HandlerResult.remove();
	}
	final OWLClassExpression filler = ce.getFiller();
	final HandlerResult recursive = filler.accept(this);
	OWLObjectSomeValuesFrom newCE;
	if (recursive == null) {
		newCE = factory.getOWLObjectSomeValuesFrom(ce.getProperty(), filler);
	}
	else if (recursive.remove) {
		return HandlerResult.remove();
	}
	else {
		newCE = factory.getOWLObjectSomeValuesFrom(ce.getProperty(), recursive.modified);
	}
	return HandlerResult.modified(newCE);
}
 
开发者ID:owlcollab,项目名称:owltools,代码行数:21,代码来源:CardinalityContraintsTools.java

示例2: addToOntology

import org.semanticweb.owlapi.model.OWLObjectExactCardinality; //导入依赖的package包/类
@Override
public void addToOntology() {
  OWLObjectProperty property = featurePool.getExclusiveProperty(":objectExactCardinalityProperty_Lite");
  OWLClass range = featurePool.getExclusiveClass(":ObjectExactCardinalityRange_Lite");
  addToGenericDomainAndNewRange(property, range);

  OWLObjectExactCardinality exactCardinality = factory.getOWLObjectExactCardinality(1, property);

  addAxiomToOntology(factory.getOWLSubClassOfAxiom(range, exactCardinality));
}
 
开发者ID:VisualDataWeb,项目名称:OntoBench,代码行数:11,代码来源:OwlObjectCardinalityOwlLiteFeature.java

示例3: addToOntology

import org.semanticweb.owlapi.model.OWLObjectExactCardinality; //导入依赖的package包/类
@Override
public void addToOntology() {
  OWLObjectProperty property = featurePool.getExclusiveProperty(":objectExactCardinalityProperty");
  OWLClass range = featurePool.getExclusiveClass(":ObjectExactCardinalityRange");
  addToGenericDomainAndNewRange(property, range);

  OWLObjectExactCardinality exactCardinality = factory.getOWLObjectExactCardinality(4, property);

  addAxiomToOntology(factory.getOWLSubClassOfAxiom(range, exactCardinality));
}
 
开发者ID:VisualDataWeb,项目名称:OntoBench,代码行数:11,代码来源:OwlObjectCardinalityFeature.java

示例4: addToOntology

import org.semanticweb.owlapi.model.OWLObjectExactCardinality; //导入依赖的package包/类
@Override
public void addToOntology() {
  OWLObjectProperty property = featurePool.getExclusiveProperty(":objectExactQualifiedCardinalityProperty");
  OWLClass range = featurePool.getExclusiveClass(":ObjectExactQualifiedCardinalityRange");
  addToGenericDomainAndNewRange(property, range);

  OWLClass qualifier = featurePool.getExclusiveClass(":ObjectExactQualifiedCardinality_Qualifier");
  OWLObjectExactCardinality exactCardinality = factory.getOWLObjectExactCardinality(1, property, qualifier);

  addAxiomToOntology(factory.getOWLSubClassOfAxiom(range, exactCardinality));
}
 
开发者ID:VisualDataWeb,项目名称:OntoBench,代码行数:12,代码来源:OwlObjectQualifiedCardinalityFeature.java

示例5: visit

import org.semanticweb.owlapi.model.OWLObjectExactCardinality; //导入依赖的package包/类
public void visit(OWLObjectExactCardinality arg0) {
    try {
        OWLClass c = Utils.ensureClass(arg0.getFiller());
        OWLObjectProperty p = Utils.ensureObjectProperty(arg0.getProperty());

        integrityConstraints.add(integrityConstraintFactory
            .ObjectParticipationConstraint(subjClass, p, c,
                arg0.getCardinality(), arg0.getCardinality()));
    } catch (UnsupportedICException e) {
        notSupported(arg0);
    }
}
 
开发者ID:kbss-cvut,项目名称:jopa,代码行数:13,代码来源:IntegrityConstraintClassParser.java

示例6: visit

import org.semanticweb.owlapi.model.OWLObjectExactCardinality; //导入依赖的package包/类
public OWLClassExpression visit(OWLObjectExactCardinality d) {
    OWLClassExpression filler=getNNF(d.getFiller());
    if (d.getCardinality()==0)
        return m_factory.getOWLObjectMinCardinality(1,d.getProperty().getSimplified(),filler);
    else {
        Set<OWLClassExpression> disjuncts=new HashSet<OWLClassExpression>();
        disjuncts.add(m_factory.getOWLObjectMaxCardinality(d.getCardinality()-1,d.getProperty().getSimplified(),filler));
        disjuncts.add(m_factory.getOWLObjectMinCardinality(d.getCardinality()+1,d.getProperty().getSimplified(),filler));
        return m_factory.getOWLObjectUnionOf(disjuncts);
    }
}
 
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:12,代码来源:ExpressionManager.java

示例7: convert

import org.semanticweb.owlapi.model.OWLObjectExactCardinality; //导入依赖的package包/类
@SuppressWarnings("static-method")
public ElkObjectExactCardinality convert(
		OWLObjectExactCardinality owlObjectExactCardinality) {
	if (owlObjectExactCardinality.isQualified())
		return new ElkObjectExactCardinalityQualifiedWrap<OWLObjectExactCardinality>(
				owlObjectExactCardinality);
	// else
	return new ElkObjectExactCardinalityUnqualifiedWrap<OWLObjectExactCardinality>(
			owlObjectExactCardinality);
}
 
开发者ID:liveontologies,项目名称:elk-reasoner,代码行数:11,代码来源:OwlConverter.java

示例8: visit

import org.semanticweb.owlapi.model.OWLObjectExactCardinality; //导入依赖的package包/类
@Override
public OWLObjectExactCardinality visit(OWLObjectExactCardinality ce) {
	if (LOG.isDebugEnabled()) {
		LOG.debug("Unfolding exact_cardinality: "+ce);
	}
	
	OWLClassExpression filler = ce.getFiller();
	if (filler != null) {
		OWLClassExpression unfold = filler.accept(this);
		if (unfold != null) {
			return factory.getOWLObjectExactCardinality(ce.getCardinality(), ce.getProperty(), unfold);
		}
	}
	return null;
}
 
开发者ID:owlcollab,项目名称:owltools,代码行数:16,代码来源:TBoxUnFoldingTool.java

示例9: visit

import org.semanticweb.owlapi.model.OWLObjectExactCardinality; //导入依赖的package包/类
@Override
public OWLClassExpression visit(OWLObjectExactCardinality ce) {
	OWLClassExpression filler = ce.getFiller();
	OWLClassExpression shortenedFiller = filler.accept(this);
	if(!filler.equals(shortenedFiller)){
		return df.getOWLObjectExactCardinality(ce.getCardinality(), ce.getProperty(), shortenedFiller);
	}
	return ce;
}
 
开发者ID:SmartDataAnalytics,项目名称:OWL2SPARQL,代码行数:10,代码来源:OWLClassExpressionMinimizer.java

示例10: visit

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

示例11: visit

import org.semanticweb.owlapi.model.OWLObjectExactCardinality; //导入依赖的package包/类
@Override
public Set<OWLClassExpression> visit(OWLObjectExactCardinality ce) {
    Set<OWLClassExpression> result = new HashSet<>();
    result.add(ce);
    result.addAll(ce.getFiller().accept(this));
    return result;
}
 
开发者ID:matthewhorridge,项目名称:owlapi-gwt,代码行数:8,代码来源:OWLClassExpressionCollector.java

示例12: equals

import org.semanticweb.owlapi.model.OWLObjectExactCardinality; //导入依赖的package包/类
@Override
public boolean equals(Object obj) {
    if (this == obj) {
        return true;
    }
    if (!super.equals(obj)) {
        return false;
    }
    return obj instanceof OWLObjectExactCardinality;
}
 
开发者ID:matthewhorridge,项目名称:owlapi-gwt,代码行数:11,代码来源:OWLObjectExactCardinalityImpl.java

示例13: visit

import org.semanticweb.owlapi.model.OWLObjectExactCardinality; //导入依赖的package包/类
public void visit(OWLObjectExactCardinality object) {
    visitProperty(object.getProperty());
    object.getFiller().accept(this);
}
 
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:5,代码来源:BuiltInPropertyManager.java

示例14: visit

import org.semanticweb.owlapi.model.OWLObjectExactCardinality; //导入依赖的package包/类
public OWLClassExpression visit(OWLObjectExactCardinality object) {
    throw new IllegalStateException("Internal error: exact object cardinality restrictions should have been simplified.");
}
 
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:4,代码来源:OWLNormalization.java

示例15: visit

import org.semanticweb.owlapi.model.OWLObjectExactCardinality; //导入依赖的package包/类
public void visit(OWLObjectExactCardinality object) {
    m_hasAtMostRestrictions=true;
    visitProperty(object.getProperty());
    object.getFiller().accept(this);
}
 
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:6,代码来源:OWLAxiomsExpressivity.java


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