OCL constraints and stereotypes



OCL constraints and stereotypes

From: Rastislav Mlčoch ^lt;jordano@pobox.sk>
Date: Mon 27 Mar 2006 - 13:18:47 BST
Message-ID: <bb68027d7c484b61aee3dea60a7bf141@pobox.sk>
Hi,

when I create a profile and stereotypes, where is the appropriate place for constraints: on stereotype, or on the metaclass I extend by that stereotype? If it's on the metaclass, how do I reffer to that particular stereotype when context is Class? I found in several articles, that they were using function isStereotyped, but I can't find it in new OCL specification. Is it now: context Class inv: self.extension.ownedEnd.type = "myStereotype" ? Or can I use oclIsTypeOf() function, to determine stereotypes? It would seem reasonable from the metamodel.
And my last question, when I want to allow only certain type of relationship, for example aggregation, between classes I extend (now I mean metaclass Class), how should i do it? 

Thanks,
Rasto
Received on Mon Mar 27 13:19:44 2006