Excel Import is also capable of creating a class mapping. A class mapping describes how a schema class maps to a target element. A class mapping contains mapped properties between the schema class and the target element. You can see connectors linking mapped properties in a mapping diagram. When you use the Create Mapping wizard to create a class mapping, it will ask you to select a source, which is a schema class, and a target element, and further select which properties of the target element that you want to map with the properties of the schema class. The wizard selects all properties of a schema class by default.
The source element is a schema class while the target element can be a UML profile, a SysML profile, or a user model.
The result of imported elements varies according to the target element you have selected:
- If it is a meta model, the result will be the type of the meta class or the applied stereotype.
- If it is a user model, the result will be the instance specifications of a user model as shown in figure below.
The wizard allows you to choose all possible target elements for mapping in a treeview including UML2.5, SysML Profile, and a user model.
A successful mapping of a schema class and a target element (a UML profile, a SysML profile, or a user model) will result in a new Composite Structure diagram, which is called mapping diagram, created in the selected package in the Containment tree. A mapping diagram shows you all of the properties of a source schema class and a target element that you have selected for mapping. If a property's name in the source schema class is identical to the one in the target element, the plugin will map them automatically with connectors. Otherwise, use the connectors to connect the properties of the schema class and the target element to map them. You can remove the connectors or connect other mapped properties in the diagram mapping.
To map a property as a name of a target element, drag a connector from the property to the target element's box, see figure below.