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
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.
I think this PR should be related to the XSD ITS.