@Override public OWLClassExpression visit(OWLObjectMinCardinality ce) { OWLClassExpression filler = ce.getFiller().accept(this); return df.getOWLObjectMinCardinality(ce.getCardinality(), ce.getProperty(), filler); }
public void visit(OWLObjectMinCardinality min) { if (min.getCardinality() == 1 && min.isQualified()){ OWLObjectSomeValuesFrom someValuesFrom = getOWLDataFactory().getOWLObjectSomeValuesFrom(min.getProperty(), min.getFiller()); visit(someValuesFrom); } else{ super.visit(min); } }
public OWLClassExpression visit(OWLObjectMinCardinality d) { OWLClassExpression filler=getSimplified(d.getFiller()); if (d.getCardinality()<=0) return m_factory.getOWLThing(); else if (filler.isOWLNothing()) return m_factory.getOWLNothing(); else if (d.getCardinality()==1) return m_factory.getOWLObjectSomeValuesFrom(d.getProperty().getSimplified(),filler); else return m_factory.getOWLObjectMinCardinality(d.getCardinality(),d.getProperty().getSimplified(),filler); } public OWLClassExpression visit(OWLObjectMaxCardinality d) {
public OWLClassExpression visit(OWLObjectMinCardinality d) { if (d.getCardinality()==0) return m_factory.getOWLNothing(); else { OWLClassExpression filler=getNNF(d.getFiller()); return m_factory.getOWLObjectMaxCardinality(d.getCardinality()-1,d.getProperty().getSimplified(),filler); } } public OWLClassExpression visit(OWLObjectMaxCardinality d) {
if (tExp.equals(factory.getOWLThing())) exp = factory.getOWLObjectMinCardinality(1, someValueExp.getProperty()); else exp = factory.getOWLObjectMinCardinality(1, someValueExp.getProperty(), someValueExp.getFiller()); OWLObjectMinCardinality minExp = (OWLObjectMinCardinality)exp; OWLObjectProperty r; OWLObjectSomeValuesFrom someValueExp = factory.getOWLObjectSomeValuesFrom(minExp.getProperty(), minExp.getFiller()); r = factory.getOWLObjectProperty(IRI.create(getNewRole(rlCounter))); addAxiom2output(factory.getOWLSubObjectPropertyOfAxiom(r, minExp.getProperty())); OWLClassExpression tExp = minExp.getFiller(); if (!(tExp instanceof OWLObjectComplementOf)) { if (tExp.equals(factory.getOWLThing())){ int num = minExp.getCardinality(); else { OWLClassExpression tExp1 = factory.getOWLObjectAllValuesFrom(maxExp.getProperty(), tExp.getComplementNNF()); if (card == 0) return tExp1; return exp; Set<OWLClassExpression> exps = exp.asConjunctSet(); if (exps.size() == 1 && exps.iterator().next() == exp) {
@Override public OWLClassExpression visit(OWLObjectMinCardinality ce) { // >= 0 r.C \equiv \top int cardinality = ce.getCardinality(); if (cardinality == 0) { return df.getOWLThing(); } OWLClassExpression filler = ce.getFiller(); OWLClassExpression shortendedFiller = filler.accept(this); if(shortendedFiller.isOWLNothing()){// >= n r.\bot \equiv \bot if n != 0 return df.getOWLNothing(); } else if(filler != shortendedFiller){ return df.getOWLObjectMinCardinality(ce.getCardinality(), ce.getProperty(), shortendedFiller); } return ce; }
@Nonnull @Override public Set<PropertyValue> visit(OWLObjectMinCardinality ce) { if (ce.getCardinality() == 1 && !ce.getProperty().isAnonymous() && !ce.getFiller().isAnonymous()) { return toSet(PropertyClassValue.get(rm.getObjectPropertyData(ce.getProperty().asOWLObjectProperty()), rm.getClassData(ce.getFiller().asOWLClass()), state)); } else { return toSet(PropertyClassValue.get(rm.getObjectPropertyData(ce.getProperty().asOWLObjectProperty()), rm.getClassData(ce.getFiller().asOWLClass()), State.DERIVED)); } }
throws ReasoningMethodUnsupportedException { if (description.isOWLThing()) { return true; } else if (description.isOWLNothing()) { return false; } else if (!description.isAnonymous()) { return classInstancesPos.get(description.asOWLClass()).contains(individual); } else if (description instanceof OWLObjectComplementOf) { OWLClassExpression fillerConcept = ((OWLObjectSomeValuesFrom) description).getFiller(); if (property.isAnonymous()) {// \exists r^{-1}.C Map<OWLIndividual, SortedSet<OWLIndividual>> mapping = opPos.get(property.getNamedProperty()); if (property.isAnonymous()) {// \forall r^{-1}.C Map<OWLIndividual, SortedSet<OWLIndividual>> mapping = opPos.get(property.getNamedProperty()); int cardinality = ((OWLObjectMinCardinality) description).getCardinality(); OWLObjectPropertyExpression property = ((OWLObjectMinCardinality) description).getProperty(); OWLClassExpression fillerConcept = ((OWLObjectMinCardinality) description).getFiller(); if (property.isAnonymous()) { boolean hasValue = hasTypeImpl(df.getOWLDataHasValue(property, value), individual);
OWLObjectPropertyExpression property = ((OWLObjectMinCardinality) description).getProperty(); OWLClassExpression filler = ((OWLObjectMinCardinality) description).getFiller(); int number = ((OWLObjectMinCardinality) description).getCardinality(); property.isAnonymous() ? // \exists r^{-1}.{a} -> invert the mapping, i.e. get all objects that MapUtils.createSortedMultiMap(opPos.get(property.getNamedProperty())), TreeMultimap.create()).asMap() : opPos.get(property.getNamedProperty()); } else if (filler instanceof OWLDataIntersectionOf) { return ((OWLDataIntersectionOf) filler).getOperands().stream() .map(dr -> getIndividuals(df.getOWLDataSomeValuesFrom(property, dr))) .reduce((s1, s2) -> { s1.retainAll(s2); } else if (filler instanceof OWLDataUnionOf) { return ((OWLDataUnionOf) filler).getOperands().stream() .map(dr -> getIndividuals(df.getOWLDataSomeValuesFrom(property, dr))) .reduce((s1, s2) -> { s1.addAll(s2); return new TreeSet<>(Sets.difference( individuals, getIndividualsImpl(df.getOWLDataSomeValuesFrom( property, ((OWLDataComplementOf) filler).getDataRange()))));
@Override public void visit(OWLObjectMinCardinality ce) { if (!ce.getFiller().isOWLThing() && !ce.getFiller().isOWLNothing()) { // TODO specification of a filler class logger.info("Specification of cardinalities not supported yet: " + ce); return; } OWLObjectProperty property = ce.getProperty().getNamedProperty(); AbstractProperty vowlProperty = vowlData.getPropertyForIri(property.getIRI()); vowlProperty.setMinCardinality(ce.getCardinality()); vowlProperty=null; property=null; }
@Nonnull @Override public Optional<OWLProperty> visit(@Nonnull OWLObjectMinCardinality ce) { if (!ce.getProperty().isAnonymous() && ce.getCardinality() == 1) { return Optional.of(ce.getProperty().asOWLObjectProperty()); } else { return Optional.empty(); } }
public void visit(OWLObjectMinCardinality exp) { //An OWLObjectMinCardinality concept is locally negative iff the property or the filler are locally negative exp.getFiller().accept(this); if (!isBottom){ OWLObjectProperty prop = exp.getProperty().getNamedProperty(); if (externalSignature.contains(prop)){ if (!globalEntities.contains(prop)){ canMakeBottom = true; Set<OWLEntity> aux = new HashSet<OWLEntity>(); aux.add(prop); solutions.add(aux); } } else{ canMakeBottom = true; isBottom = true; solutions = new LinkedList<Set<OWLEntity>>(); } } }
@Override public void visit(OWLObjectMinCardinality ce) { if (signature.contains(ce.getProperty().getNamedProperty())) { newClassExpression = ce; } else { newClassExpression = df.getOWLNothing(); } }
@Override public void visit(OWLObjectMinCardinality ce) { if (ce.isQualified()) { addObjectCardinalityRestrictionTriples(ce, ce.getProperty(), OWL_MIN_QUALIFIED_CARDINALITY); } else { addObjectCardinalityRestrictionTriples(ce, ce.getProperty(), OWL_MIN_CARDINALITY); } }
public void visit(OWLObjectMinCardinality desc) { if (desc.isQualified()) { addCardinalityRestrictionTriples(desc, OWL_MIN_QUALIFIED_CARDINALITY); } else { addCardinalityRestrictionTriples(desc, OWL_MIN_CARDINALITY); } }
@Override public OWLClassExpression visit(OWLObjectMinCardinality d) { OWLClassExpression filler=getSimplified(d.getFiller()); if (d.getCardinality()<=0) return m_factory.getOWLThing(); else if (filler.isOWLNothing()) return m_factory.getOWLNothing(); else if (d.getCardinality()==1) return m_factory.getOWLObjectSomeValuesFrom(d.getProperty(),filler); else return m_factory.getOWLObjectMinCardinality(d.getCardinality(),d.getProperty(),filler); } @Override
public void visit(OWLObjectMinCardinality exp) { //An OWLObjectMinCardinality concept is locally negative iff the property (or the filler, if it's qualified) is locally negative if (returnSolutions){ exp.getFiller().accept(this); if (!isBottom){ canMakeBottom = true; OWLObjectProperty prop = exp.getProperty().getNamedProperty(); if (externalSignature.contains(prop)){ Set<OWLEntity> aux = new HashSet<OWLEntity>(); aux.add(prop); solutions.add(aux); } else{ isBottom = true; solutions = new LinkedList<Set<OWLEntity>>(); } } } else{ exp.getFiller().accept(this); if (!isBottom) isBottom = !externalSignature.contains(exp.getProperty().getNamedProperty()); canMakeBottom = isBottom; solutions = new LinkedList<Set<OWLEntity>>(); } }
@Override public void visit(OWLObjectMinCardinality ce) { if (signature.contains(ce.getProperty().getNamedProperty())) { newClassExpression = ce; } else { newClassExpression = df.getOWLNothing(); } }
@Override public void visit(OWLObjectMinCardinality ce) { if (ce.isQualified()) { addObjectCardinalityRestrictionTriples(ce, ce.getProperty(), OWL_MIN_QUALIFIED_CARDINALITY); } else { addObjectCardinalityRestrictionTriples(ce, ce.getProperty(), OWL_MIN_CARDINALITY); } }
@Override public void visit(OWLObjectMinCardinality desc) { if (desc.isQualified()) { addObjectCardinalityRestrictionTriples(desc, OWL_MIN_QUALIFIED_CARDINALITY); } else { addObjectCardinalityRestrictionTriples(desc, OWL_MIN_CARDINALITY); } }