DSL relationships may have special rules to describe which elements can be connected. Use the following properties to define the relationships:
Property | Description |
---|---|
Types for Source | Specifies metaclasses or stereotypes allowed to connect as the source of the relationship. Types cannot conflict with UML permitted types for this relationship. Note The Types For Source property is intended for relationships only. The Customization Target property can be a relationship or a metaclass of a relationship. |
Types for Target | Specifies metaclasses or stereotypes allowed to connect as the target of the relationship. Types cannot conflict with UML permitted types for this relationship. Note The Types For Source property is intended for relationships only. The Customization Target property can be a relationship or a metaclass of a relationship. |
Note and Example
Subtypes of a specified end type are allowed only if the type is abstract (for example, the Classifier metaclass), otherwise only concrete types must be used. For example:
- If the value of the Types For Source property is the Classifier metaclass, then the Class, Component and other classifiers are allowed to connect as a source of a relationship.
- If the value of the Types For Source property is the Class metaclass, then the Class elements are allowed to connect as a source of a relationship.
- If the value of the Types For Source property is the «Block» DSL element, then the «Block» elements are allowed to connect as a source of a relationship.
In the following table, see properties that are used for customizing non-relationships:
Property | Description |
---|---|
Allowed Relationships | Specifies types of relationships that are allowed to be connected to the DSL element. |
Disallowed Relationships | Specifies types of relationships that are not allowed to be connected to the DSL element. |
Note and Example
Subtypes of specified allowed or disallowed relationships are analyzed only when a specified relationship type is an abstract metaclass (for example, DirectedRelationship). In other cases, only concrete types are checked.
If «Trace» is allowed, subtypes of trace «copy» and «verify» are allowed also.
If Association is allowed, Extension (a subtype) is not allowed, but simple stereotyped Associations are allowed. All DSL Associations are not allowed.
If Dependency is not allowed, simple stereotyped Dependencies like «delegate» are not allowed, but subtypes of Dependency, for example, Abstraction and DSL types based on Dependency are allowed.