Make PROPORTION_KIND an enumeration and remove the inheritance DV_PROPORTION -> PROPORTION_KIND

Description

UML accepts the enumeration stereotype, and PROPORTION_KIND is basically an enumeration.

The only need I can see of having an inheritance from DV_PROPORTION from PROPORTION_KIND is for the valid_proportion_kind method.

If DV_PROPORTION.type is a PROPORTION_KIND, and it is an enumeration, there is no need of the valid_proportion_kind method, since no invalid values can be set on DV_PROPORTION.type if it is an enumeration instead of Integer as it is right now.

Pros:
1. one less method
2. remove dual inheritance
3. only valid values are allowed by the model itself by construction, no need of checking

Activity

Show:

Pablo Pazos August 25, 2016 at 3:01 AM

IMO this change won't require a lot of refactoring on current implementations, and some of those might already be implemented with enums. Either way it would be useful to have other's input on this.

Thomas Beale August 16, 2016 at 9:37 AM

I agree with this in principle, but we need to know if implementers don't mind changing to the 'proper UML' way of doing it, given that it has been specified like this for a long time. Or maybe we just change it anyway, and include a description of how to do it the old way?

Details

Reporter

Components

Affects versions

Priority

Created August 14, 2016 at 5:46 PM
Updated June 26, 2022 at 10:17 AM