Thomas Beale schreef:
Bert Verhees wrote:
Since both Archetype-editors share the same GUI concept, my question applies to both.
Where do I edit the "existence-constraint"
Al I can see is a possiblity to edit the occurences constraint.
Maybe it happens implicitely by choosing some option.
Can someone please explain?
The Ocean editor does do this impicitly in a few places, but probably not as much as it should. The difference between existence, cardinality, occurrences is confusing to some people; recently I gave this explanation:
~~~~~~~~~~~
* existence (mandatory/optional) and cardinality (number of
objects allowed in a container) are meta-properties of
attributes (i.e. any attribute or relationship of a type). That
is why you see them included on attribute nodes in ADL, not on
object nodes. Mandatory/optional says: this attribute must have
a value, or can have a value, or must have no value; if the
attribute is of a container type, then mandatory/optional is
indicating whether the container exists. Then, cardinality
indicates how many things can / must be in the container.
Containers are only indicated in ADL if that attribute is a
container in the reference model
* occurrences is a meta-property of an object node, and says: how
many times an instance conforming to this part of the archetype
definition can/must occur. If the object is within a container
attribute, there might be multiple occurrences, e.g. as with
most Events inside History. If it is not, there still may be
multiple sibling objects below the containing attribute - in ADL
this means they are alternatives. Usually they all have
occurrences = 0..1 on them, and the enclosing attribute has
existence = 0..1 or 1..1
So - these two sets of choices are on attribute nodes and object nodes respectively. Now, for single-valued nodes with only one alternative, the existence and occurrences have to match, but this is only a special case.
0..0 in occurrences means "this object cannot occur here", which is non-sensical in an archetype, but perfectly sensible in a template - it really means: "this object only, among any alternatives (single-valued attribute) or other objects (in a container attribute), cannot be used when this template is operational". Whereas 0..0 on an attribute means "this attribute cannot have any value (all alternatives, contained object possibilities are removed) when this template is operational". This sometimes seems confusing when the archetype has only a single-valued attribute with one possible object defined (and this does occur fairly often obviously) - what has to happen in such situations is that the occurrences and existence can both be definable, but setting either one automatically sets the other to match.
~~~~~~~~~
Are you finding you need to set existence more carefully than the editor currently allows?
I am sorry to say that there is a need. Because I do not design the archetypes I use, I help thinking, but I do not design them.
And it is the case that sometimes properties are mandatory with a cardinality of 0..1, in fact it is really often.
The archetypes which are being designed are derived from information hidden in the Dutch Edifact-messages (called Medeur) and in the dutch HL7 messages (DMIM called: Prica)
regards
Bert