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
- 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.
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.
- 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 .