<HTML>
<HEAD>
<!-- Created with AOLpress/2.0 -->
<TITLE>Part 25 Clause 5.5 proposal for aggregation data types</TITLE>
</HEAD>
<BODY>
<H2>
5.5 Mappings for EXPRESS aggregation data types
</H2>
<P>
The EXPRESS language supports aggregation data types for which there is no
equivalent in UML. For this reason what appear as similarly structured
aggregation data types in EXPRESS may appear as one of four different structures
in UML:
<UL>
<LI>
some EXPRESS aggregation data types result in UML Associations;
<LI>
some EXPRESS aggregation data types result in a multivalued UML Attribute;
<LI>
some EXPRESS aggregation data types result in one or more UML Classes
representing the EXPRESS aggregation data type and a UML Aggregation;
<LI>
some EXPRESS aggregation data types result in pne or more UML Classes
representing the EXPRESS aggregation data type and a multivalued UML Attribute.
</UL>
<P>
In EXPRESS, relationships are defined using EXPRESS attributes, not using
a separate construct as in UML with an Association. In EXPRESS, multiple
relationships are defined by the domain of the EXPRESS attribute being an
EXPRESS aggregation data type. In UML, Associations between UML Classifiers
are a mathematical set allowing no duplicates. For these reasons, the only
EXPRESS attributes of type aggregation data type that are mapped into UML
Associations are EXPRESS single-dimensional set and list of unique aggregation
data types that refer to EXPRESS named data types. Other EXPRESS aggregation
data types are mapped into UML Attributes or UML Classes and therefore the
fact that they may represent a relationship in the EXPRESS schema is lost.
<P>
In UML ordering can be applied to UML Associations but not multivalued UML
Attributes. However, UML Associations are mathematical sets. EXPRESS non-unique
list and array data types are mapped into UML Associations. In these cases,
the UML constraint of uniqueness and the EXPRESS constraint of non-uniqueness
are in conflict.
<H2>
5.5.1 Mappings for EXPRESS unique single-dimensional aggregation data types
into UML Associations
</H2>
<P>
For each EXPRESS single-dimensional set or list of unique data type that
is the domain of an attribute of an EXPRESS ENTITY in the context of the
mapping and whose base type is an EXPRESS named type, a UML Association shall
appear in the UDS. The UML ModelElement.name of that UML Association shall
be the concatenation of name of the type of EXPRESS aggregate (Set or List
with the first letter upper case and other letters lower case) with the string
"-of-", and that string with the name of the base type of the EXPRESS aggregation
data type. The UML Association shall have two UML AssociationEnds, one
referencing the UML representation of the EXPRESS entity type with the aggregate
data type as an attribute domain and other referencing the UML representation
of the EXPRESS named type. In the case that the EXPRESS aggregation data
type is a list of unique data type, the UML AssocationEnd referencing the
UML representation of the EXPRESS named data type shall have its
AssociationEnd.ordering set to "ordered". The multiplicity of the UML Association
shall be set to reflect the cardinality of the set or list of unique data
type. The cardinality on inverse end of the UML Association shall be "*".
<H2>
5.5.2 Mappings for EXPRESS single-dimensional bag data types into UML Attributes
</H2>
<P>
For each EXPRESS single-dimensional bag data type that is the domain of an
attribute of an EXPRESS ENTITY in the context of the mapping and whose base
type is an EXPRESS named type, a UML Attribute shall appear in the UDS. The
UML ModelElement.name of that UML Attribute shall be the name of the EXPRESS
attribute. The multiplicity of the UML Attribute shall be set to reflect
the cardinality of the bag data type.
<H2>
5.5.3 Mappings for EXPRESS aggregation data types into UML Classes
</H2>
<P>
For each of the following cases:<BR>
<UL>
<LI>
an EXPRESS aggregation data type that is the underlying type of an EXPRESS
defined type in the context of the mapping;
<LI>
an EXPRESS multi-dimensional aggregation data type that is the domain of
an attribute of an EXPRESS ENTITY in the context of the mapping;
<LI>
an EXPRESS single-dimensional set, list or bag data type that is the domain
of an attribute of an EXPRESS ENTITY in the context of the mapping whose
base type of the is not a named type;
<LI>
an EXPRESS single-dimensional, non-unique list data type that is the domain
of an attribute of an EXPRESS ENTITY in the context of the mapping whose
base type of the is a named type;
<LI>
an EXPRESS single-dimensional array data type that is the domain of an attribute
of an EXPRESS ENTITY in the context of the mapping;
</UL>
<P>
one or more UML Classes shall appear in the UDS representing the EXPRESS
aggregate data type.
<P>
If the EXPRESS aggregate base type is not an EXPRESS aggregate data type,
it is represented by a single UML Class and the UML ModelElement.name of
that UML Class shall be the concatenation of name of the type of aggregate
(Set, Bag, List or Array with the first letter upper case and other letters
lower case) with the string "-of-", and that string with the name of the
base type of the EXPRESS aggregate.
<P>
If the EXPRESS aggregate base type is an EXPRESS aggregate data type (or
any further nesting of EXPRESS aggregates of aggregates), it is represented
by the following:
<UL>
<LI>
a UML Class representing the most nested of the EXPRESS aggregates of aggregates
for which the base type is not another EXPRESS aggregate. The UML
ModelElement.name of that UML Class shall be the concatenation of name of
the type of EXPRESS aggregate (Set, Bag, List or Array with the first letter
upper case and other letters lower case) with the string "-of-", and that
string with the name of the base type of the EXPRESS aggregate;
<LI>
a UML Class representing each level of nesting of the EXPRESS aggregate of
aggregates. The UML ModelElement.name of each of these UML Classes shall
be the concatenation of the name of the type of the EXPRESS aggregate (Set,
Bag, List or Array with the first letter in upper case and other letters
in lower case) with the string "-of-", and that string with the name of the
base type of the EXPRESS aggregate.
</UL>
<P>
For each pair of UML Classes representing an EXPRESS aggregate data type
(or single level of nesting in a multiply nested aggregate) one of the following
shall appear in the UDS:
<UL>
<LI>
a UML shared aggregation association;
<LI>
a multivalued UML Attribute.
</UL>
<P>
For each EXPRESS aggregation data type that is a bag data type, a UML multivalued
attribute shall appear in the UML Class representing the EXPRESS aggregation
referencing the UML Class representing the underlying type of the EXPRESS
aggregation data type. The multiplicity of the UML Attribute shall be set
to reflect the cardinality of the EXPRESS bag data type.
<P>
For each EXPRESS aggregation data type that is not a bag data type, a UML
shared aggregation association shall appear in the UDS with the UML
Association.name being set to be "aggregation_of". The UML Association shall
have exactly two connection UML AssociationEnds with the UML
AssociationEnd.aggregation referencing the UML Class representing the EXPRESS
aggregate data type being set to "aggregate" and the UML
AssociationEnd.aggregation referring to the UML Class representing the base
type of the EXPRESS aggregate being set to "none".
<P>
In the case that the EXPRESS aggregation data type is an array type or a
list type, the UML AssocationEnd referencing the UML representation of the
base type of the EXPRESS aggregate data type shall have its
AssociationEnd.ordering set to "ordered".
</BODY></HTML>