Re: incomplete package definition
"Fu,Bin" <[email protected]> Mon, 1 Dec 2003 16:42:57 +0100
| Newsgroups | gmane.comp.java.netbeans.modules.mdr.devel |
|---|---|
| Message-ID | <001801c3b821$cbb38fc0$05dd4d0a@Bin> |
Hi, Martin, thanks for your answer and guide. the xml file I sent to you is the UML 2.0 specification converted from a format with MOF 2.0 + XMI 2.0. In the orginal file, there are a lot of deeply nested packages, and many of these nested packages are imported and clustered by the other packages (or nested packages), which is not allowed according to MOF 1.4 as you described. I think, it might be one of differences between MOF 1.4 and MOF 2.0. In spite of this, I want to know, if there will be negative influences for process of xmi with MDR and later use of JMI with the current package structure. Because I think the current package structure is reasonable according to specification of UML 2.0 (I don't really want to change it), although its nested packages have conflicts with defintion of MOF 1.4. Regards Fu, Bin ----- Original Message ----- From: "Martin Matula" <[email protected]> To: <[email protected]> Sent: Friday, November 28, 2003 7:06 PM Subject: Re: [mdr-dev] incomplete package definition > Hi, > thanks for submitting the issue. The test case identified a bug in MDR - > references between two different nested packages don't work. I will try > to fix it ASAP. > But I have a comment to your usage of MOF. First, I think you are > overusing package nesting in your metamodel. Please note the following > text from the Package Nesting section (2.3.6.2) of MOF 1.4 specification: > <MOF_SPEC> > A nested Package is a component of its enclosing Package. Since, in > general, the model elements in a nested Package can be inextricably tied > to its context, there are some significant restrictions on how nested > Packages can be composed. In particular, > - a nested Package may not generalize or be generalized by other Packages. > - a nested Package may not be imported or clustered by other Packages. > Nested Packages are not directly instantiable. No factory objects or > operations are defined for nested Package instances. An M1 level > instance of a nested Package can only exist in conjunction with an > instance of its containing Package. Conceptually, a nested Package > instance is a component of an instance of its containing Package. > Note – The main effect of nesting one Package inside another is to > partition the concepts and the namespace of the outer Package. Nesting > is not a mechanism for reuse. Indeed when a Package is nested, the > options for reusing its contents are curtailed. > </MOF_SPEC> > As you can see, it is not possible to instantiate nested packages. I > would recommend to design most of the packages as outermost and simulate > nesting using clustering. The correct Java package structure when > generating JMI interfaces can be defined using javax.jmi.packagePrefix tags. > Regards, > Martin > > >