ADL specification question

Hello,
I have an archetype with a complex object derived of CLUSTER with
"items cardinality matches {2..*; ordered}"
and those two items are also defined inside the complex object.
I understand the semantics of this definition that both items always have to appear together inside the cluster but the package of those two items may appear any number of times.
Is it allowed for instances of this archetype to have an uneven number of items > 2 inside this cluster, because that would still suffice the restriction of having 2..* children. Or do the instances always have to have both elements as a package that are defined as items in this cluster.
As I am not the author of the archetype I do not completely understand how the definition has to be interpreted.
Greetings
Georg

Hello Georg,

What (and how many) objects you have inside the items attribute?
Think the cardinality as the “vector” capacity, and inside you can put them in order (depending on their occurrences, they may even not appear at all)

Regards

The cardinality you mention only defines how many values the items attribute must have. In this case at least two.

Which values that are depends on the child elements/items and their occurrences attribute. If the occurrence of both of these is 1 exactly, they must both appear. If they both are 0.., it can be two or more of the first, two or more of the second, or at least one but possibly more of both. More options are possible. If occurrences is not defined, in this case I think it defaults to 0...

Regards,

Pieter Bos

As Pieter said, default occurrences (if not stated) are 0..*
So if the attribute is ordered, this means that if the object appears, it has to be in that specific order, in your case at0002, at0002…at0003, at0003
Cardinality tells you how many of these are valid, so minimum 2.
Take into account that occurrences of 0..* means that a given object may not appear, so in this case at0002, at0002 or at0003, at0003 are both valid

Regards

Hi Georg,

the other answers are right, but for reference you may want to read the relevant part of the ADL specification (ADL2 version; ADL1.4 version). The main thing to understand is that ‘cardinality’ applies to container attributes, and that ‘occurrences’ defines how often an object node may appear in the data.

The ADL2 version gives the clearer explanation, and the main semantics of cardinality and occurrences have not changed from one to the other.

  • thomas

I might just add that I am not aware of experienced clinical modellers ever making use of cardinality constraints. It has just proven too hard for people to get their head around, even when there are some potential uses e.g expressing an XSD-type ‘choice’.

There was also a known feature of the original Archetype Editor which (correctly) incremented the cardinality minimal constraint whenever an item within the container was made mandatory. However, it did not decrement the cardinality constraint if a child item was subsequently made non-mandatory. This is probably correct behaviour, since the intention of the modeller in this case cannot be known but it has meant that cardinality minimal constraints have appeared unintentionally.

Ian