public void visit(OWLDataMinCardinality object) { if (!object.getProperty().isOWLBottomDataProperty() || object.getCardinality() == 0) { AtomicRole atomicRole = getAtomicRole(object.getProperty()); if (object.getCardinality() == 1) { m_factory.getOWLDataSomeValuesFrom(object.getProperty(), object.getFiller()).accept(this); // if the cardinality is more than one then we don't make the disjunction explicit because // of how we are going // to overapproximate it (also, making the disjunction explicitly would be exponential) } else { 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)); } } }
public void visit(OWLDataSomeValuesFrom object) { if (!object.getProperty().isOWLBottomDataProperty()) { AtomicRole atomicRole = getAtomicRole(object.getProperty()); OWLDataRange filler = object.getFiller(); if (filler instanceof OWLDataOneOf) { for (OWLLiteral lit : ((OWLDataOneOf) filler).getValues()) { LiteralDataRange literalRange = m_dataRangeConverter.convertDataRange(m_factory.getOWLDataOneOf(lit)); AtLeastDataRange atLeastDataRange = AtLeastDataRange.create(1, atomicRole, literalRange); if (!atLeastDataRange.isAlwaysFalse()) m_headAtoms.add(Atom.create(atLeastDataRange, X)); } } else { LiteralDataRange literalRange = m_dataRangeConverter.convertDataRange(object.getFiller()); AtLeastDataRange atLeastDataRange = AtLeastDataRange.create(1, atomicRole, literalRange); if (!atLeastDataRange.isAlwaysFalse()) m_headAtoms.add(Atom.create(atLeastDataRange, X)); } } }