Add invariants to DV_COUNT and DV_QUANTITY

Description

Just realized we are not setting any invariants for these two classes.

IMO we should add:

DV_COUNT.magnitude != null
DV_QUANTITY.units != null
DV_QUANTITY.magnitude != null

Environment

None

Activity

Show:
Thomas Beale
June 23, 2016, 3:38 PM

The RM spec doesn't tend to include invariants for the existence of primitive type fields that are non-reference types, i.e. Boolean, Integer, Real, Character etc, because in programming languages, these fields can't be Void/ null, they always have a value. String fields and all other types pretty much are reference fields.

It's only in XML and serialised formats that these non-reference fields could possibly be absent.

Currently we don't have a clear policy on how to indicate that within the RM, or even if we should.

Thomas Beale
April 25, 2018, 4:42 PM

I think this PR should be related to the XSD ITS.

Reporter

Pablo Pazos

Labels

Priority

Major
Configure