Information Technology Reference
In-Depth Information
Workflow components. ToruntheoAWmodeltransformation
engine, we have to define a workflow. It controls which steps
(loading models, checking and transforming them, generating
code, etc.) the engine executes. To transform models into
models, Xtend can be invoked within a workflow. An example
of a workflow configuration of the Xtend component is
presented in Listing 3.11. In line 4 and line 8, the source
and target metamodels are registered in the execution context.
Thus, the types from the metamodels are added to the
set of types available in the type system. In line 11, the
root transformation rule, create Table class2ER (Class
myClass) is invoked and its result is left in the outputSlot
(line 12).
1
2
3
4
5
6
7
8
9
10
11
12
13
<component class= " oaw.xtend.XtendComponent " >
<metaModel class= " oaw.type.emf.EmfMetaModel " >
<metaModelFile value= " classMetamodel. ecore " />
</metamodel>
<metaModel class= " oaw.type.emf.EmfMetaModel " >
<metaModelFile value= " erMetamodel. ecore " />
</metaModel>
<invoke value= " my:: path :: class2ER(sourceModel) " />
<outputSlot value= " transformedErModel " />
</component>
Listing 3.11. Example of a workflow configuration of the Xtend
Aspect-oriented programming in Xtend. Aspect-oriented
programming (AOP) [KIC 97] is a technique that proposes
to modularize concerns that crosscut a system decomposition
and scatter across multiple design elements. An aspect is a
pointcut and an advice. If a pointcut matches some points in
the code of an application then the advice is inserted. The
process of connecting some aspects on a base code is the
weaving process. In the oAW context, aspect orientation is
 
Search WWH ::




Custom Search