Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Convert UML2 2.x to 1.x
Convert UML2 2.x to 1.x [message #477798] Wed, 08 October 2008 09:44 Go to next message
Joachim is currently offline JoachimFriend
Messages: 16
Registered: July 2009
Junior Member
Is it possible to convert an UML2 2.x file into an UML2 1.x file
programmatically?

I tried to apply
http://www.eclipse.org/modeling/mdt/uml2/docs/guides/UML2_2. 0_Migration_Guide/guide.html
the other way round, but failed.

The URI is e.g. still
"pathmap://UML_METAMODELS/UML.metamodel.uml#_0" instead of the expected
" pathmap://UML2_METAMODELS/UML2.metamodel.uml2#_m8qbA686EdiEh 75YJ_3n8g".

Also the stereotype application is also done in the new way, e.g.
<Myprofil:Mystereotype xmi:id="Component_9358733739517_2"
base_Component="Component_9358733739517"/>
instead of the old way
<eAnnotations xmi:id="_7Nrw4pRXEd2rI5P6VK0UBQ"
source="appliedStereotypes">
<contents xmi:type="Myprofil:Mystereotype"
xmi:id="_7Nrw45RXEd2rI5P6VK0UBQ"/>
</eAnnotations>
Re: Convert UML2 2.x to 1.x [message #477799 is a reply to message #477798] Wed, 08 October 2008 14:09 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Joachim,

Unfortunately, the backward migration is not implemented. It would
definitely be possible however. You could look at the
UML22UMLResourceHandler for some idea of the work involved ... the bulk of
the work would probably have to go into the preSave() of the resource
handler as opposed to the post load.
Keep in mind that the preSave and postLoad would not be entirely
symmetrical.

And yes, as you pointed out, the way the stereotypes and profiles were
serialized and used also changed.

Cheers,
- James.


"Joachim Back" <j.back@mid.de> wrote in message
news:gchvei$n3i$1@build.eclipse.org...
> Is it possible to convert an UML2 2.x file into an UML2 1.x file
> programmatically?
>
> I tried to apply
> http://www.eclipse.org/modeling/mdt/uml2/docs/guides/UML2_2. 0_Migration_Guide/guide.html
> the other way round, but failed.
>
> The URI is e.g. still
> "pathmap://UML_METAMODELS/UML.metamodel.uml#_0" instead of the expected
> " pathmap://UML2_METAMODELS/UML2.metamodel.uml2#_m8qbA686EdiEh 75YJ_3n8g".
>
> Also the stereotype application is also done in the new way, e.g.
> <Myprofil:Mystereotype xmi:id="Component_9358733739517_2"
> base_Component="Component_9358733739517"/>
> instead of the old way
> <eAnnotations xmi:id="_7Nrw4pRXEd2rI5P6VK0UBQ"
> source="appliedStereotypes">
> <contents xmi:type="Myprofil:Mystereotype"
> xmi:id="_7Nrw45RXEd2rI5P6VK0UBQ"/>
> </eAnnotations>
Re: Convert UML2 2.x to 1.x [message #626998 is a reply to message #477798] Wed, 08 October 2008 14:09 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Joachim,

Unfortunately, the backward migration is not implemented. It would
definitely be possible however. You could look at the
UML22UMLResourceHandler for some idea of the work involved ... the bulk of
the work would probably have to go into the preSave() of the resource
handler as opposed to the post load.
Keep in mind that the preSave and postLoad would not be entirely
symmetrical.

And yes, as you pointed out, the way the stereotypes and profiles were
serialized and used also changed.

Cheers,
- James.


"Joachim Back" <j.back@mid.de> wrote in message
news:gchvei$n3i$1@build.eclipse.org...
> Is it possible to convert an UML2 2.x file into an UML2 1.x file
> programmatically?
>
> I tried to apply
> http://www.eclipse.org/modeling/mdt/uml2/docs/guides/UML2_2. 0_Migration_Guide/guide.html
> the other way round, but failed.
>
> The URI is e.g. still
> "pathmap://UML_METAMODELS/UML.metamodel.uml#_0" instead of the expected
> " pathmap://UML2_METAMODELS/UML2.metamodel.uml2#_m8qbA686EdiEh 75YJ_3n8g".
>
> Also the stereotype application is also done in the new way, e.g.
> <Myprofil:Mystereotype xmi:id="Component_9358733739517_2"
> base_Component="Component_9358733739517"/>
> instead of the old way
> <eAnnotations xmi:id="_7Nrw4pRXEd2rI5P6VK0UBQ"
> source="appliedStereotypes">
> <contents xmi:type="Myprofil:Mystereotype"
> xmi:id="_7Nrw45RXEd2rI5P6VK0UBQ"/>
> </eAnnotations>
Previous Topic:Convert UML2 2.x to 1.x
Next Topic:[Announce] MDT UML2 3.0.0 I200810071911 is available
Goto Forum:
  


Current Time: Thu Apr 25 18:06:53 GMT 2024

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

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

Back to the top