SDA SE Wiki

Software Engineering for Smart Data Analytics & Smart Data Analytics for Software Engineering

User Tools

Site Tools


Assignment 10: Model Driven Architecture II

Due at Thursday, January 21th, 23:59
You find the sample solutions in the SVN:

https://svn.iai.uni-bonn.de/repos/IAI_Software/se/atsc2009ws/samplesolutions/

Project: A10T25_26_Model_Transformation_Solution

Make sure you are using the latest version of the Topcased Editor from Nov. 30th 20091).
If necessary update your Eclipse instance via Help→Check for Updates.
We have to take this last deadline really strict!

Task 25: Model-2-Model Transformation

6 points

Check out the project A10T25_26_Model_Transformation from your SVN repository.

Your task is to partly transform a PIM model src/model/HotelDomain2) to an EJB3-based PSM, see the profile in src/model/ejb3.umlprofile. We will use a slightly modified variant which contains the plug-in point CreditCardInstitute. Your starting point is the src/m2m/archetypesToejb3.ext extension file.

Your mapping should include the following:

  • map party/thing/place, role, moment_interval and mi_detail to Entity bean.
  • map plugin_point to a Session bean, ignore the needed local/remote interfaces here.
  • Set the type of all Properties to UMLPrimitiveTypes::Integer3) for all Class Properties without a defined type4)
  • Verify your modifications with the check files src/validation/ConstraintsPackage.chk5) and src/validation/ConstraintsMembers.chk6)

The following extensions are helpful for the task:

  • allOwnedElements(): all sub elements
  • typeSelect(Stereotype/UML Class): selects elements of a list by their (stereo)type
  • the profile helper extensions in m2m/profileUtils.ext

General hints:

  • Concatinate extension calls with call → call2
  • The last element in an extension is returned if a return type is given
  • Have a look at the abstract syntax in the file src/model/HotelDomain.uml7) to understand the model's structure

Task 26: Code Generation

4 points

Generate Java classes for your model. Concentrate on the classes, annotations, properties and associations. You might omit the generation of methods. The extension getAssociatedClasses(Class) is - again - helpful here.

Use template/JavaSource.xpt as starting point.

1)
Check the version of the plugin via Help→About→Installation Details
2)
based on the archetypes domain
3)
use the given extension getIntegerType(Package) to retrieve the Integer Type
4)
this does not make sense for all properties here, but we want to keep the example simple
5)
only checks the Package
6)
checks all contained elements
7)
double click the file to open it in the UML Model Editor
teaching/lectures/atsc/2009/assignment_10.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2023