Java 类org.semanticweb.owlapi.model.OWLObjectExactCardinality 实例源码

项目:owltools    文件:CardinalityContraintsTools.java   
@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);
}
项目:OntoBench    文件:OwlObjectCardinalityOwlLiteFeature.java   
@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));
}
项目:OntoBench    文件:OwlObjectCardinalityFeature.java   
@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));
}
项目:OntoBench    文件:OwlObjectQualifiedCardinalityFeature.java   
@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));
}
项目:jopa    文件:IntegrityConstraintClassParser.java   
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);
    }
}
项目:HermiT-android    文件:ExpressionManager.java   
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);
    }
}
项目:HermiT-android    文件:ExpressionManager.java   
public OWLClassExpression visit(OWLObjectExactCardinality d) {
    OWLClassExpression filler=getSimplified(d.getFiller());
    if (d.getCardinality()<0)
        return m_factory.getOWLNothing();
    else if (d.getCardinality()==0)
        return m_factory.getOWLObjectAllValuesFrom(d.getProperty().getSimplified(),m_factory.getOWLObjectComplementOf(filler));
    else if (filler.isOWLNothing())
        return m_factory.getOWLNothing();
    else {
        OWLObjectMinCardinality minCardinality=m_factory.getOWLObjectMinCardinality(d.getCardinality(),d.getProperty().getSimplified(),filler);
        OWLObjectMaxCardinality maxCardinality=m_factory.getOWLObjectMaxCardinality(d.getCardinality(),d.getProperty().getSimplified(),filler);
        return m_factory.getOWLObjectIntersectionOf(minCardinality,maxCardinality);
    }
}
项目:elk-reasoner    文件:OwlConverter.java   
@SuppressWarnings("static-method")
public ElkObjectExactCardinality convert(
        OWLObjectExactCardinality owlObjectExactCardinality) {
    if (owlObjectExactCardinality.isQualified())
        return new ElkObjectExactCardinalityQualifiedWrap<OWLObjectExactCardinality>(
                owlObjectExactCardinality);
    // else
    return new ElkObjectExactCardinalityUnqualifiedWrap<OWLObjectExactCardinality>(
            owlObjectExactCardinality);
}
项目:Hermit_1.3.8_android    文件:ExpressionManager.java   
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);
    }
}
项目:Hermit_1.3.8_android    文件:ExpressionManager.java   
public OWLClassExpression visit(OWLObjectExactCardinality d) {
    OWLClassExpression filler=getSimplified(d.getFiller());
    if (d.getCardinality()<0)
        return m_factory.getOWLNothing();
    else if (d.getCardinality()==0)
        return m_factory.getOWLObjectAllValuesFrom(d.getProperty().getSimplified(),m_factory.getOWLObjectComplementOf(filler));
    else if (filler.isOWLNothing())
        return m_factory.getOWLNothing();
    else {
        OWLObjectMinCardinality minCardinality=m_factory.getOWLObjectMinCardinality(d.getCardinality(),d.getProperty().getSimplified(),filler);
        OWLObjectMaxCardinality maxCardinality=m_factory.getOWLObjectMaxCardinality(d.getCardinality(),d.getProperty().getSimplified(),filler);
        return m_factory.getOWLObjectIntersectionOf(minCardinality,maxCardinality);
    }
}
项目:owltools    文件:TBoxUnFoldingTool.java   
@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;
}
项目:Wolpertinger    文件:ExpressionManager.java   
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);
    }
}
项目:Wolpertinger    文件:ExpressionManager.java   
public OWLClassExpression visit(OWLObjectExactCardinality d) {
    OWLClassExpression filler=getSimplified(d.getFiller());
    if (d.getCardinality()<0)
        return m_factory.getOWLNothing();
    else if (d.getCardinality()==0)
        return m_factory.getOWLObjectAllValuesFrom(d.getProperty().getSimplified(),m_factory.getOWLObjectComplementOf(filler));
    else if (filler.isOWLNothing())
        return m_factory.getOWLNothing();
    else {
        OWLObjectMinCardinality minCardinality=m_factory.getOWLObjectMinCardinality(d.getCardinality(),d.getProperty().getSimplified(),filler);
        OWLObjectMaxCardinality maxCardinality=m_factory.getOWLObjectMaxCardinality(d.getCardinality(),d.getProperty().getSimplified(),filler);
        return m_factory.getOWLObjectIntersectionOf(minCardinality,maxCardinality);
    }
}
项目:OWL2SPARQL    文件:OWLClassExpressionMinimizer.java   
@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;
}
项目:owlapi-gwt    文件:HashCode.java   
@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();
}
项目:owlapi-gwt    文件:OWLClassExpressionCollector.java   
@Override
public Set<OWLClassExpression> visit(OWLObjectExactCardinality ce) {
    Set<OWLClassExpression> result = new HashSet<>();
    result.add(ce);
    result.addAll(ce.getFiller().accept(this));
    return result;
}
项目:owlapi-gwt    文件:OWLObjectExactCardinalityImpl.java   
@Override
public boolean equals(Object obj) {
    if (this == obj) {
        return true;
    }
    if (!super.equals(obj)) {
        return false;
    }
    return obj instanceof OWLObjectExactCardinality;
}
项目:HermiT-android    文件:BuiltInPropertyManager.java   
public void visit(OWLObjectExactCardinality object) {
    visitProperty(object.getProperty());
    object.getFiller().accept(this);
}
项目:HermiT-android    文件:OWLNormalization.java   
public OWLClassExpression visit(OWLObjectExactCardinality object) {
    throw new IllegalStateException("Internal error: exact object cardinality restrictions should have been simplified.");
}
项目:HermiT-android    文件:OWLNormalization.java   
public Boolean visit(OWLObjectExactCardinality object) {
    return object.getCardinality()>0 ? Boolean.TRUE : m_expressionManager.getComplementNNF(object.getFiller()).accept(this);
}
项目:HermiT-android    文件:OWLAxiomsExpressivity.java   
public void visit(OWLObjectExactCardinality object) {
    m_hasAtMostRestrictions=true;
    visitProperty(object.getProperty());
    object.getFiller().accept(this);
}
项目:HermiT-android    文件:ExpressionManager.java   
public OWLClassExpression visit(OWLObjectExactCardinality d) {
    OWLClassExpression filler=getNNF(d.getFiller());
    return m_factory.getOWLObjectExactCardinality(d.getCardinality(),d.getProperty().getSimplified(),filler);
}
项目:HermiT-android    文件:OWLClausification.java   
public void visit(OWLObjectExactCardinality object) {
    throw new IllegalStateException("Internal error: invalid normal form.");
}
项目:elk-reasoner    文件:AbstractElkObjectConverter.java   
@Override
public OWLObjectExactCardinality visit(
        ElkObjectExactCardinalityQualified expression) {
    return owlFactory_.getOWLObjectExactCardinality(
            expression.getCardinality(), convert(expression.getProperty()));
}
项目:elk-reasoner    文件:AbstractElkObjectConverter.java   
@Override
public OWLObjectExactCardinality visit(
        ElkObjectExactCardinalityUnqualified expression) {
    return owlFactory_.getOWLObjectExactCardinality(
            expression.getCardinality(), convert(expression.getProperty()));
}
项目:elk-reasoner    文件:OwlClassExpressionConverterVisitor.java   
@Override
public ElkObjectExactCardinality visit(
        OWLObjectExactCardinality owlObjectExactCardinality) {
    return CONVERTER.convert(owlObjectExactCardinality);
}
项目:Hermit_1.3.8_android    文件:BuiltInPropertyManager.java   
public void visit(OWLObjectExactCardinality object) {
    visitProperty(object.getProperty());
    object.getFiller().accept(this);
}
项目:Hermit_1.3.8_android    文件:OWLNormalization.java   
public OWLClassExpression visit(OWLObjectExactCardinality object) {
    throw new IllegalStateException("Internal error: exact object cardinality restrictions should have been simplified.");
}
项目:Hermit_1.3.8_android    文件:OWLNormalization.java   
public Boolean visit(OWLObjectExactCardinality object) {
    return object.getCardinality()>0 ? Boolean.TRUE : m_expressionManager.getComplementNNF(object.getFiller()).accept(this);
}
项目:Hermit_1.3.8_android    文件:OWLAxiomsExpressivity.java   
public void visit(OWLObjectExactCardinality object) {
    m_hasAtMostRestrictions=true;
    visitProperty(object.getProperty());
    object.getFiller().accept(this);
}
项目:Hermit_1.3.8_android    文件:ExpressionManager.java   
public OWLClassExpression visit(OWLObjectExactCardinality d) {
    OWLClassExpression filler=getNNF(d.getFiller());
    return m_factory.getOWLObjectExactCardinality(d.getCardinality(),d.getProperty().getSimplified(),filler);
}
项目:Hermit_1.3.8_android    文件:OWLClausification.java   
public void visit(OWLObjectExactCardinality object) {
    throw new IllegalStateException("Internal error: invalid normal form.");
}
项目:Wolpertinger    文件:OWLNormalization.java   
public OWLClassExpression visit(OWLObjectExactCardinality object) {
    throw new IllegalStateException("Internal error: exact object cardinality restrictions should have been simplified.");
}
项目:Wolpertinger    文件:OWLNormalization.java   
public Boolean visit(OWLObjectExactCardinality object) {
    return object.getCardinality()>0 ? Boolean.TRUE : m_expressionManager.getComplementNNF(object.getFiller()).accept(this);
}
项目:Wolpertinger    文件:ExpressionManager.java   
public OWLClassExpression visit(OWLObjectExactCardinality d) {
    OWLClassExpression filler=getNNF(d.getFiller());
    return m_factory.getOWLObjectExactCardinality(d.getCardinality(),d.getProperty().getSimplified(),filler);
}
项目:Wolpertinger    文件:DebugTranslation.java   
public void visit(OWLObjectExactCardinality exactCardinality) {
    visitCardinalityRestriction(exactCardinality);
}
项目:Wolpertinger    文件:NaiveTranslation.java   
public void visit(OWLObjectExactCardinality exactCardinality) {
    visitCardinalityRestriction(exactCardinality);
}
项目:owl2diagram    文件:ObjectPropertyRestriction.java   
public ObjectPropertyRestriction(ClassBox source, OWLObjectExactCardinality ex, OWLHelper helper) throws RendererException {
    super(source, helper.getVertex(getTarget(ex))); 
    this.p = ex.getProperty().asOWLObjectProperty();
    this.role = helper.shorten(this.p.getIRI());
    this.multiplicity = Multiplicity.create(ex.getCardinality(), ex.getCardinality());
}
项目:born    文件:ElClassExpressionFilter.java   
@Override
public Boolean visit(OWLObjectExactCardinality classExpression) {
    return false;
}
项目:jcel    文件:ClassExpressionTranslator.java   
@Override
public IntegerClassExpression visit(OWLObjectExactCardinality ce) {
    Objects.requireNonNull(ce);
    throw TranslationException.newUnsupportedTranslationException(ce);
}