opengeospatial / om-swg

10 stars 6 forks source link

Constraints not cascaded via realization? #147

Closed ilkkarinne closed 3 months ago

ilkkarinne commented 3 years ago

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.

ilkkarinne commented 3 years ago

I added the following constraints to the Abstract Observation core:AbstractObservation duplicating the ones in the interface, but changing "should" to "shall":

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.

KathiSchleidt commented 3 years ago

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:

cportele commented 3 years ago

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.

KathiSchleidt commented 2 years ago

Means that all constraints on the interfaces must also be duplicated in the core model

ilkkarinne commented 2 years ago

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.

KathiSchleidt commented 2 years ago

Adding the ObservableProperty-con

sgrellet commented 2 years ago

/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