Managing mapping declarations
A model-to-model transformation mapping
project contains a mapping model, 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. The Outline view displays
the mapping declarations in the mapping model, the input and output objects
in a mapping declaration, and the mapping rules in a mapping declaration.
- Creating mapping declarations in mapping models
You can create mapping declarations, also called maps, in a mapping model. When you author transformations, you can use a mapping declaration to specify how attributes in an input object correspond to attributes of an output object. - 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. - Refactoring mapping rules in mapping declarations
In an iterative development environment, changes might occur to the input or output metamodels that you specify in a mapping model of a model-to-model transformation. These changes might also affect the input and output objects that you specify in a mapping declaration, and might invalidate the corresponding mapping rules. If this situation occurs, you must refactor the mapping rules in the mapping declaration. - Showing and hiding features of input and output objects in mapping declarations
Feature filters determine which features, also called attributes, are shown in the input and output objects of the mapping declaration in the editing area. By specifying these filters, you can select the amount of information that is visible while you create a model-to-model transformation. There are three levels of feature filtering: basic, intermediate, and advanced. - Changing the processing order of mapping declarations in mapping projects
You can change the processing order of mapping declarations in a transformation. This feature is useful for specifying processing instructions for input objects that might be processed and consumed by a less specific mapping declaration. The Outline view lists the mapping declarations in the order that they are processed when you run the generated transformation code. - Inheriting mapping declarations in model-to-model transformation mapping projects
You can specify that a mapping declaration inherits the mapping rules in another mapping declaration. Inheriting mapping declarations encourages the reuse of mapping rules in other mapping declarations. A mapping declaration cannot inherit more than one inherited mapping declaration. - Interdependent mapping declarations for transformations that generate multiple objects from a single input object
You can author a transformation that creates multiple related objects from a single input object by using interdependent mapping declarations.
Feedback