@Override public ObjectPropertyExpression createAuxiliaryObjectProperty() { ObjectPropertyExpression ope = new ObjectPropertyExpressionImpl(AUXROLEURI + auxCounter); auxCounter++ ; auxObjectProperties.add(ope); return ope; }
@Override public boolean equals(Object obj) { if (obj == this) return true; if (obj instanceof DataPropertyExpressionImpl) { DataPropertyExpressionImpl other = (DataPropertyExpressionImpl) obj; return name.equals(other.name); } // object and data properties share the same name space if (obj instanceof ObjectPropertyExpressionImpl) { ObjectPropertyExpressionImpl other = (ObjectPropertyExpressionImpl) obj; return (false == other.isInverse()) && name.equals(other.getName()); } return false; }
@Override public boolean equals(Object obj) { if (obj == this) return true; if (obj instanceof ObjectPropertyExpressionImpl) { ObjectPropertyExpressionImpl other = (ObjectPropertyExpressionImpl) obj; return string.equals(other.string) && (isInverse == other.isInverse); } // the two types of properties share the same name space if (obj instanceof DataPropertyExpressionImpl) { DataPropertyExpressionImpl other = (DataPropertyExpressionImpl) obj; return (isInverse == false) && getName().equals(other.getName()); } return false; }
/** * creates an object property assertion (without checking any vocabulary) * * @return null if it is top object property ([O4], @see OntologyFactoryImpl) * @throws InconsistentOntologyException if it is the bottom object property ([O4], @see OntologyFactoryImpl) */ @Override public ObjectPropertyAssertion createObjectPropertyAssertion(String propertyName, ObjectConstant o1, ObjectConstant o2) throws InconsistentOntologyException { ObjectPropertyExpression ope = new ObjectPropertyExpressionImpl(propertyName); return ofac.createObjectPropertyAssertion(ope, o1, o2); }
@Override public ObjectPropertyExpression createObjectProperty(String uri) { ObjectPropertyExpression rd = new ObjectPropertyExpressionImpl(uri); if (!rd.isBottom() && !rd.isTop()) objectProperties.put(uri, rd); return rd; }
/** * general constructor * * @param name */ ObjectPropertyExpressionImpl(String name) { this.predicate = ofac.getObjectPropertyPredicate(name); this.isInverse = false; this.string = name; this.isTop = name.equals(owlTopObjectPropertyIRI); this.isBottom = name.equals(owlBottomObjectPropertyIRI); if (isTop || isBottom) this.inverseProperty = this; // rule [R6] else this.inverseProperty = new ObjectPropertyExpressionImpl(predicate, this); this.domain = new ObjectSomeValuesFromImpl(this); }