|
|
|
|
|
Re: Writing ocl for Metaclass association [message #1430776 is a reply to message #1006337] |
Wed, 24 September 2014 20:10 |
Mahin Abbasipour Messages: 24 Registered: June 2013 |
Junior Member |
|
|
Dear Ed,
I also have a similar metamodel and want to specify the member ends for an association metaclass. I am using Papyrus to create my profile. I have used these two constraints:
1- self.base_association.memberEnd->exists(getStereotypeApplication(FR) <> null)
in this case, it gives an error for getSetreotypeApplication as an unresolved operation.
2- I also tried the one in the attached file:
self.base_Association.memberEnd.class->exists(extionsion_NFR <> null)
this one does not check when if one of the member ends is not NFR.
I have another question. In the Papyrus, I noticed that there, I can createassociations between the stereotypes. just like the metamodel of UML that between the metaclass Association and metaclass Property there is an association which specify propery as member end.
I was thinking in this case, we may do the similar thing to specify member ends. we can create association between metaclass Association "HasNFR" and metaclass Class "NFR", and also another association between "HasNFR" and "FR".
I am not sure if this is a correct idea. However, In this case, It didn't check the violation too.
Thanks,
Mahin
|
|
|
Re: Writing ocl for Metaclass association [message #1431165 is a reply to message #1430776] |
Thu, 25 September 2014 09:36 |
Ed Willink Messages: 7655 Registered: July 2009 |
Senior Member |
|
|
Hi
See comments and debugged example in
https://bugs.eclipse.org/bugs/show_bug.cgi?id=398333
Regards
Ed Willink
On 24/09/2014 21:10, Mahin Abbasipour wrote:
> Dear Ed,
>
> I also have a similar metamodel and want to specify the member ends for
> an association metaclass. I am using Papyrus to create my profile. I
> have used these two constraints:
> 1- self.base_association.memberEnd->exists(getStereotypeApplication(FR)
> <> null)
> in this case, it gives an error for getSetreotypeApplication as an
> unresolved operation.
>
> 2- I also tried the one in the attached file:
> self.base_Association.memberEnd.class->exists(extionsion_NFR <> null)
> this one does not check when if one of the member ends is not NFR.
>
> I have another question. In the Papyrus, I noticed that there, I can
> createassociations between the stereotypes. just like the metamodel of
> UML that between the metaclass Association and metaclass Property there
> is an association which specify propery as member end. I was thinking in
> this case, we may do the similar thing to specify member ends. we can
> create association between metaclass Association "HasNFR" and metaclass
> Class "NFR", and also another association between "HasNFR" and "FR". I
> am not sure if this is a correct idea. However, In this case, It didn't
> check the violation too.
>
> Thanks,
> Mahin
|
|
|
Powered by
FUDForum. Page generated in 0.02775 seconds