Adding input objects and output objects to mapping declarations in mapping models

A model-to-model transformation mapping project can contain multiple mapping models, which can contain one or more mapping declarations. A mapping declaration, also called a map, specifies how to create or update an output object for a given input object. If you need to add an object type that is not available in the input or output metamodel that the map uses, you can add the appropriate UML profiles or Ecore metamodels to the scope of the map.

Before you begin

You must have a mapping model open. A mapping model has .mapping as a file name extension. The mapping model must contain at least one map.

Procedure

  1. Complete one of the following steps:
    • To add an input object to the map, click the Add an input object icon, which is the leftmost icon on the toolbar for the map that you are editing (This image shows the Add an input object icon located on the toolbar for the map that you are editing.).
    • To add an output object to the map, click the Add an output object icon, which is the second icon from the left on the toolbar for the map that you are editing (This image shows the Add an output object icon which is the second icon from the left on the toolbar for the map that you are editing.).
  2. Optional: To add a metamodel that contains an object that is not visible in the Element pane, click Add Model. In the Load Resource dialog box that opens, specify the appropriate metamodel.
  3. In the dialog box that opens, in the Element pane, select a metamodel object. The Element pane displays the elements in the metamodel or metamodels that you specify as the source or target for the mapping model.
    Tip: To filter the list of UML metamodel objects that are visible in the Element pane, click Filter Model. In the dialog box that opens, select a predefined filter that, when applied to an item in the Model column of this dialog box, restricts the list of metamodel objects that are visible in the Element pane. After you select a filter, click OK.
  4. Optional: If you specify the UML metamodel in step 2, in the Stereotype pane, you can select zero or more stereotypes to apply to the metamodel object that you select from the Element list. If a metamodel object has a stereotype defined in any of the input profiles, the stereotype appears in the Stereotype pane.
  5. Click OK.
  6. Click File > Save.

Feedback