Customizing the metamodel : Keywords for USRPROPS : HETEROGENEOUS (ONEOF, LISTOF)
  
HETEROGENEOUS (ONEOF, LISTOF)
Enables a single property to refer to definitions of more than one type. (A normal list references definitions of a single type.) The HETEROGENEOUS keyword is used to modify either the ONEOF or the LISTOF keyword.
For example, when you click the Choices button of a class list, only class definitions are provided to choose from. If you click the Choices button of a heterogeneous list, you are provided with various types of definitions that you have specified in the heterogeneous list clause, such as class, process, entity, and so on.
Syntax for ONEOF
PROPERTY property-name { EDIT HeterogeneousOneOf [ class ] [ reset ] type-1 { [ , type-n ] } ... }
The reset clause clears any existing list of specified types for the property.
Syntax for LISTOF
PROPERTY property-name { EDIT HeterogeneousListOf [ class ] [ reset ] type-1 { [ , type-n ] } ... }
The reset clause clears any existing list of specified types for the property.
Restrictions
There are certain restrictions for a heterogeneous list property. It cannot also be one of the following (in other words, you cannot use any of the following keywords along with the HETEROGENEOUSLISTOF or HETEROGENEOUSONEOF keyword in the same property):
The property may not be KEY.
It may not contain a KEYED BY clause.
It may not be COMPLETE.
It may not have a FROM clause.
It may not have a DEFAULT.
It may not be INITIAL USER REQUIRED.
It may not have a restriction (REFERENCED IN or WHERE) clause.
It may not have the INIT_FROM_SYMBOL attribution.
No type name may be listed more than once.
Symbols cannot be referenced.
Adding values to the list
Although most of the time users are expected to drag in values into a heterogeneous list from the Select and Drag browser provided by clicking Choices, users may add new values to the heterogeneous list. However, to add new values into a heterogeneous list, you must enter the new values with their fully qualified name, in the following format:
ClassName:TypeName:FullyQualifiedName
Where:
ClassName is the System Architect encyclopedia class type – Diagram or Definition.
TypeName is the specific name of the Diagram or Definition type, such as Class (definition) or Use Case Step (definition).
Each part of the FullyQualifiedName is separated by periods, so, for example, a Use Case Step, which is keyed by its Use Case, which is keyed by its Package, would be entered as follows:
Definition:"Use Case Step":"package-name"."use-case-name"."use-case-step-name"
Example
Definition " Procedure"
{
PROPERTY "Underlying Procedure" { EDITHETEROGENEOUSLISTOF "Use Case", "Class", "Method", "Use Case Step" READONLY}
In the example above, the "Underlying Procedure" property of the "Procedure" definition can be populated with definitions of the type Use Case, Class, Method, and Use Case Step.
The user interface provided by the HETEROGENEOUSONEOF or HETEROGENEOUSLISTOF keyword displays a column that contains the name of each definition type, and the fully qualified name of the particular definition dragged into the list.
The key properties that qualify the name of a definition are provided in the user interface, separated from each other by periods (.). For example a Use Case Step is keyed to its containing Use Case, which is keyed by its containing Package. In the HETEROGENEOUSONEOF or HETEROGENEOSLISTOF field, a Use Case Step is represented by "package-name"."use-case-name"."use-case-step-name".
Note If there are embedded spaces in the name of any item, that item is enclosed in quotation marks. For example, in the picture above, the Use Case Step named "Approve Credit" is in the Use Case named Reservation_System, which belongs to the Package named "Reserve Room".
When you click Choices for a heterogeneous list, all called for types of Diagram, Symbol, or Definition are presented, with their type listed in brackets after their name.
The Properties window also presents values of a heterogeneous list. You may drag on the borders of the Properties rows or columns to get a full look at the values. Each value is preceded by its class type (Diagram, Symbol, or Definition), type name (that is, Use Case Step definition), and value itself.