Re: OCL Question: Containing Package



Date view Thread view Subject view Author view Attachment view

From: Adrian CARCU (adi1302@yahoo.com)
Date: Sat 13 Sep 2003 - 14:25:47 BST


Hello,

Yes, it can be expressed. One way to do it is below.

package Foundation::Core
context Class
inv: self.name = 'C' implies 
     (self.namespace.oclIsKindOf(Package) and self.namespace.name = 'P')
endpackage

Best regards,
Adrian

--- Edward Sattari <edw_s@mail.com> wrote:
> Hello,
> 
> Is it possible to express the follwing consatraint by OCL? (How?)
> 
> If a Class name is 'C', it must be in a package named 'P'.
> 
> Thanks,
> Edward



__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

Date view Thread view Subject view Author view Attachment view