Creating a mapping model

You can create a mapping model to specify an alternate name for each file or folder that a transformation generates. A mapping model is separate from the source model and contains an artifact for each source model element that corresponds to a generated file or folder. Each artifact has the same name as the element it represents. You can specify an alternate name for each source element by changing the artifact’s file name property. Changing the file name property of an artifact that represents a generated folder such as UML package element, affects all resources that are generated into that folder. After a mapping model is created, you can apply it the next time that you run a transformation on your model.

To create a mapping model:
  1. In the Model Explorer view, select model elements.
  2. Click Modeling > Transform > Configure Transformations.
  3. In the Configure Transformations window, in the Transformations/Configurations list, complete one of the following steps:
    • To edit an existing transformation configuration, select a transformation configuration.
    • To create a new transformation configuration, select a transformation; then click New, in the Name box, type a name.
  4. Click the Mapping tab.
  5. On the Mapping page, click Only create mapping model (no transformation).
  6. Specify a name and the current workspace and project.
  7. Click Run. The generated mapping model is displayed in the Model Explorer view in the current project.
  8. In the Model Explorer view, in the mapping model, select an artifact.
  9. In the Properties view, click the General tab.
  10. On the Properties page, in the File Name field, type a name.
  11. Right-click the model (.emx) file; then click Save.
  12. Repeat steps 8 through 11 as necessary for each artifact. The mapping model you created is available when you run a transformation on your model.

Parent topic: Specifying alternate file names for the files that a transformation generates

Related concepts
Mapping models

Terms of use | Feedback
(C) Copyright IBM Corporation 2004, 2005. All Rights Reserved.