Definition of DV_ENCAPSULATED is incorrect (SIZE missing)

Description

Abstract class DV_ENCAPSULATED has also an abstract SIZE property, but that is missing from .XSD and .BMM schemas (checked on 2014-09-20 on github).

DV_PARSABLE have that property effected (same way as DV_MULTIMEDIA), but it is not mentioned in its definition.

As for both classes (DV_MULTIMEDIA, DV_PARSABLE) this property is expressed as INTEGER, would be better if we just define it in the abstract class (DV_ENCAPSULATED) ?

Environment

None

Activity

Show:
Boštjan Lah
May 11, 2015, 7:36 AM

Although I agree with you - current way does make it more extensible. I.e. there might be a new kind of DV_ENCAPSULATED in the future without the size attribute.

Heath Frankel
May 12, 2015, 12:29 AM

The problem is that size is a function in DV_PARSABLE while it is an attribute in DV_MULTIMEDIA. DV_ENCPASULATED simply indicates it is abstract without indicating that it is an attribute or function. Not sure if this is possible in Eiffel but it certainly is not possible in c#. From XML schema perspective, it only makes sense to declare it in DV_MULTIMEDIA where it has been declared as an attribute and can be specified without any data to be able to derive it. DV_PARSABLE always has a value so it can always be derived.

I suggest the specification is updated to remove size from DV_ENCAPSULATED since the definition is different in the sub-classes.

Diego Bosca
May 12, 2015, 8:13 AM

+1 to Heath comment. Personally I'm not a big fan of being able to define constraints over function results at all (I think ideally they should be assertions), but probably it is a different issue.

Pablo Pazos
June 18, 2015, 5:52 PM

+1 on removing the abstract size from DV_ENCAPSULATED.

Thomas Beale
October 27, 2015, 2:24 PM
Edited

I guess we can take it out of DV_ENCAPSULATED. This is due to the fact that current OO mainstream languages aren't strong enough to represent these basic semantics! But we need to keep openEHR practical... we need 2 more on the acceptance list to create a CR.

Reporter

Sebastian Iancu

Labels

Affects versions

Priority

Minor
Configure