Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » OCL Inheritance(Behavior of OCL when Stereotypes are hierarchical organized)
OCL Inheritance [message #1470904] Wed, 12 November 2014 18:26
Rishi Kanth is currently offline Rishi KanthFriend
Messages: 18
Registered: October 2014
Junior Member

I have created a UML Profile with the following structure :- two stereotypes A1 and A2, where A1 is extension of UML::Assocication and A2 is derived from A1(or A1 is a generalization of A2).

I have defined two OCL constraints OC1 (applied to A1) as
self.base_Association.endType.getAppliedStereotypes()->asBag().name = Bag{'ST1','ST1'}
self.base_Association.endType.getAppliedStereotypes()->asBag().name = Bag{'ST1','ST3'}

and OC2 (applied to A2) as
self.base_Association.endType.getAppliedStereotypes()->asBag().name = Bag{'ST2','ST3'}

(ST1, ST2 and St3 are stereotypes from another profile that extend UML:Class)

As A2 is derived from A1, how do the OCL constraints behave. From my experimenting and observation, A2 inherits the OCL from A1 and combines them as OC2 AND OC1.

Please correct me if I am wrong and also, if any other information on this topic.


Previous Topic:Replace the Element Icon (not the stereotype icon)
Next Topic:Change Message font to bold (using EdgeImpl)
Goto Forum:

Current Time: Tue Jul 07 16:15:06 GMT 2020

Powered by FUDForum. Page generated in 0.01439 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top