This use case presents a weaving model used to define a merge operation of a metamodel with geographical information
(an extension of GML) and a metamodel with statistical data into a graphical representation (SVG).
Consider the two metamodels Gs and Es from the figure below. Gs contains generic address information plus geographical
coordinates. The coordinates are created based on GML (Geographical Markup Language).
GML is a standard defined by W3C to represent geographical information. Es contains statistical information about the results of
elections, such as the number of voters, absentees, and percentage by candidate.
The goal is to merge these two metamodels into a graphical representation, to able to visualize the election results for every precinct,
as shown below. The format choosen is SVG (Scalable Vector Graphics).
This scenario has a particularity: the two input models and the output model conform to different metamodels.
This constraint does not enable to directly apply generic algorithms that assume that all models conform to the same metamodel.
Thus, we specify the merge operations through declarative weaving models. We illustrate below a weaving model between Gs, Es
and a target SVG metamodel. The selected link indicates that the attributes address and city should be concatenated
into a location attribute in the SVG metamodel. The SVG metamodel is extended to save the statistical data as well.
Weaving model loaded between GML, Election metamodel and SVG
The third panel is added without any modification on the plug-in code. This is possible because the UI adapts to support several
woven models, according to the weaving metamodel extensions. We show below the metamodel extension that supports three metamodels.
It has three different references (leftModel, rightModel, targetModel). Each reference corresponds to a different metamodel, and thus
a different panel is created.
Weaving metamodel extension with three woven panels
It is possible to have different implementations for each panel.
The panels are configured in the third page of the wizard (see below). The user must do the following steps:
select the reference (e.g., leftModel)
set up the panel implementation (AMW provides a couple of standard implementations based on threes).
set up the WModelRef. This element specifies the identification mechanism used in the woven models, for instance XMI IDs or
This use case demonstrates how weaving models are used to compare different
metamodels and to produce executable model transformations (we use two metamodels used to define embedded
software in the avionics industry).