/** * special constructor for creating the inverse of an object property * (this constructor is never applied to the top and bottom properties) * * @param iri * @param inverseProperty */ private ObjectPropertyExpressionImpl(IRI iri, ObjectPropertyExpressionImpl inverseProperty) { this.iri = iri; this.isInverse = true; // always inverted this.isTop = false; // cannot be the top property this.isBottom = false; // cannot be the bottom property this.inverseProperty = inverseProperty; // always inverted this.string = new StringBuilder().append(this.iri.getIRIString()).append("^-").toString(); this.domain = new ObjectSomeValuesFromImpl(this); }
/** * special constructor for creating the inverse of an object property * (this constructor is never applied to the top and bottom properties) * * @param p * @param inverseProperty */ private ObjectPropertyExpressionImpl(Predicate p, ObjectPropertyExpressionImpl inverseProperty) { this.predicate = p; this.isInverse = true; // always inverted this.isTop = false; // cannot be the top property this.isBottom = false; // cannot be the bottom property this.inverseProperty = inverseProperty; // always inverted this.string = new StringBuilder().append(predicate.getName()).append("^-").toString(); this.domain = new ObjectSomeValuesFromImpl(this); }
/** * general constructor * * @param name */ ObjectPropertyExpressionImpl(String name) { this.predicate = TERM_FACTORY.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); }
ObjectPropertyExpressionImpl(IRI iri) { this.iri = iri; this.isInverse = false; this.string = iri.getIRIString(); this.isTop = iri.equals(OWL.TOP_OBJECT_PROPERTY); this.isBottom = iri.equals(OWL.BOTTOM_OBJECT_PROPERTY); if (isTop || isBottom) this.inverseProperty = this; // rule [R6] else this.inverseProperty = new ObjectPropertyExpressionImpl(iri, this); this.domain = new ObjectSomeValuesFromImpl(this); }