Type and Stereotype Mapping
Base types and stereotypes
A type mapping associates a Codebeamer item type with a UML base type, such as Class, optionally qualified by one or more stereotypes. Stereotypes extend the base type and their fully qualified names use profile::stereotype. These names can be copied from the element’s stereotype properties in EA as shown in Mapping configuration.
Multiple stereotypes are comma-separated. An element must have all listed stereotypes applied to be matched during import/export. For more details, please refer to the Stereotype Filters.
Generic and specific mappings
Since stereotypes are used to specialize basic UML types, you can also use the same principle for generic and specialized mapping rules. For example, a SysML Block is a UML Class with the stereotype SysML1.4::block.
| Base type | Stereotype filter | Exported elements |
|---|---|---|
Class |
None | All classes, including blocks and all other classes with any stereotype |
Class |
SysML1.4::block | Only classes carrying the block stereotype |
Class |
" " | Refers to the "Is Empty Checkbox". All classes with empty stereotype (=no stereotype set). |
Import and export uses the first matching rule. To control the matching for generic fallback mappings, place specific mappings before generic fallback mappings. To export only classes without stereotypes, select Is Empty. Leaving the filter unspecified does not impose that restriction.
Enterprise Architect specific types
For some element types, Enterprise Architect displays them a base type, but they use a base type + an EA-specific stereotype. For example, an EA Requirement is represented as:
- Base type:
Class - Stereotype:
EA Specifics 1.0::requirement
In this case, EA Specifics 1.0 is the profile and requirement is the stereotype. The mapping UI provides Requirement as a convenient type selection: Codebeamer type selections
SysML1.4 versus SysML1.5
EA displays SysML 1.5 in its UI but retains SysML1.4 as the internal profile identifier stored in the EA database. Therefore, use SysML1.4::block, not SysML1.5::block. The displayed technology version and stored profile identifier differ as it is documented here: EA Documentation on metamodels
Custom stereotypes and MDG Technologies
In order to use custom MDG Technologies and profiles for import and export using LemonTree.Connect, the profile or MDG must be imported into your EA model. For example, a custom stereotype extending Class could be mapped as Class + MyProfile::MyComponent. Use the profile name for the fully qualified name, which may differ from the MDG Technology’s display name. Since EA version 15, stereotypes must have a definition and arbitrary free-text names are insufficient.
Stereotype properties
To use properties (tagged values) defined by stereotypes. create an attribute mapping, select (Tagged Value) as the EA attribute, and enter:
profile::stereotype::tag
For example, MyProfile::MyComponent::Version addresses the Version property defined by MyComponent stereotype from the MyProfile profile. Use the property’s defining profile and stereotype, preserving their exact names. Custom profile properties require fully qualified names in LemonTree.Connect since version 3.2.0.: Mapping custom profile properties