public void visit(OWLInverseObjectPropertiesAxiom axiom) { OWLObjectPropertyExpression first=axiom.getFirstProperty(); OWLObjectPropertyExpression second=axiom.getSecondProperty(); addInclusion(first,second.getInverseProperty()); addInclusion(second,first.getInverseProperty()); m_axioms.m_objectPropertiesOccurringInOWLAxioms.add(first.getNamedProperty()); m_axioms.m_objectPropertiesOccurringInOWLAxioms.add(second.getNamedProperty()); }
@Override public OWLInverseObjectPropertiesAxiom visit( ElkInverseObjectPropertiesAxiom axiom) { return owlFactory_.getOWLInverseObjectPropertiesAxiom( convert(axiom.getFirstObjectPropertyExpression()), convert(axiom.getSecondObjectPropertyExpression())); }
@Override public T visit(OWLInverseObjectPropertiesAxiom axiom) { throw new IllegalArgumentException( OWLInverseObjectPropertiesAxiom.class.getSimpleName() + " cannot be converted to " + getTargetClass().getSimpleName()); }
private boolean isInverseOfPair(OWLObjectProperty p1, OWLObjectProperty p2) { for (OWLOntology ont : getAllOntologies()) { for (OWLInverseObjectPropertiesAxiom a : ont.getInverseObjectPropertyAxioms(p1)) { if (a.getFirstProperty().equals(p2) || a.getSecondProperty().equals(p2)) { return true; } } } return false; }
@Override public Set<ComplexIntegerAxiom> visit(OWLInverseObjectPropertiesAxiom axiom) { Objects.requireNonNull(axiom); OWLObjectProperty firstProperty = asOWLObjectProperty(axiom.getFirstProperty()); OWLObjectProperty secondProperty = asOWLObjectProperty(axiom.getSecondProperty()); IntegerObjectProperty firstPropertyExpr = getDataTypeFactory() .createObjectProperty(translateObjectProperty(firstProperty)); IntegerObjectProperty secondPropertyExpr = getDataTypeFactory() .createObjectProperty(translateObjectProperty(secondProperty)); ComplexIntegerAxiom ret = getAxiomFactory().createInverseObjectPropertiesAxiom(firstPropertyExpr, secondPropertyExpr, translateAnnotations(axiom.getAnnotations())); return Collections.singleton(ret); }
/** * A utility method to process OWL <code>InverseObjectProperties(OPE1 OPE2)</code> axiom and * produce inferred mapping assertions. The axiom states object property expression * <code>OPE1</code> is an inverse of the object property expression <code>OPE2</code>. */ @Override public void visit(OWLInverseObjectPropertiesAxiom axiom) { OWLObjectPropertyExpression ope1 = axiom.getFirstProperty(); OWLObjectPropertyExpression ope2 = sOwlDataFactory.getOWLObjectInverseOf(axiom.getSecondProperty()); OWLEquivalentObjectPropertiesAxiom ax = sOwlDataFactory.getOWLEquivalentObjectPropertiesAxiom(ope1, ope2); ax.accept(this); resetIsInverse(); // reset the isInverse = false. }
@Override public void visit(OWLInverseObjectPropertiesAxiom axiom) { hashCode = primes[19]; hashCode = hashCode * MULT + axiom.getFirstProperty().hashCode() + axiom.getSecondProperty().hashCode(); hashCode = hashCode * MULT + axiom.getAnnotations().hashCode(); }
@Override public OWLInverseObjectPropertiesAxiom getAxiomWithoutAnnotations() { if (!isAnnotated()) { return this; } return new OWLInverseObjectPropertiesAxiomImpl(getFirstProperty(), getSecondProperty(), NO_ANNOTATIONS); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!super.equals(obj)) { return false; } return obj instanceof OWLInverseObjectPropertiesAxiom; }
public void visit(OWLInverseObjectPropertiesAxiom axiom) { notSupported(axiom); }
public Boolean visit(OWLInverseObjectPropertiesAxiom axiom) { OWLObjectPropertyExpression objectPropertyExpression1=axiom.getFirstProperty().getInverseProperty(); OWLObjectPropertyExpression objectPropertyExpression2=axiom.getSecondProperty(); return reasoner.isSubObjectPropertyExpressionOf(objectPropertyExpression1,objectPropertyExpression2) && reasoner.isSubObjectPropertyExpressionOf(objectPropertyExpression2,objectPropertyExpression1); }
public void visit(OWLInverseObjectPropertiesAxiom axiom) { }
@SuppressWarnings("static-method") public ElkInverseObjectPropertiesAxiom convert( OWLInverseObjectPropertiesAxiom owlInverseObjectPropertiesAxiom) { return new ElkInverseObjectPropertiesAxiomWrap<OWLInverseObjectPropertiesAxiom>( owlInverseObjectPropertiesAxiom); }
@Override public ElkAxiom visit( OWLInverseObjectPropertiesAxiom owlInverseObjectPropertiesAxiom) { return CONVERTER.convert(owlInverseObjectPropertiesAxiom); }
@Override public ElkObjectPropertyAxiom visit( OWLInverseObjectPropertiesAxiom owlInverseObjectPropertiesAxiom) { return CONVERTER.convert(owlInverseObjectPropertiesAxiom); }
@Override public void visit(OWLInverseObjectPropertiesAxiom axiom) { defaultVisit(axiom); }
@Override public OWLAxiom visit(OWLInverseObjectPropertiesAxiom axiom) { return factory.getOWLInverseObjectPropertiesAxiom(axiom.getFirstProperty(), axiom.getSecondProperty(), annotations); }
@Override public void visit(OWLInverseObjectPropertiesAxiom axiom) { }
@Override public Boolean visit(OWLInverseObjectPropertiesAxiom axiom) { return true; }
@Override public Boolean visit(OWLInverseObjectPropertiesAxiom axiom) { return false; }
@Override public Boolean visit(OWLInverseObjectPropertiesAxiom axiom) { Objects.requireNonNull(axiom); return add(this.df.getOWLInverseObjectPropertiesAxiom(axiom.getFirstProperty(), axiom.getSecondProperty(), reg(axiom.getAnnotations()))); }
@Override public Boolean visit(OWLInverseObjectPropertiesAxiom axiom) { Objects.requireNonNull(axiom); return add(this.df.getOWLInverseObjectPropertiesAxiom(axiom.getFirstProperty(), axiom.getSecondProperty(), empty())); }
@Override public void visit(OWLInverseObjectPropertiesAxiom axiom) { axiom.asSubObjectPropertyOfAxioms().forEach(ax -> ax.accept(this)); }
@Override public O visit(OWLInverseObjectPropertiesAxiom axiom) { return doDefault(axiom); }
@Override public void visit(OWLInverseObjectPropertiesAxiom axiom) { type = AXIOM_TYPE_INDEX_BASE + axiom.getAxiomType().getIndex(); }
@Override public OWLAxiom visit(OWLInverseObjectPropertiesAxiom axiom) { return axiom; }
@Override public void visit(OWLInverseObjectPropertiesAxiom axiom) { handleDefault(axiom); }
@Override public Set<OWLInverseObjectPropertiesAxiom> asPairwiseAxioms() { return CollectionFactory .createSet((OWLInverseObjectPropertiesAxiom) this); }
@Override public Set<OWLInverseObjectPropertiesAxiom> splitToAnnotatedPairs() { return asPairwiseAxioms(); }
@Override public OWLInverseObjectPropertiesAxiom getAnnotatedAxiom( Set<OWLAnnotation> annotations) { return new OWLInverseObjectPropertiesAxiomImpl(getFirstProperty(), getSecondProperty(), mergeAnnos(annotations)); }
@Override public void visit(@Nonnull OWLInverseObjectPropertiesAxiom axiom) { axiom.getFirstProperty().accept(this); axiom.getSecondProperty().accept(this); processAxiomAnnotations(axiom); }
public Object visit(OWLInverseObjectPropertiesAxiom axiom) { profileViolations.add(new UseOfIllegalAxiom(getCurrentOntology(), axiom)); return null; }
public void visit(OWLInverseObjectPropertiesAxiom arg0) { unusedAxiom(arg0); }
@Override protected void writeAxiom(OWLInverseObjectPropertiesAxiom axiom, BinaryOWLOutputStream outputStream) throws IOException { outputStream.writeOWLObject(axiom.getFirstProperty()); outputStream.writeOWLObject(axiom.getSecondProperty()); }
@Override protected OWLInverseObjectPropertiesAxiom readAxiom(BinaryOWLInputStream inputStream, Set<OWLAnnotation> annotations) throws IOException, BinaryOWLParseException { OWLObjectPropertyExpression firstPropertyExpression = inputStream.readOWLObject(); OWLObjectPropertyExpression secondPropertyExpression = inputStream.readOWLObject(); return inputStream.getDataFactory().getOWLInverseObjectPropertiesAxiom(firstPropertyExpression, secondPropertyExpression, annotations); }
public void visit(OWLInverseObjectPropertiesAxiom arg0) { }