Generalization Set in the profile level [message #489107] |
Thu, 01 October 2009 10:16  |
Eclipse User |
|
|
|
Hello,
I'm currently making a UML profile and I just tested some stereotypes on the UML metaclass Class. I just applied a few stereotypes on a class diagram and they're working fine. But, here comes the question:
The thing is that I can apply multiple stereotypes on the same class at the same time. For example, in a class diagram, I can apply both the stereotype <<Kind>> and <<Role>> to a class Person simultaneously, which is undesirable.
My idea to avoid this is by making a generalization set on the profile level that is {disjoint, complete}. In this example, let's say I have a stereotype <<Object>> that extends the UML metaclass Class, then I would like to make a generalization set with <<Kind>> and <<Role>> having as the general part <<Object>>. By doing this, I wouldn't be able to apply both <<Kind>> and <<Role>> in the class Person simultaneously.
So, is this feature (creating a generalization set in the profile level) available?
I'm not really familiar with the tools yet, but what I do in a Class Diagram level (*.umlclass file) to create a Generalization Set is:
1- I make one generalizaton, say B->A.
2- I make another generalization, the first target is the class C and the other target is the B->A generalization. That way, the graphical editor creates a generalization set with B->A and C->A.
I tried to do this in the profile level (*.umlprofile file) but it wasn't possible.
Thanks.
|
|
|
|
|
|
|
|
|
|
Re: Generalization Set in the profile level [message #625313 is a reply to message #625127] |
Mon, 16 November 2009 05:22  |
Eclipse User |
|
|
|
Actually, the focus of my last question was on OCL Constraints in the profile level, the default value thing was just an example I gave (and by the way is not working, but I can ask that question later).
Can you give me any short example, that I define some OCL constraint in a stereotype, (re)define the profile, make a class diagram, validate it and the editor shows me a warning related to the OCL Constraint I created in the profile level? I would be very satisfied to see a running example of OCL constraints working.
Thanks.
|
|
|
Powered by
FUDForum. Page generated in 0.08020 seconds