@Override public Set<ComplexIntegerAxiom> visit(OWLEquivalentObjectPropertiesAxiom axiom) throws TranslationException { Objects.requireNonNull(axiom); Set<OWLObjectPropertyExpression> propertySet = axiom.getProperties(); Set<IntegerObjectPropertyExpression> propertyExprSet = new HashSet<>(); propertySet.forEach(propertyExpr -> { if (propertyExpr instanceof OWLObjectProperty) { OWLObjectProperty property = asOWLObjectProperty(propertyExpr); propertyExprSet.add(getDataTypeFactory().createObjectProperty(translateObjectProperty(property))); } else { throw new IllegalStateException(); } }); ComplexIntegerAxiom ret = getAxiomFactory().createEquivalentObjectPropertiesAxiom(propertyExprSet, translateAnnotations(axiom.getAnnotations())); return Collections.singleton(ret); }
@Override public Void visit(OWLEquivalentObjectPropertiesAxiom axiom) { Set<OWLObjectPropertyExpression> properties = axiom.getProperties(); boolean anonymousPropertyExists = false; for (OWLObjectPropertyExpression property : properties) { anonymousPropertyExists = anonymousPropertyExists || property.isAnonymous(); } // #217 - in case of EquivalentObjectProperties(:p ObjectInverseOf(:q)) if (!anonymousPropertyExists) { Collection<Long> nodes = Collections2.transform(axiom.getObjectPropertiesInSignature(), new Function<OWLObjectProperty, Long>() { @Override public Long apply(OWLObjectProperty objectProperty) { return getOrCreateNode(getIri(objectProperty)); } }); getOrCreateRelationshipPairwise(nodes, OwlRelationships.OWL_EQUIVALENT_OBJECT_PROPERTY); } return null; }
public Boolean visit(OWLEquivalentObjectPropertiesAxiom axiom) { Set<OWLObjectPropertyExpression> props=axiom.getProperties(); Iterator<OWLObjectPropertyExpression> it=props.iterator(); if (it.hasNext()) { OWLObjectPropertyExpression objectPropertyExpression1=it.next(); while (it.hasNext()) { OWLObjectPropertyExpression objectPropertyExpression2=it.next(); if (!reasoner.isSubObjectPropertyExpressionOf(objectPropertyExpression1,objectPropertyExpression2) || !reasoner.isSubObjectPropertyExpressionOf(objectPropertyExpression2,objectPropertyExpression1)) return Boolean.FALSE; } } return Boolean.TRUE; }
@Override public OWLEquivalentObjectPropertiesAxiom visit( ElkEquivalentObjectPropertiesAxiom axiom) { return owlFactory_.getOWLEquivalentObjectPropertiesAxiom( toObjectPropertyExpressionSet( axiom.getObjectPropertyExpressions())); }
@Override public T visit(OWLEquivalentObjectPropertiesAxiom axiom) { throw new IllegalArgumentException( OWLEquivalentObjectPropertiesAxiom.class.getSimpleName() + " cannot be converted to " + getTargetClass().getSimpleName()); }
/** * 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. }
/** * A utility method to process OWL <code>EquivalentDataProperties(DPE1 DPE2)</code> axiom and produce * inferred mapping assertions. */ @Override public void visit(OWLEquivalentObjectPropertiesAxiom axiom) { List<OWLObjectPropertyExpression> properties = new ArrayList<OWLObjectPropertyExpression>(axiom.getProperties()); OWLObjectPropertyExpression ope1 = properties.get(0); OWLObjectPropertyExpression ope2 = properties.get(1); /* * Get all (copy) known mappings for the first equivalent object property expression * and produce the extra mappings. */ ope1.accept(this); Set<IMapping> mappings1 = getMappingsForPropertyExpression(); if (!mappings1.isEmpty()) { ope2.accept(this); produceEquivalentPropertyMappings(mappings1); } /* * Get all (copy) known mappings for the second equivalent object property expression * and produce the extra mappings. */ ope2.accept(this); Set<IMapping> mappings2 = getMappingsForPropertyExpression(); if (!mappings2.isEmpty()) { ope1.accept(this); produceEquivalentPropertyMappings(mappings2); } }
@Override public void visit(OWLEquivalentObjectPropertiesAxiom axiom) { for (OWLObjectPropertyExpression propertyExpression : axiom.getProperties()) { if(propertyExpression.isAnonymous()){ sparql += objectVar + "<" + propertyExpression.getInverseProperty().asOWLObjectProperty().toStringID() + "> " + subjectVar + " ."; } else { sparql += subjectVar + "<" + propertyExpression.asOWLObjectProperty().toStringID() + "> " + objectVar + " ."; } } }
@Override public void visit(@Nonnull OWLEquivalentObjectPropertiesAxiom axiom) { for (OWLObjectPropertyExpression prop : axiom.getProperties()) { prop.accept(this); } processAxiomAnnotations(axiom); }
private List<Axiom> transformOWLEquivalentObjectPropertiesAxiom( OWLEquivalentObjectPropertiesAxiom a) { List<Axiom> axioms = new ArrayList<Axiom>(); for (OWLSubObjectPropertyOfAxiom ax : a.asSubObjectPropertyOfAxioms()) { OWLObjectPropertyExpression sub = ax.getSubProperty(); OWLObjectPropertyExpression sup = ax.getSuperProperty(); axioms.add( new RoleInclusion(new NamedRole(sub.asOWLObjectProperty().toStringID()), new NamedRole(sup.asOWLObjectProperty().toStringID())) ); } return axioms; }
public void visit(OWLEquivalentObjectPropertiesAxiom axiom) { notSupported(axiom); }
public void visit(OWLEquivalentObjectPropertiesAxiom axiom) { }
@SuppressWarnings("static-method") public ElkEquivalentObjectPropertiesAxiom convert( OWLEquivalentObjectPropertiesAxiom owlEquivalentObjectPropertiesAxiom) { return new ElkEquivalentObjectPropertiesAxiomWrap<OWLEquivalentObjectPropertiesAxiom>( owlEquivalentObjectPropertiesAxiom); }
@Override public ElkAxiom visit( OWLEquivalentObjectPropertiesAxiom owlEquivalentObjectProperties) { return CONVERTER.convert(owlEquivalentObjectProperties); }
@Override public ElkObjectPropertyAxiom visit( OWLEquivalentObjectPropertiesAxiom owlEquivalentObjectProperties) { return CONVERTER.convert(owlEquivalentObjectProperties); }
@Override public void visit(OWLEquivalentObjectPropertiesAxiom axiom) { defaultVisit(axiom); }
@Override public OWLAxiom visit(OWLEquivalentObjectPropertiesAxiom axiom) { return factory.getOWLEquivalentObjectPropertiesAxiom(axiom.getProperties(), annotations); }
@Override public void visit(OWLEquivalentObjectPropertiesAxiom axiom) { }
@Override public Boolean visit(OWLEquivalentObjectPropertiesAxiom axiom) { return true; }
@Override public Boolean visit(OWLEquivalentObjectPropertiesAxiom axiom) { return false; }
@Override public Boolean visit(OWLEquivalentObjectPropertiesAxiom axiom) { Objects.requireNonNull(axiom); return add(this.df.getOWLEquivalentObjectPropertiesAxiom(axiom.getProperties(), reg(axiom.getAnnotations()))); }
@Override public Boolean visit(OWLEquivalentObjectPropertiesAxiom axiom) { Objects.requireNonNull(axiom); return add(this.df.getOWLEquivalentObjectPropertiesAxiom(axiom.getProperties(), empty())); }
@Override public O visit(OWLEquivalentObjectPropertiesAxiom axiom) { return doDefault(axiom); }
@Override public void visit(OWLEquivalentObjectPropertiesAxiom axiom) { type = AXIOM_TYPE_INDEX_BASE + axiom.getAxiomType().getIndex(); }
@Override public OWLAxiom visit(OWLEquivalentObjectPropertiesAxiom axiom) { return axiom; }
@Override public void visit(OWLEquivalentObjectPropertiesAxiom axiom) { hashCode = primes[15]; hashCode = hashCode * MULT + axiom.getProperties().hashCode(); hashCode = hashCode * MULT + axiom.getAnnotations().hashCode(); }
@Override public void visit(OWLEquivalentObjectPropertiesAxiom axiom) { handleDefault(axiom); }
public void visit(OWLEquivalentObjectPropertiesAxiom arg0) { unusedAxiom(arg0); }
@Override protected void writeAxiom(OWLEquivalentObjectPropertiesAxiom axiom, BinaryOWLOutputStream outputStream) throws IOException { outputStream.writeOWLObjects(axiom.getProperties()); }
@Override protected OWLEquivalentObjectPropertiesAxiom readAxiom(BinaryOWLInputStream inputStream, Set<OWLAnnotation> annotations) throws IOException, BinaryOWLParseException { Set<OWLObjectPropertyExpression> propertyExpressions = inputStream.readOWLObjects(); return inputStream.getDataFactory().getOWLEquivalentObjectPropertiesAxiom(propertyExpressions, annotations); }
public void visit(OWLEquivalentObjectPropertiesAxiom ax){ relation = Utilities.EQ; type = Utilities.OBJECTPROPERTIES; for (OWLAnnotation ann : ax.getAnnotations()){ treatAnnotation(ann); } }
public void visit(OWLEquivalentObjectPropertiesAxiom arg0) { }
public void visit(OWLEquivalentObjectPropertiesAxiom arg0) { // TODO Auto-generated method stub }
public abstract void visit(OWLEquivalentObjectPropertiesAxiom arg0);