public void visit(OWLObjectPropertyRangeAxiom axiom) { try { OWLObjectProperty op = Utils.ensureObjectProperty(axiom.getProperty()); OWLClass clz = Utils.ensureClass(axiom.getRange()); opRanges.put(op, clz); // processSubClassConstraintCandidate(f.getOWLThing(), // OWLManager.getOWLDataFactory().getOWLObjectAllValuesFrom(op, clz)); } catch (UnsupportedICException e) { notSupported(axiom); } }
@Override public T visit(OWLObjectPropertyRangeAxiom axiom) { throw new IllegalArgumentException( OWLObjectPropertyRangeAxiom.class.getSimpleName() + " cannot be converted to " + getTargetClass().getSimpleName()); }
/** * It returns the (first) value of the range tag * * @param prop * @return range or null */ public String getRange(OWLObjectProperty prop){ for(OWLObjectPropertyRangeAxiom axiom : sourceOntology.getObjectPropertyRangeAxioms(prop)) { OWLClassExpression ce = axiom.getRange(); return getIdentifier(ce); } return null; }
@Override public Set<ComplexIntegerAxiom> visit(OWLObjectPropertyRangeAxiom axiom) throws TranslationException { Objects.requireNonNull(axiom); OWLObjectProperty property = asOWLObjectProperty(axiom.getProperty()); OWLClassExpression classExpression = axiom.getRange(); IntegerObjectProperty propExpr = getDataTypeFactory().createObjectProperty(translateObjectProperty(property)); ComplexIntegerAxiom ret = getAxiomFactory().createPropertyRangeAxiom(propExpr, translateClassExpression(classExpression), translateAnnotations(axiom.getAnnotations())); return Collections.singleton(ret); }
/** * A utility method to process OWL <code>ObjectPropertyRange(OPE CE)</code> axiom and produce * inferred mapping assertions. This axiom is equivalent to * <code>SubClassOf(ObjectSomeValuesFrom(ObjectInverseOf(OPE) owl:Thing) CE)</code>. */ @Override public void visit(OWLObjectPropertyRangeAxiom axiom) { asSubClassOfAxiom(axiom).accept(this); resetIsInverse(); // reset the isInverse = false. }
@Override public void visit(OWLObjectPropertyRangeAxiom axiom) { addSubClassAxiom(asSubClassOfAxiom(axiom)); OWLObjectPropertyExpression op = axiom.getProperty(); OwlNodeSet<OWLPropertyExpression<?,?>> descendants = mPropertyStructureHandler.getDescendants(op, false); for (OwlNode<OWLPropertyExpression<?,?>> node : descendants.getNodes()) { op = (OWLObjectPropertyExpression) node.getEntity(); axiom = mOwlDataFactory.getOWLObjectPropertyRangeAxiom(op, axiom.getRange()); addSubClassAxiom(asSubClassOfAxiom(axiom)); } }
private OWLSubClassOfAxiom asSubClassOfAxiom(OWLObjectPropertyRangeAxiom axiom) { OWLObjectInverseOf inverseExpression = mOwlDataFactory.getOWLObjectInverseOf(axiom.getProperty()); OWLClassExpression classExpression = axiom.getRange(); OWLClassExpression sub = mOwlDataFactory.getOWLObjectSomeValuesFrom(inverseExpression, mOwlDataFactory.getOWLThing()); return mOwlDataFactory.getOWLSubClassOfAxiom(sub, classExpression); }
@Override public void visit(OWLObjectPropertyRangeAxiom axiom) { OWLSubClassOfAxiom subClassOfAxiom = axiom.asOWLSubClassOfAxiom(); subClassOfAxiom.accept(this); String tmp = subjectVar; subjectVar = objectVar; objectVar = tmp; }
@Override public void visit(OWLObjectPropertyRangeAxiom axiom) { hashCode = primes[26]; hashCode = hashCode * MULT + axiom.getProperty().hashCode(); hashCode = hashCode * MULT + axiom.getRange().hashCode(); hashCode = hashCode * MULT + axiom.getAnnotations().hashCode(); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!super.equals(obj)) { return false; } return obj instanceof OWLObjectPropertyRangeAxiom; }
@Nonnull @Override public OWLObjectPropertyRangeAxiom getAxiomWithoutAnnotations() { if (!isAnnotated()) { return this; } return new OWLObjectPropertyRangeAxiomImpl(getProperty(), getRange(), NO_ANNOTATIONS); }
public Object visit(OWLSubPropertyChainOfAxiom axiom) { Set<OWLObjectPropertyRangeAxiom> rangeAxioms = getCurrentOntology().getAxioms(AxiomType.OBJECT_PROPERTY_RANGE, true); if (rangeAxioms.isEmpty()) { return false; } // Do we have a range restriction imposed on our super property? for (OWLObjectPropertyRangeAxiom rngAx : rangeAxioms) { if (getPropertyManager().isSubPropertyOf(axiom.getSuperProperty(), rngAx.getProperty())) { // Imposed range restriction! OWLClassExpression imposedRange = rngAx.getRange(); // There must be an axiom that imposes a range on the last prop in the chain List<OWLObjectPropertyExpression> chain = axiom.getPropertyChain(); if (!chain.isEmpty()) { OWLObjectPropertyExpression lastProperty = chain.get(chain.size() - 1); boolean rngPresent = false; for (OWLOntology ont : getCurrentOntology().getImportsClosure()) { for (OWLObjectPropertyRangeAxiom lastPropRngAx : ont.getObjectPropertyRangeAxioms(lastProperty)) { if (lastPropRngAx.getRange().equals(imposedRange)) { // We're o.k. rngPresent = true; break; } } } if (!rngPresent) { profileViolations.add(new LastPropertyInChainNotInImposedRange(getCurrentOntology(), axiom, rngAx)); } } } } return null; }
public void visit(OWLObjectPropertyRangeAxiom axiom) { OWLObjectAllValuesFrom allPropertyRange=m_factory.getOWLObjectAllValuesFrom(axiom.getProperty().getSimplified(),positive(axiom.getRange())); m_classExpressionInclusionsAsDisjunctions.add(new OWLClassExpression[] { allPropertyRange }); }
public Boolean visit(OWLObjectPropertyRangeAxiom axiom) { return reasoner.isSubClassOf(factory.getOWLThing(),factory.getOWLObjectAllValuesFrom(axiom.getProperty(),axiom.getRange())); }
public void visit(OWLObjectPropertyRangeAxiom axiom) { }
@Override public OWLObjectPropertyRangeAxiom visit( ElkObjectPropertyRangeAxiom axiom) { return owlFactory_.getOWLObjectPropertyRangeAxiom( convert(axiom.getProperty()), convert(axiom.getRange())); }
@SuppressWarnings("static-method") public ElkObjectPropertyRangeAxiom convert( OWLObjectPropertyRangeAxiom owlObjectPropertyRangeAxiom) { return new ElkObjectPropertyRangeAxiomWrap<OWLObjectPropertyRangeAxiom>( owlObjectPropertyRangeAxiom); }
@Override public ElkAxiom visit( OWLObjectPropertyRangeAxiom owlObjectPropertyRangeAxiom) { return CONVERTER.convert(owlObjectPropertyRangeAxiom); }
@Override public ElkObjectPropertyAxiom visit( OWLObjectPropertyRangeAxiom owlObjectPropertyRangeAxiom) { return CONVERTER.convert(owlObjectPropertyRangeAxiom); }
@Override public void visit(OWLObjectPropertyRangeAxiom axiom) { defaultVisit(axiom); }
@Override public OWLAxiom visit(OWLObjectPropertyRangeAxiom axiom) { return factory.getOWLObjectPropertyRangeAxiom(axiom.getProperty(), axiom.getRange(), annotations); }
@Override public void visit(OWLObjectPropertyRangeAxiom axiom) { }
public void visit(OWLObjectPropertyRangeAxiom arg0) { throw new IllegalStateException("OWLObjectRangeAxiom should have been normalized (rewritten) already."); }
@Override public Boolean visit(OWLObjectPropertyRangeAxiom axiom) { return true; }
@Override public Boolean visit(OWLObjectPropertyRangeAxiom axiom) { return false; }
@Override public Boolean visit(OWLObjectPropertyRangeAxiom axiom) { Objects.requireNonNull(axiom); return add(this.df.getOWLObjectPropertyRangeAxiom(axiom.getProperty(), axiom.getRange(), reg(axiom.getAnnotations()))); }
@Override public Boolean visit(OWLObjectPropertyRangeAxiom axiom) { Objects.requireNonNull(axiom); return add(this.df.getOWLObjectPropertyRangeAxiom(axiom.getProperty(), axiom.getRange(), empty())); }
private OWLSubClassOfAxiom asSubClassOfAxiom(OWLObjectPropertyRangeAxiom axiom) { OWLObjectInverseOf inv = sOwlDataFactory.getOWLObjectInverseOf(axiom.getProperty()); OWLClassExpression sub = sOwlDataFactory.getOWLObjectSomeValuesFrom(inv, sOwlDataFactory.getOWLThing()); return sOwlDataFactory.getOWLSubClassOfAxiom(sub, axiom.getRange()); }
@Override public O visit(OWLObjectPropertyRangeAxiom axiom) { return doDefault(axiom); }
@Override public void visit(OWLObjectPropertyRangeAxiom axiom) { type = AXIOM_TYPE_INDEX_BASE + axiom.getAxiomType().getIndex(); }
@Override public OWLAxiom visit(OWLObjectPropertyRangeAxiom axiom) { return dataFactory.getOWLObjectPropertyRangeAxiom(axiom.getProperty(), axiom.getRange().accept(this)); }
@Override public Set<OWLClassExpression> visit(OWLObjectPropertyRangeAxiom axiom) { return axiom.getRange().accept(this); }
@Override public void visit(OWLObjectPropertyRangeAxiom axiom) { handleDefault(axiom); }
@Override public OWLObjectPropertyRangeAxiom getAnnotatedAxiom( Set<OWLAnnotation> annotations) { return new OWLObjectPropertyRangeAxiomImpl(getProperty(), getRange(), mergeAnnos(annotations)); }
@Override public void visit(@Nonnull OWLObjectPropertyRangeAxiom axiom) { axiom.getRange().accept(this); axiom.getProperty().accept(this); processAxiomAnnotations(axiom); }