Closed ilkkarinne closed 3 months ago
I added the following constraints to the Abstract Observation core:AbstractObservation duplicating the ones in the interface, but changing "should" to "shall":
at least one of either observer or host shall be provided
observingProcedure shall be suitable for the associated observedProperty
result type shall be suitable for the associated observedProperty
I think we used "should" in the interface constraints instead of "shall" because there are no corresponding statements are recommendations, not requirements in the spec.
To sync the UML constraints with the three new constraints in AbstractObservation, I propose we add requirement statements for them under clause 9.3. AbstractObservation.
Get Feedback from @cportele and @jetgeo if this (lack of) cascade of constraints from the interface to the realization is:
If it is a SW error, I'd like to:
My understanding of UML 2.5: An interface realization relationship does not "cascade" anything from the interface to the implementing classifier (not the attributes, not the constraints, etc). The relationship is mainly a statement that the implementing classifier conforms to the specification of the interface. UML does not specify how this is is evaluated and the mapping from the realization to the interface can be non-trivial and it does not have to be a 1-to-1 implementation. If the interface has a property p and a constraint on the property, evaluating the constraint requires knowledge how p is implemented in the classifier that realizes the interface, but that mapping/information is not part of the model. The realization relationship is mainly a declaration that the classifier conforms to the specification.
Means that all constraints on the interfaces must also be duplicated in the core model
As stated in the comment from Aug 25, the missing constraints (three) have been added to the UML class AbstractObservation. For consistency, these should also be added in the spec as -con
requirements IMHO.
Adding the ObservableProperty-con
/req/obs-core/Observation/observerhost-con /req/obs-core/Observation/observedProperty-con /req/obs-core/Observation/observingProcedure-con /req/obs-core/Observation/result-con are there
Looking at the ShapeChange -generated feature catalog of draft OMS model it seems that the constraints defined for an interface (Conceptual Observation schema:Observation) do not cascade to the classes that realize the interface (Abstract Observation core:AbstractObservation).
Perhaps we should duplicate the interface constraints in the realizing feature type classes just to make sure they stick.