Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » UML2Ecore convertion
UML2Ecore convertion [message #481581] Fri, 21 August 2009 16:08 Go to next message
Chokri Mraidha is currently offline Chokri MraidhaFriend
Messages: 28
Registered: July 2009
Junior Member
Hello,

I would like to call the UML2Ecore converter programmatically. I have
written some code calling the UMLUtil.convertToEcore() method.
The convertion is done but the generated NsURI are not correct which makes
impossible the creation of a genmodel file from the generated ecore files.
The generated uml.ecore file has a Ns URI = http:///uml.ecore instead of
http://www.eclipse.org/uml2/2.1.0/UML
Likewise for the ecore.ecore file, Ns URI = http:///ecore.ecore instead of
http://www.eclipse.org/emf/2002/Ecore

Any idea on why is this happening?
Is there any code snipet on how to call properly the UML2Ecore converter
programmatically?


Thank you in advance for your help.

Chokri
Re: UML2Ecore convertion [message #485160 is a reply to message #481581] Thu, 10 September 2009 16:33 Go to previous messageGo to next message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Chokri,

The namespace URI is controlled via a stereotype application; to arrive
at the desired URI, apply the Ecore profile to your model, apply the
EPackage stereotype to the package, set a value for the 'nsURI' tag, and
ensure that the option to process Ecore tagged values is enabled when
doing the conversion.

Kenn

Chokri Mraidha wrote:
> Hello,
>
> I would like to call the UML2Ecore converter programmatically. I have
> written some code calling the UMLUtil.convertToEcore() method.
> The convertion is done but the generated NsURI are not correct which makes
> impossible the creation of a genmodel file from the generated ecore files.
> The generated uml.ecore file has a Ns URI = http:///uml.ecore instead of
> http://www.eclipse.org/uml2/2.1.0/UML
> Likewise for the ecore.ecore file, Ns URI = http:///ecore.ecore instead of
> http://www.eclipse.org/emf/2002/Ecore
>
> Any idea on why is this happening?
> Is there any code snipet on how to call properly the UML2Ecore converter
> programmatically?
>
>
> Thank you in advance for your help.
>
> Chokri
>
>
>
>
Re: UML2Ecore convertion [message #485308 is a reply to message #485160] Fri, 11 September 2009 10:00 Go to previous message
Chokri Mraidha is currently offline Chokri MraidhaFriend
Messages: 28
Registered: July 2009
Junior Member
Kenn,

Thank you very much, it's working. The option to process Ecore tagged values
was not enabled.

Chokri

"Kenn Hussey" <Kenn.Hussey@gmail.com> a
Re: UML2Ecore convertion [message #627932 is a reply to message #481581] Thu, 10 September 2009 16:33 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Chokri,

The namespace URI is controlled via a stereotype application; to arrive
at the desired URI, apply the Ecore profile to your model, apply the
EPackage stereotype to the package, set a value for the 'nsURI' tag, and
ensure that the option to process Ecore tagged values is enabled when
doing the conversion.

Kenn

Chokri Mraidha wrote:
> Hello,
>
> I would like to call the UML2Ecore converter programmatically. I have
> written some code calling the UMLUtil.convertToEcore() method.
> The convertion is done but the generated NsURI are not correct which makes
> impossible the creation of a genmodel file from the generated ecore files.
> The generated uml.ecore file has a Ns URI = http:///uml.ecore instead of
> http://www.eclipse.org/uml2/2.1.0/UML
> Likewise for the ecore.ecore file, Ns URI = http:///ecore.ecore instead of
> http://www.eclipse.org/emf/2002/Ecore
>
> Any idea on why is this happening?
> Is there any code snipet on how to call properly the UML2Ecore converter
> programmatically?
>
>
> Thank you in advance for your help.
>
> Chokri
>
>
>
>
Re: UML2Ecore convertion [message #627934 is a reply to message #485160] Fri, 11 September 2009 10:00 Go to previous message
Chokri Mraidha is currently offline Chokri MraidhaFriend
Messages: 28
Registered: July 2009
Junior Member
Kenn,

Thank you very much, it's working. The option to process Ecore tagged values
was not enabled.

Chokri

"Kenn Hussey" <Kenn.Hussey@gmail.com> a
Previous Topic:Problems with DerivedUnion during deserialization
Next Topic:DerivedSubsetEList won't be generated
Goto Forum:
  


Current Time: Fri Apr 26 01:00:23 GMT 2024

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

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

Back to the top