public void visit(OWLDataAllValuesFrom object) { LiteralDataRange literalRange=m_dataRangeConverter.convertDataRange(object.getFiller()); if (object.getProperty().isOWLTopDataProperty()) { if (literalRange.isAlwaysFalse()) return; // bottom } Variable y=nextY(); m_bodyAtoms.add(getRoleAtom(object.getProperty(),X,y)); if (literalRange.isNegatedInternalDatatype()) { InternalDatatype negatedRange=(InternalDatatype)literalRange.getNegation(); if (!negatedRange.isAlwaysTrue()) m_bodyAtoms.add(Atom.create(negatedRange,y)); } else { if (!literalRange.isAlwaysFalse()) m_headAtoms.add(Atom.create((DLPredicate)literalRange,y)); } }
@Override public void addToOntology() { OWLDataProperty property = factory.getOWLDataProperty(":dataAllValuesFromProperty", pm); OWLDatatype value = OWL2Datatype.XSD_INTEGER.getDatatype(factory); addToGenericDomainAndNewRange(property, value); OWLDataAllValuesFrom restriction = factory.getOWLDataAllValuesFrom(property, value); OWLClass allValuesFrom = featurePool.getExclusiveClass(":DataAllValuesFrom"); addAxiomToOntology(factory.getOWLSubClassOfAxiom(allValuesFrom, restriction)); }
public void visit(OWLDataAllValuesFrom arg0) { try { OWLDataProperty op = Utils.ensureDataProperty(arg0.getProperty()); OWLDatatype clz = Utils.ensureDatatype(arg0.getFiller()); integrityConstraints.add(integrityConstraintFactory.DataPropertyRangeConstraint( subjClass, op, clz)); } catch (UnsupportedICException e) { notSupported(arg0); } }
public void visit(OWLDataPropertyDomainAxiom axiom) { OWLDataPropertyExpression dataProperty=axiom.getProperty(); checkTopDataPropertyUse(dataProperty,axiom); OWLDataRange dataNothing=m_factory.getOWLDataComplementOf(m_factory.getTopDatatype()); OWLDataAllValuesFrom allPropertyDataNothing=m_factory.getOWLDataAllValuesFrom(dataProperty,dataNothing); m_classExpressionInclusionsAsDisjunctions.add(new OWLClassExpression[] { positive(axiom.getDomain()),allPropertyDataNothing }); }
public OWLClassExpression visit(OWLDataAllValuesFrom object) { OWLDataRange filler=object.getFiller(); OWLDataPropertyExpression prop=object.getProperty(); if (prop.isOWLTopDataProperty()) throwInvalidTopDPUseError(object); if (isLiteral(filler)) return m_factory.getOWLDataAllValuesFrom(prop,filler); else { OWLDatatype definition=getDefinitionFor(filler,m_alreadyExists); if (!m_alreadyExists[0]) m_newDataRangeInclusions.add(new OWLDataRange[] { negative(definition),filler }); return m_factory.getOWLDataAllValuesFrom(prop,definition); } }
public OWLClassExpression visit(OWLDataAllValuesFrom d) { OWLDataRange filler=getSimplified(d.getFiller()); if (filler.isTopDatatype()) return m_factory.getOWLThing(); else return m_factory.getOWLDataAllValuesFrom(d.getProperty(),filler); }
@Override public OWLDataAllValuesFrom visit(ElkDataAllValuesFrom expression) { List<? extends ElkDataPropertyExpression> expressions = expression .getDataPropertyExpressions(); if (expressions.size() > 0) { throw new IllegalArgumentException( "OWLAPI supports only one data property in OWLDataAllValuesFrom"); } return owlFactory_.getOWLDataAllValuesFrom(convert(expressions.get(0)), convert(expression.getDataRange())); }
@Override public OWLClassExpression visit(OWLDataAllValuesFrom ce) { OWLDataRange filler = ce.getFiller().accept(this); if (negated) { return dataFactory.getOWLDataSomeValuesFrom(ce.getProperty(), filler); } else { return dataFactory .getOWLDataAllValuesFrom(ce.getProperty(), filler); } }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!super.equals(obj)) { return false; } return obj instanceof OWLDataAllValuesFrom; }
/** * create axioms for class--dataproperty----datatype relation. */ // be sure for OWLDatatype vs OWL2DataType private void getClass2DataProperty2DataTypeAxioms(OWLClass src, OWLDataProperty dataprop, OWLDatatype dest) { // Set<OWLAxiom> tmpaxioms = new HashSet<OWLAxiom>(); OWLAxiom axiom; OWLDataSomeValuesFrom owlDataSomeValuesFrom; OWLDataAllValuesFrom owlDataAllValuesFrom; OWLDataMaxCardinality owlDataMaxCardinality; // set domain and range // scoped domain if (editor.isGenerateDomainAxiom()) { owlDataSomeValuesFrom = owlDataFactory.getOWLDataSomeValuesFrom(dataprop, dest); axiom = owlDataFactory.getOWLSubClassOfAxiom(owlDataSomeValuesFrom, src); domainAndRangeAxioms.add(axiom); owlDataSomeValuesFrom = owlDataFactory.getOWLDataSomeValuesFrom(dataprop, owlDataFactory.getTopDatatype()); axiom = owlDataFactory.getOWLSubClassOfAxiom(owlDataSomeValuesFrom, src); domainAndRangeAxioms.add(axiom); } // scoped range if (editor.isGenerateRangeAxiom()) { owlDataAllValuesFrom = owlDataFactory.getOWLDataAllValuesFrom(dataprop, dest); axiom = owlDataFactory.getOWLSubClassOfAxiom(src, owlDataAllValuesFrom); domainAndRangeAxioms.add(axiom); owlDataAllValuesFrom = owlDataFactory.getOWLDataAllValuesFrom(dataprop, dest); axiom = owlDataFactory.getOWLSubClassOfAxiom(owlDataFactory.getOWLThing(), owlDataAllValuesFrom); domainAndRangeAxioms.add(axiom); } // set existential restriction // source existential functionality if (editor.isGenerateExistentialAxiom()) { owlDataSomeValuesFrom = owlDataFactory.getOWLDataSomeValuesFrom(dataprop, dest); axiom = owlDataFactory.getOWLSubClassOfAxiom(src, owlDataSomeValuesFrom); existentialAxioms.add(axiom); } // destination existential functionality. dataproperty doesn't have // inverse property // set cardinality restriction if (editor.isGenerateCardinalityAxiom()) { owlDataMaxCardinality = owlDataFactory.getOWLDataMaxCardinality(1, dataprop, dest); axiom = owlDataFactory.getOWLSubClassOfAxiom(src, owlDataMaxCardinality); cardinalityAxioms.add(axiom); owlDataMaxCardinality = owlDataFactory.getOWLDataMaxCardinality(1, dataprop, dest); axiom = owlDataFactory.getOWLSubClassOfAxiom(owlDataFactory.getOWLThing(), owlDataMaxCardinality); cardinalityAxioms.add(axiom); owlDataMaxCardinality = owlDataFactory.getOWLDataMaxCardinality(1, dataprop, owlDataFactory.getTopDatatype()); axiom = owlDataFactory.getOWLSubClassOfAxiom(owlDataFactory.getOWLThing(), owlDataMaxCardinality); cardinalityAxioms.add(axiom); owlDataMaxCardinality = owlDataFactory.getOWLDataMaxCardinality(1, dataprop, owlDataFactory.getTopDatatype()); axiom = owlDataFactory.getOWLSubClassOfAxiom(src, owlDataMaxCardinality); cardinalityAxioms.add(axiom); } // dataproperty doesn't have inverse property // System.out.println(axiom.toString()); // return tmpaxioms; }
public void visit(OWLDataAllValuesFrom object) { visitProperty(object.getProperty()); }
public void visit(OWLDataPropertyRangeAxiom axiom) { OWLDataPropertyExpression dataProperty=axiom.getProperty(); checkTopDataPropertyUse(dataProperty,axiom); OWLDataAllValuesFrom allPropertyRange=m_factory.getOWLDataAllValuesFrom(dataProperty,positive(axiom.getRange())); m_classExpressionInclusionsAsDisjunctions.add(new OWLClassExpression[] { allPropertyRange }); }
public Boolean visit(OWLDataAllValuesFrom desc) { return Boolean.TRUE; }
public void visit(OWLDataAllValuesFrom object) { m_hasDatatypes=true; }
public OWLClassExpression visit(OWLDataAllValuesFrom d) { OWLDataRange filler=getNNF(d.getFiller()); return m_factory.getOWLDataAllValuesFrom(d.getProperty(),filler); }
public OWLClassExpression visit(OWLDataAllValuesFrom d) { OWLDataRange filler=getComplementNNF(d.getFiller()); return m_factory.getOWLDataSomeValuesFrom(d.getProperty(),filler); }
@Override public ElkDataAllValuesFrom visit( OWLDataAllValuesFrom owlDataAllValuesFrom) { return CONVERTER.convert(owlDataAllValuesFrom); }
@SuppressWarnings("static-method") public ElkDataAllValuesFrom convert( OWLDataAllValuesFrom owlDataAllValuesFrom) { return new ElkDataAllValuesFromWrap<OWLDataAllValuesFrom>( owlDataAllValuesFrom); }
@Override public OWLDataAllValuesFrom visit(OWLDataAllValuesFrom ce) { return null; }
@Override public HandlerResult visit(OWLDataAllValuesFrom ce) { return null; }
public DataPropertyRestriction(OWLDataAllValuesFrom ex, OWLHelper helper) { IRI roleIRI = ex.getProperty().asOWLDataProperty().getIRI(); this.role = helper.shorten(roleIRI); this.fillerType = ex.getFiller().asOWLDatatype().getBuiltInDatatype(); this.multiplicity = Multiplicity.create(0, (helper.isFunctional(roleIRI) ? 1 : null)); }
@Override public Boolean visit(OWLDataAllValuesFrom classExpression) { return false; }
@Override public IntegerClassExpression visit(OWLDataAllValuesFrom ce) { Objects.requireNonNull(ce); throw TranslationException.newUnsupportedTranslationException(ce); }