@Override public void addToOntology() { OWLDataProperty property = factory.getOWLDataProperty(":dataExactQualifiedCardinality", pm); OWLDatatype datatype = OWL2Datatype.XSD_STRING.getDatatype(factory); addToGenericDomainAndNewRange(property, datatype); OWLDatatype affectedDatatype = OWL2Datatype.XSD_DATE_TIME.getDatatype(factory); OWLDataExactCardinality cardinality = factory.getOWLDataExactCardinality(12, property, affectedDatatype); addAxiomToOntology(factory.getOWLSubClassOfAxiom(featurePool.getExclusiveClass(":DataExactQualifiedCardinalityRange"), cardinality)); }
@Override public void addToOntology() { OWLDataProperty property = factory.getOWLDataProperty(":dataExactCardinality", pm); OWLDatatype datatype = OWL2Datatype.XSD_STRING.getDatatype(factory); addToGenericDomainAndNewRange(property, datatype); OWLClass range = featurePool.getExclusiveClass(":DataExactCardinalityRange"); OWLDataExactCardinality cardinality = factory.getOWLDataExactCardinality(11, property); addAxiomToOntology(factory.getOWLSubClassOfAxiom(range, cardinality)); }
public void visit(OWLDataExactCardinality arg0) { try { final OWLDatatype dt = Utils.ensureDatatype(arg0.getFiller()); final OWLDataProperty dp = Utils.ensureDataProperty(arg0 .getProperty()); integrityConstraints.add(integrityConstraintFactory.DataParticipationConstraint( subjClass, dp, dt, arg0.getCardinality(), arg0.getCardinality())); } catch (UnsupportedICException e) { notSupported(arg0); } }
public OWLClassExpression visit(OWLDataExactCardinality d) { OWLDataRange filler=getNNF(d.getFiller()); if (d.getCardinality()==0) return m_factory.getOWLDataMinCardinality(1,d.getProperty(),filler); else { Set<OWLClassExpression> disjuncts=new HashSet<OWLClassExpression>(); disjuncts.add(m_factory.getOWLDataMaxCardinality(d.getCardinality()-1,d.getProperty(),filler)); disjuncts.add(m_factory.getOWLDataMinCardinality(d.getCardinality()+1,d.getProperty(),filler)); return m_factory.getOWLObjectUnionOf(disjuncts); } }
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); } }
@Override public OWLDataExactCardinality visit( ElkDataExactCardinalityQualified expression) { return owlFactory_.getOWLDataExactCardinality( expression.getCardinality(), convert(expression.getProperty()), convert(expression.getFiller())); }
@SuppressWarnings("static-method") public ElkDataExactCardinality convert( OWLDataExactCardinality owlDataExactCardinality) { if (owlDataExactCardinality.isQualified()) return new ElkDataExactCardinalityQualifiedWrap<OWLDataExactCardinality>( owlDataExactCardinality); // else return new ElkDataExactCardinalityUnqualifiedWrap<OWLDataExactCardinality>( owlDataExactCardinality); }
@Override public void visit(OWLDataExactCardinality ce) { hashCode = primes[35]; 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 OWLDataExactCardinality; }
public void visit(OWLDataExactCardinality object) { visitProperty(object.getProperty()); }
public OWLClassExpression visit(OWLDataExactCardinality object) { throw new IllegalStateException("Internal error: exact data cardinality restrictions should have been simplified."); }
public Boolean visit(OWLDataExactCardinality desc) { return Boolean.TRUE; }
public void visit(OWLDataExactCardinality object) { m_hasDatatypes=true; }
public OWLClassExpression visit(OWLDataExactCardinality d) { OWLDataRange filler=getNNF(d.getFiller()); return m_factory.getOWLDataExactCardinality(d.getCardinality(),d.getProperty(),filler); }
public void visit(OWLDataExactCardinality object) { throw new IllegalStateException("Internal error: invalid normal form."); }
@Override public OWLDataExactCardinality visit( ElkDataExactCardinalityUnqualified expression) { return owlFactory_.getOWLDataExactCardinality( expression.getCardinality(), convert(expression.getProperty())); }
@Override public ElkDataExactCardinality visit( OWLDataExactCardinality owlDataExactCardinality) { return CONVERTER.convert(owlDataExactCardinality); }
@Override public OWLDataExactCardinality visit(OWLDataExactCardinality ce) { return null; }
@Override public HandlerResult visit(OWLDataExactCardinality ce) { return null; }
public DataPropertyRestriction(OWLDataExactCardinality ex, OWLHelper helper) { IRI roleIRI = ex.getProperty().asOWLDataProperty().getIRI(); this.role = helper.shorten(roleIRI); this.fillerType = ex.getFiller().asOWLDatatype().getBuiltInDatatype(); this.multiplicity = Multiplicity.create(ex.getCardinality(), ex.getCardinality()); }
@Override public Boolean visit(OWLDataExactCardinality classExpression) { return false; }
@Override public IntegerClassExpression visit(OWLDataExactCardinality ce) { Objects.requireNonNull(ce); throw TranslationException.newUnsupportedTranslationException(ce); }
@Override public OWLClassExpression visit(OWLDataExactCardinality ce) { return ce; }
@Override public O visit(OWLDataExactCardinality ce) { return doDefault(ce); }
@Override public void visit(OWLDataExactCardinality ce) { handleDefault(ce); }
@Override public void visit(OWLDataExactCardinality ce) { type = CLASS_EXPRESSION_TYPE_INDEX_BASE + 16; }
@Override public OWLClassExpression visit(OWLDataExactCardinality ce) { return ce.asIntersectionOfMinMax().accept(this); }