@Override public OWLClassExpression visit(OWLDataMinCardinality ce) { boolean neg = negated; int card = ce.getCardinality(); if (negated) { card = ce.getCardinality() - 1; if (card < 0) { card = 0; } } negated = false; OWLDataRange filler = ce.getFiller().accept(this); OWLClassExpression nnf = null; if (neg) { nnf = dataFactory.getOWLDataMaxCardinality(card, ce.getProperty(), filler); } else { nnf = dataFactory.getOWLDataMinCardinality(card, ce.getProperty(), filler); } negated = neg; return nnf; }
@Override public void addToOntology() { OWLDataProperty property = factory.getOWLDataProperty(":dataMinCardinality", pm); OWLDatatype datatype = OWL2Datatype.XSD_BOOLEAN.getDatatype(factory); addToGenericDomainAndNewRange(property, datatype); OWLClass range = featurePool.getExclusiveClass(":DataMinCardinalityRange"); OWLDataMinCardinality cardinality = factory.getOWLDataMinCardinality(3, property); addAxiomToOntology(factory.getOWLSubClassOfAxiom(range, cardinality)); }
@Override public void addToOntology() { OWLDataProperty property = factory.getOWLDataProperty(":dataMinQualifiedCardinality", pm); OWLDatatype datatype = OWL2Datatype.XSD_FLOAT.getDatatype(factory); addToGenericDomainAndNewRange(property, datatype); OWLDatatype affectedDatatype = OWL2Datatype.XSD_DATE_TIME.getDatatype(factory); OWLDataMinCardinality cardinality = factory.getOWLDataMinCardinality(9, property, affectedDatatype); addAxiomToOntology(factory.getOWLSubClassOfAxiom(featurePool.getExclusiveClass(":DataMinQualifiedCardinalityRange"), cardinality)); }
public void visit(OWLDataMinCardinality arg0) { try { final OWLDatatype dt = Utils.ensureDatatype(arg0.getFiller()); final OWLDataProperty dp = Utils.ensureDataProperty(arg0 .getProperty()); integrityConstraints.add(integrityConstraintFactory .MinDataParticipationConstraint(subjClass, dp, dt, arg0.getCardinality())); } catch (UnsupportedICException e) { notSupported(arg0); } }
public OWLClassExpression visit(OWLDataMinCardinality object) { OWLDataRange filler=object.getFiller(); OWLDataPropertyExpression prop=object.getProperty(); if (prop.isOWLTopDataProperty()) throwInvalidTopDPUseError(object); if (isLiteral(filler)) return m_factory.getOWLDataMinCardinality(object.getCardinality(),prop,filler); else { OWLDatatype definition=getDefinitionFor(filler,m_alreadyExists); if (!m_alreadyExists[0]) m_newDataRangeInclusions.add(new OWLDataRange[] { negative(definition),filler }); return m_factory.getOWLDataMinCardinality(object.getCardinality(),prop,definition); } }
public OWLClassExpression visit(OWLDataMinCardinality d) { if (d.getCardinality()==0) return m_factory.getOWLNothing(); else { OWLDataRange filler=getNNF(d.getFiller()); return m_factory.getOWLDataMaxCardinality(d.getCardinality()-1,d.getProperty(),filler); } }
public OWLClassExpression visit(OWLDataMinCardinality d) { OWLDataRange filler=getSimplified(d.getFiller()); if (d.getCardinality()<=0) return m_factory.getOWLThing(); else if (isBottomDataRange(filler)) return m_factory.getOWLNothing(); else if (d.getCardinality()==1) return m_factory.getOWLDataSomeValuesFrom(d.getProperty(),filler); else return m_factory.getOWLDataMinCardinality(d.getCardinality(),d.getProperty(),filler); }
public OWLClassExpression visit(OWLDataExactCardinality d) { OWLDataRange filler=getSimplified(d.getFiller()); if (d.getCardinality()<0) return m_factory.getOWLNothing(); else if (d.getCardinality()==0) return m_factory.getOWLDataAllValuesFrom(d.getProperty(),m_factory.getOWLDataComplementOf(filler)); else if (isBottomDataRange(filler)) return m_factory.getOWLNothing(); else { OWLDataMinCardinality minCardinality=m_factory.getOWLDataMinCardinality(d.getCardinality(),d.getProperty(),filler); OWLDataMaxCardinality maxCardinality=m_factory.getOWLDataMaxCardinality(d.getCardinality(),d.getProperty(),filler); return m_factory.getOWLObjectIntersectionOf(minCardinality,maxCardinality); } }
public void visit(OWLDataMinCardinality object) { if (!object.getProperty().isOWLBottomDataProperty() || object.getCardinality()==0) { AtomicRole atomicRole=getAtomicRole(object.getProperty()); LiteralDataRange literalRange=m_dataRangeConverter.convertDataRange(object.getFiller()); AtLeastDataRange atLeast=AtLeastDataRange.create(object.getCardinality(),atomicRole,literalRange); if (!atLeast.isAlwaysFalse()) m_headAtoms.add(Atom.create(atLeast,X)); } }
@Override public OWLDataMinCardinality visit( ElkDataMinCardinalityQualified expression) { return owlFactory_.getOWLDataMinCardinality(expression.getCardinality(), convert(expression.getProperty()), convert(expression.getFiller())); }
@SuppressWarnings("static-method") public ElkDataMinCardinality convert( OWLDataMinCardinality owlDataMinCardinality) { if (owlDataMinCardinality.isQualified()) return new ElkDataMinCardinalityQualifiedWrap<OWLDataMinCardinality>( owlDataMinCardinality); // else return new ElkDataMinCardinalityUnqualifiedWrap<OWLDataMinCardinality>( owlDataMinCardinality); }
@Override public void visit(OWLDataMinCardinality ce) { hashCode = primes[37]; hashCode = hashCode * MULT + ce.getProperty().hashCode(); hashCode = hashCode * MULT + ce.getCardinality(); hashCode = hashCode * MULT + ce.getFiller().hashCode(); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!super.equals(obj)) { return false; } return obj instanceof OWLDataMinCardinality; }
public void visit(OWLDataMinCardinality object) { visitProperty(object.getProperty()); }
public Boolean visit(OWLDataMinCardinality desc) { return Boolean.TRUE; }
public void visit(OWLDataMinCardinality object) { m_hasDatatypes=true; }
public OWLClassExpression visit(OWLDataMinCardinality d) { OWLDataRange filler=getNNF(d.getFiller()); return m_factory.getOWLDataMinCardinality(d.getCardinality(),d.getProperty(),filler); }
@Override public OWLDataMinCardinality visit( ElkDataMinCardinalityUnqualified expression) { return owlFactory_.getOWLDataMinCardinality(expression.getCardinality(), convert(expression.getProperty())); }
@Override public ElkDataMinCardinality visit( OWLDataMinCardinality owlDataMinCardinality) { return CONVERTER.convert(owlDataMinCardinality); }
@Override public OWLDataMinCardinality visit(OWLDataMinCardinality ce) { return null; }
@Override public HandlerResult visit(OWLDataMinCardinality ce) { return null; }
public DataPropertyRestriction(OWLDataMinCardinality ex, OWLDiagramRenderer helper) { IRI roleIRI = ex.getProperty().asOWLDataProperty().getIRI(); this.role = helper.shorten(roleIRI); this.fillerType = ex.getFiller().asOWLDatatype().getBuiltInDatatype(); this.multiplicity = Multiplicity.create(ex.getCardinality(), null); }
@Override public Boolean visit(OWLDataMinCardinality classExpression) { return false; }
@Override public IntegerClassExpression visit(OWLDataMinCardinality ce) { Objects.requireNonNull(ce); throw TranslationException.newUnsupportedTranslationException(ce); }
@Override public OWLClassExpression visit(OWLDataMinCardinality ce) { return ce; }