/* * (non-Javadoc) * * @see gate.creole.ontology.OInstance#addObjectPropertyValue(gate.creole.ontology.ObjectProperty, * gate.creole.ontology.OInstance) */ public void addObjectPropertyValue(ObjectProperty aProperty, OInstance value) throws InvalidValueException { // we need to check if the current instance is a valid domain for // the property if (!aProperty.isValidDomain(this)) { Utils.error( this.getURI().toString() + " is not a valid domain for the property " + aProperty.getURI().toString()); return; } // we need to check if the current instance is a valid domain for // the property if (!aProperty.isValidRange(value)) { Utils.error( value.getURI().toString() + " is not a valid range for the property " + aProperty.getURI().toString()); return; } owlim.addObjectPropertyValue( this.repositoryID, this.uri.toString(), aProperty.getURI().toString(), value.getURI().toString()); ontology.fireResourcePropertyValueChanged( this, aProperty, value, OConstants.OBJECT_PROPERTY_VALUE_ADDED_EVENT); }