Additional Operation for uml::Classifier (meta model) [message #652457] |
Fri, 04 February 2011 01:22 |
Kirsten M. Z. Messages: 132 Registered: July 2010 |
Senior Member |
|
|
Hi @all,
I am wondering, if it is possible to add operations to meta classes of the UML meta model by using the "middleweight extension" approach (cp. Customizing UML).
The document mentions that it is possible to add operations using this approach. I am wondering, if this statement refers to operations of new (maybe derived) meta classes only, or if it is possible to refine existing meta classes. In my case, I want to add an operation to uml::Classifier. Maybe, the UML genmodel offers a "refinement trick" (like subsetting, union, etc.) for doing this.
This would be neat, because I am using different model transformation languages (namely, Acceleo and QVTo) which are able to call such operations. By adding methods to UML meta classes, I am able to "share functionality" among my model transformations.
Thanks!
[Updated on: Sat, 05 February 2011 10:22] Report message to a moderator
|
|
|
|
|
|
Re: Additional Operation for uml::Classifier (meta model) [message #652959 is a reply to message #652786] |
Mon, 07 February 2011 18:32 |
Kirsten M. Z. Messages: 132 Registered: July 2010 |
Senior Member |
|
|
Well, I know. However, I don't want to change the original meta model. I want to extend the UML meta model using an external meta model.
I already accomplished to use package merges now (so merging the UML meta model with my meta model which defines a new operation for uml::Classifier). However, this does not fit expectations completely. First, the workflow for merging packages is not trivial. Second, the resulting meta model does not seem to have all features of the original UML meta model (seems that many operation implementations are gone). I know that there are solutions for such problems... but I want to avoid working for weeks in order to get a stable workflow. All in all, package merges are not a good solution for me.
Currently, I am trying another approach. After some work, I already got a working example and maybe I should proceed with that approach:
I am using a profile and stereotypes!
Thereby, a stereotype for uml::Classifier owns the operations I need. Of course, the operation must use "base_Classifier" instead of "self" as context. And another important fact is that this stereotype must be applied for all according elements of the model (at least elements which shall provide enhanced functionality).
I am happy that this approach seems to work, because recently I read that some transformation engines cannot deal with operations defined for stereotypes.
|
|
|
Powered by
FUDForum. Page generated in 0.03304 seconds