Re: [mdr-users] Copy one Model form a Instance to another Instance

"Pieter Van Gorp" <[email protected]> Fri, 12 May 2006 17:50:21 +0200
Newsgroups gmane.comp.java.netbeans.modules.mdr.user
Message-ID <[email protected]>
> 3. Copy/Clone the second UML Model and instert it into the first instance=
.
I guess this should be realized by explicitly adding the outer
UmlModel element from the second model as an ownedElement of a
UmlPackage in your first model (you could just use the outer UmlModel
element of the first model since that's a UmlPackage too).  That
should only take about 10 lines of JMI code.

See
http://galaxy.andromda.org/docs-3.1/jmi-uml1.4/org/omg/uml/modelmanagement/=
Model.html
http://galaxy.andromda.org/docs-3.1/jmi-uml1.4/org/omg/uml/modelmanagement/=
UmlPackage.html

The XMI loading/saving shouldn't be a problem either.

Kind regards,
Pieter Van Gorp
University of Antwerp
http://www.fots.ua.ac.be/~pvgorp/