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


Java OWLObjectMaxCardinality类代码示例

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


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

示例1: visit

import org.semanticweb.owlapi.model.OWLObjectMaxCardinality; //导入依赖的package包/类
@Override
public HandlerResult visit(OWLObjectMaxCardinality 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: visit

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

示例3: addToOntology

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

  OWLObjectMaxCardinality maxCardinality = factory.getOWLObjectMaxCardinality(1, property);

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

示例4: addToOntology

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

  OWLClass qualifier = featurePool.getExclusiveClass(":ObjectMaxQualifiedCardinality_Qualifier");
  OWLObjectMaxCardinality maxCardinality = factory.getOWLObjectMaxCardinality(3, property, qualifier);

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

示例5: addToOntology

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

  OWLClass qualifier = featurePool.getExclusiveClass(":ObjectMaxQualifiedCardinality_RL_Qualifier");
  OWLObjectMaxCardinality maxCardinality = factory.getOWLObjectMaxCardinality(0, property, qualifier);

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

示例6: addToOntology

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

  OWLObjectMaxCardinality maxCardinality = factory.getOWLObjectMaxCardinality(8, property);

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

示例7: visit

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

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

示例8: visit

import org.semanticweb.owlapi.model.OWLObjectMaxCardinality; //导入依赖的package包/类
public OWLClassExpression visit(OWLObjectMaxCardinality object) {
    m_axioms.m_objectPropertiesOccurringInOWLAxioms.add(object.getProperty().getNamedProperty());
    OWLClassExpression filler=object.getFiller();
    if (isSimple(filler))
        return object;
    else {
        OWLClassExpression complementDescription=m_expressionManager.getComplementNNF(filler);
        OWLClassExpression definition=getDefinitionFor(complementDescription,m_alreadyExists);
        if (!m_alreadyExists[0])
            m_newInclusions.add(new OWLClassExpression[] { negative(definition),complementDescription });
        return m_factory.getOWLObjectMaxCardinality(object.getCardinality(),object.getProperty(),m_expressionManager.getComplementNNF(definition));
    }
}
 
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:14,代码来源:OWLNormalization.java

示例9: visit

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

示例10: visit

import org.semanticweb.owlapi.model.OWLObjectMaxCardinality; //导入依赖的package包/类
@Override
public OWLObjectMaxCardinality visit(
		ElkObjectMaxCardinalityQualified expression) {
	return owlFactory_.getOWLObjectMaxCardinality(
			expression.getCardinality(), convert(expression.getProperty()),
			convert(expression.getFiller()));
}
 
开发者ID:liveontologies,项目名称:elk-reasoner,代码行数:8,代码来源:AbstractElkObjectConverter.java

示例11: convert

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

示例12: visit

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

示例13: visit

import org.semanticweb.owlapi.model.OWLObjectMaxCardinality; //导入依赖的package包/类
@Override
public OWLClassExpression visit(OWLObjectMaxCardinality ce) {
	OWLClassExpression filler = ce.getFiller();
	OWLClassExpression shortenedFiller = filler.accept(this);
	if(shortenedFiller.isOWLNothing()){// <= n r.\bot \equiv \top
		return df.getOWLThing();
	} else if(beautify && ce.getCardinality() == 0) {// we rewrite <= 0 r C to \neg \exists r C - easier to read for humans
		return df.getOWLObjectComplementOf(df.getOWLObjectSomeValuesFrom(ce.getProperty(), shortenedFiller));
	} else if(!filler.equals(shortenedFiller)){
		return df.getOWLObjectMaxCardinality(ce.getCardinality(), ce.getProperty(), shortenedFiller);
	}
	return ce;
}
 
开发者ID:SmartDataAnalytics,项目名称:OWL2SPARQL,代码行数:14,代码来源:OWLClassExpressionMinimizer.java

示例14: visit

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

示例15: visit

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


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