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.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.
To add input or output objects to a map in a mapping model:
- 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 (
).
- 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 (
).
- 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.
- 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.
- 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.
- Click OK.
- Click .