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:

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.

Check the version of the plugin via Help→About→Installation Details
based on the archetypes domain
use the given extension getIntegerType(Package) to retrieve the Integer Type
this does not make sense for all properties here, but we want to keep the example simple
only checks the Package
checks all contained elements
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, © 2024