Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Re: No primitive types in .ecore files (party.javalang.String, ...)
Re: No primitive types in .ecore files (party.javalang.String, ...) [message #472749] Tue, 24 April 2007 14:52 Go to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Gonzalo,

I think this is more a question for the UML2 newsgroup, since that
project implements the UML importer and they can describe the various
stereotypes that are supported for mapping to Ecore better than me.
I've added that newsgroup to the "to" list so we can continue to use
this thread.


Gonzalo wrote:
> Hello! I'm searching for some help with the Omondo Eclipse UML to ecore
> mapping (.uml -> .ecore). I hope you can help me:
>
> Once I've created and saved an UML class diagram, Omondo Eclipse UML creates
> a .uml file (i.e. party.uml).
> I'm using this file (party.uml) to create a new Empty EMF Project, then
> create a new EMF Model, and then ,with party.genmodel, generate the Model
> Code. Then, I plan to persist my classes with Teneo and Hibernate.
>
> The problem I have is the types EMF creates inside the .ecore file (i.e.
> party.javalang.String, party.javautil.Date), because these types are
> different from the primitive types (String, Date, ...). If I could work with
> the primitives from the begining, maybe i could get rid of this problem.
>
> I would very much appreciate to get your input to this problem.
>
> Thanks in advance.
>
> With regards,
>
> Gonzalo Castro
>
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: No primitive types in .ecore files (party.javalang.String, ...) [message #472750 is a reply to message #472749] Tue, 24 April 2007 21:14 Go to previous messageGo to next message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Gonzalo,

I'm not sure how Omondo handles these types but opensource UML implements a
XMLPrimitiveTypes.library.uml and UMLPrimitiveTypes.library.uml that should
be used.

You can experiment with the opensource editor by typing your properties with
primitive types coming from these libraries and then generating your .ecore
model.

That should work.

You can alternatively stereotype your primitive types with <eDataType>
(from the ecore profile) and specify the instance class name explicitly.

Regards,

- James.



"Ed Merks" <merks@ca.ibm.com> wrote in message
news:f0l5jg$7v8$2@build.eclipse.org...
> Gonzalo,
>
> I think this is more a question for the UML2 newsgroup, since that
> project implements the UML importer and they can describe the various
> stereotypes that are supported for mapping to Ecore better than me.
> I've added that newsgroup to the "to" list so we can continue to use
> this thread.
>
>
> Gonzalo wrote:
> > Hello! I'm searching for some help with the Omondo Eclipse UML to ecore
> > mapping (.uml -> .ecore). I hope you can help me:
> >
> > Once I've created and saved an UML class diagram, Omondo Eclipse UML
creates
> > a .uml file (i.e. party.uml).
> > I'm using this file (party.uml) to create a new Empty EMF Project, then
> > create a new EMF Model, and then ,with party.genmodel, generate the
Model
> > Code. Then, I plan to persist my classes with Teneo and Hibernate.
> >
> > The problem I have is the types EMF creates inside the .ecore file (i.e.
> > party.javalang.String, party.javautil.Date), because these types are
> > different from the primitive types (String, Date, ...). If I could work
with
> > the primitives from the begining, maybe i could get rid of this problem.
> >
> > I would very much appreciate to get your input to this problem.
> >
> > Thanks in advance.
> >
> > With regards,
> >
> > Gonzalo Castro
> >
> >
> >
Re: No primitive types in .ecore files (party.javalang.String, ...) [message #472751 is a reply to message #472749] Tue, 24 April 2007 21:31 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: pradeep_tamma.yahoo.com

I also have the Date problem mentioned below.

Also, when I import uml model to ecore, classes are being created for
DataTypes in the uml model as well. Is there a way to avoid that?

The importer doesn't seem to differentiate between Class and Datatype.

Thanks
Pradeep

"Ed Merks" <merks@ca.ibm.com> wrote in message
news:f0l5jg$7v8$2@build.eclipse.org...
> Gonzalo,
>
> I think this is more a question for the UML2 newsgroup, since that project
> implements the UML importer and they can describe the various stereotypes
> that are supported for mapping to Ecore better than me. I've added that
> newsgroup to the "to" list so we can continue to use this thread.
>
>
> Gonzalo wrote:
>> Hello! I'm searching for some help with the Omondo Eclipse UML to ecore
>> mapping (.uml -> .ecore). I hope you can help me:
>>
>> Once I've created and saved an UML class diagram, Omondo Eclipse UML
>> creates a .uml file (i.e. party.uml).
>> I'm using this file (party.uml) to create a new Empty EMF Project, then
>> create a new EMF Model, and then ,with party.genmodel, generate the Model
>> Code. Then, I plan to persist my classes with Teneo and Hibernate.
>>
>> The problem I have is the types EMF creates inside the .ecore file (i.e.
>> party.javalang.String, party.javautil.Date), because these types are
>> different from the primitive types (String, Date, ...). If I could work
>> with the primitives from the begining, maybe i could get rid of this
>> problem.
>>
>> I would very much appreciate to get your input to this problem.
>>
>> Thanks in advance.
>>
>> With regards,
>>
>> Gonzalo Castro
>>
>>
Re: No primitive types in .ecore files (party.javalang.String, ...) [message #472794 is a reply to message #472751] Tue, 24 April 2007 22:07 Go to previous messageGo to next message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Pradeep,

some comments below ...

- James.

"Pradeep Tamma" <pradeep_tamma@yahoo.com> wrote in message
news:f0lt0b$e1n$1@build.eclipse.org...
> I also have the Date problem mentioned below.
>
.. see previous posting for some suggestions ...

> Also, when I import uml model to ecore, classes are being created for
> DataTypes in the uml model as well. Is there a way to avoid that?

If you define the Datatypes in your .uml model they will be created in the
..ecore model.

>
> The importer doesn't seem to differentiate between Class and Datatype.

... not sure what you mean by "differentiate between"?

>
> Thanks
> Pradeep
>
> "Ed Merks" <merks@ca.ibm.com> wrote in message
> news:f0l5jg$7v8$2@build.eclipse.org...
> > Gonzalo,
> >
> > I think this is more a question for the UML2 newsgroup, since that
project
> > implements the UML importer and they can describe the various
stereotypes
> > that are supported for mapping to Ecore better than me. I've added that
> > newsgroup to the "to" list so we can continue to use this thread.
> >
> >
> > Gonzalo wrote:
> >> Hello! I'm searching for some help with the Omondo Eclipse UML to
ecore
> >> mapping (.uml -> .ecore). I hope you can help me:
> >>
> >> Once I've created and saved an UML class diagram, Omondo Eclipse UML
> >> creates a .uml file (i.e. party.uml).
> >> I'm using this file (party.uml) to create a new Empty EMF Project, then
> >> create a new EMF Model, and then ,with party.genmodel, generate the
Model
> >> Code. Then, I plan to persist my classes with Teneo and Hibernate.
> >>
> >> The problem I have is the types EMF creates inside the .ecore file
(i.e.
> >> party.javalang.String, party.javautil.Date), because these types are
> >> different from the primitive types (String, Date, ...). If I could work
> >> with the primitives from the begining, maybe i could get rid of this
> >> problem.
> >>
> >> I would very much appreciate to get your input to this problem.
> >>
> >> Thanks in advance.
> >>
> >> With regards,
> >>
> >> Gonzalo Castro
> >>
> >>
>
>
Re: No primitive types in .ecore files (party.javalang.String, ...) [message #472795 is a reply to message #472794] Tue, 24 April 2007 23:22 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: pradeep_tamma.yahoo.com

Please see the attachment. I am using uml2tools in eclipse. I created some
Datatypes, some primitive types and some classes using the graphical editor.

Now in the .uml file you will see those primitive types, DataTypes and
Classes. But when I import the same as ecore, there is no difference between
DataTypes and classes.
Also for the primitive type, java.util.Date in uml file changed to
javautilDate.

When I generate classes using the genmodel I get classes for Datatypes as
well. As expected javautilDate gives an error.

Please let me know if I am not clear.

Thanks
Pradeep

There
"James Bruck" <jbruck@ca.ibm.com> wrote in message
news:f0lv3g$7ks$2@build.eclipse.org...
> Hi Pradeep,
>
> some comments below ...
>
> - James.
>
> "Pradeep Tamma" <pradeep_tamma@yahoo.com> wrote in message
> news:f0lt0b$e1n$1@build.eclipse.org...
>> I also have the Date problem mentioned below.
>>
> .. see previous posting for some suggestions ...
>
>> Also, when I import uml model to ecore, classes are being created for
>> DataTypes in the uml model as well. Is there a way to avoid that?
>
> If you define the Datatypes in your .uml model they will be created in the
> .ecore model.
>
>>
>> The importer doesn't seem to differentiate between Class and Datatype.
>
> .. not sure what you mean by "differentiate between"?
>
>>
>> Thanks
>> Pradeep
>>
>> "Ed Merks" <merks@ca.ibm.com> wrote in message
>> news:f0l5jg$7v8$2@build.eclipse.org...
>> > Gonzalo,
>> >
>> > I think this is more a question for the UML2 newsgroup, since that
> project
>> > implements the UML importer and they can describe the various
> stereotypes
>> > that are supported for mapping to Ecore better than me. I've added
>> > that
>> > newsgroup to the "to" list so we can continue to use this thread.
>> >
>> >
>> > Gonzalo wrote:
>> >> Hello! I'm searching for some help with the Omondo Eclipse UML to
> ecore
>> >> mapping (.uml -> .ecore). I hope you can help me:
>> >>
>> >> Once I've created and saved an UML class diagram, Omondo Eclipse UML
>> >> creates a .uml file (i.e. party.uml).
>> >> I'm using this file (party.uml) to create a new Empty EMF Project,
>> >> then
>> >> create a new EMF Model, and then ,with party.genmodel, generate the
> Model
>> >> Code. Then, I plan to persist my classes with Teneo and Hibernate.
>> >>
>> >> The problem I have is the types EMF creates inside the .ecore file
> (i.e.
>> >> party.javalang.String, party.javautil.Date), because these types are
>> >> different from the primitive types (String, Date, ...). If I could
>> >> work
>> >> with the primitives from the begining, maybe i could get rid of this
>> >> problem.
>> >>
>> >> I would very much appreciate to get your input to this problem.
>> >>
>> >> Thanks in advance.
>> >>
>> >> With regards,
>> >>
>> >> Gonzalo Castro
>> >>
>> >>
>>
>>
>
>


  • Attachment: uml.PNG
    (Size: 29.77KB, Downloaded 178 times)
Re: No primitive types in .ecore files (party.javalang.String, ...) [message #472797 is a reply to message #472795] Wed, 25 April 2007 13:20 Go to previous messageGo to next message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Pradeep,

UML Primitive types map to ecore DataTypes.
UML Data types map to ecore Classes.

Ecore does not make distinctions between UML primitive types and UML data
types.

The name of your java.util.Date is not an appropriate ecore metatype name so
the periods were removed. I think what you really want to do is create a
type called "Date", then use a <<eDataType>> stereotype and set the instance
class name to java.util.Date. Or use the primitive types libraries as
mentioned previously.

- James.



"Pradeep Tamma" <pradeep_tamma@yahoo.com> wrote in message
news:f0m3f0$acg$1@build.eclipse.org...
> Please see the attachment. I am using uml2tools in eclipse. I created some
> Datatypes, some primitive types and some classes using the graphical
editor.
>
> Now in the .uml file you will see those primitive types, DataTypes and
> Classes. But when I import the same as ecore, there is no difference
between
> DataTypes and classes.
> Also for the primitive type, java.util.Date in uml file changed to
> javautilDate.
>
> When I generate classes using the genmodel I get classes for Datatypes as
> well. As expected javautilDate gives an error.
>
> Please let me know if I am not clear.
>
> Thanks
> Pradeep
>
> There
> "James Bruck" <jbruck@ca.ibm.com> wrote in message
> news:f0lv3g$7ks$2@build.eclipse.org...
> > Hi Pradeep,
> >
> > some comments below ...
> >
> > - James.
> >
> > "Pradeep Tamma" <pradeep_tamma@yahoo.com> wrote in message
> > news:f0lt0b$e1n$1@build.eclipse.org...
> >> I also have the Date problem mentioned below.
> >>
> > .. see previous posting for some suggestions ...
> >
> >> Also, when I import uml model to ecore, classes are being created for
> >> DataTypes in the uml model as well. Is there a way to avoid that?
> >
> > If you define the Datatypes in your .uml model they will be created in
the
> > .ecore model.
> >
> >>
> >> The importer doesn't seem to differentiate between Class and Datatype.
> >
> > .. not sure what you mean by "differentiate between"?
> >
> >>
> >> Thanks
> >> Pradeep
> >>
> >> "Ed Merks" <merks@ca.ibm.com> wrote in message
> >> news:f0l5jg$7v8$2@build.eclipse.org...
> >> > Gonzalo,
> >> >
> >> > I think this is more a question for the UML2 newsgroup, since that
> > project
> >> > implements the UML importer and they can describe the various
> > stereotypes
> >> > that are supported for mapping to Ecore better than me. I've added
> >> > that
> >> > newsgroup to the "to" list so we can continue to use this thread.
> >> >
> >> >
> >> > Gonzalo wrote:
> >> >> Hello! I'm searching for some help with the Omondo Eclipse UML to
> > ecore
> >> >> mapping (.uml -> .ecore). I hope you can help me:
> >> >>
> >> >> Once I've created and saved an UML class diagram, Omondo Eclipse UML
> >> >> creates a .uml file (i.e. party.uml).
> >> >> I'm using this file (party.uml) to create a new Empty EMF Project,
> >> >> then
> >> >> create a new EMF Model, and then ,with party.genmodel, generate the
> > Model
> >> >> Code. Then, I plan to persist my classes with Teneo and Hibernate.
> >> >>
> >> >> The problem I have is the types EMF creates inside the .ecore file
> > (i.e.
> >> >> party.javalang.String, party.javautil.Date), because these types are
> >> >> different from the primitive types (String, Date, ...). If I could
> >> >> work
> >> >> with the primitives from the begining, maybe i could get rid of this
> >> >> problem.
> >> >>
> >> >> I would very much appreciate to get your input to this problem.
> >> >>
> >> >> Thanks in advance.
> >> >>
> >> >> With regards,
> >> >>
> >> >> Gonzalo Castro
> >> >>
> >> >>
> >>
> >>
> >
> >
>
>
>
Re: No primitive types in .ecore files (party.javalang.String, ...) [message #472804 is a reply to message #472797] Wed, 25 April 2007 21:45 Go to previous messageGo to next message
Pradeep is currently offline PradeepFriend
Messages: 61
Registered: July 2009
Member
Hi James,

I assume by type you mean an actual Class. But I don't see an option to
specify a stereotype in the diagram editor. How do i specify it?

Thanks
Pradeep

"James Bruck" <jbruck@ca.ibm.com> wrote in message
news:f0nkjb$ap8$2@build.eclipse.org...
> Hi Pradeep,
>
> UML Primitive types map to ecore DataTypes.
> UML Data types map to ecore Classes.
>
> Ecore does not make distinctions between UML primitive types and UML data
> types.
>
> The name of your java.util.Date is not an appropriate ecore metatype name
> so
> the periods were removed. I think what you really want to do is create a
> type called "Date", then use a <<eDataType>> stereotype and set the
> instance
> class name to java.util.Date. Or use the primitive types libraries as
> mentioned previously.
>
> - James.
>
>
>
> "Pradeep Tamma" <pradeep_tamma@yahoo.com> wrote in message
> news:f0m3f0$acg$1@build.eclipse.org...
>> Please see the attachment. I am using uml2tools in eclipse. I created
>> some
>> Datatypes, some primitive types and some classes using the graphical
> editor.
>>
>> Now in the .uml file you will see those primitive types, DataTypes and
>> Classes. But when I import the same as ecore, there is no difference
> between
>> DataTypes and classes.
>> Also for the primitive type, java.util.Date in uml file changed to
>> javautilDate.
>>
>> When I generate classes using the genmodel I get classes for Datatypes as
>> well. As expected javautilDate gives an error.
>>
>> Please let me know if I am not clear.
>>
>> Thanks
>> Pradeep
>>
>> There
>> "James Bruck" <jbruck@ca.ibm.com> wrote in message
>> news:f0lv3g$7ks$2@build.eclipse.org...
>> > Hi Pradeep,
>> >
>> > some comments below ...
>> >
>> > - James.
>> >
>> > "Pradeep Tamma" <pradeep_tamma@yahoo.com> wrote in message
>> > news:f0lt0b$e1n$1@build.eclipse.org...
>> >> I also have the Date problem mentioned below.
>> >>
>> > .. see previous posting for some suggestions ...
>> >
>> >> Also, when I import uml model to ecore, classes are being created for
>> >> DataTypes in the uml model as well. Is there a way to avoid that?
>> >
>> > If you define the Datatypes in your .uml model they will be created in
> the
>> > .ecore model.
>> >
>> >>
>> >> The importer doesn't seem to differentiate between Class and Datatype.
>> >
>> > .. not sure what you mean by "differentiate between"?
>> >
>> >>
>> >> Thanks
>> >> Pradeep
>> >>
>> >> "Ed Merks" <merks@ca.ibm.com> wrote in message
>> >> news:f0l5jg$7v8$2@build.eclipse.org...
>> >> > Gonzalo,
>> >> >
>> >> > I think this is more a question for the UML2 newsgroup, since that
>> > project
>> >> > implements the UML importer and they can describe the various
>> > stereotypes
>> >> > that are supported for mapping to Ecore better than me. I've added
>> >> > that
>> >> > newsgroup to the "to" list so we can continue to use this thread.
>> >> >
>> >> >
>> >> > Gonzalo wrote:
>> >> >> Hello! I'm searching for some help with the Omondo Eclipse UML to
>> > ecore
>> >> >> mapping (.uml -> .ecore). I hope you can help me:
>> >> >>
>> >> >> Once I've created and saved an UML class diagram, Omondo Eclipse
>> >> >> UML
>> >> >> creates a .uml file (i.e. party.uml).
>> >> >> I'm using this file (party.uml) to create a new Empty EMF Project,
>> >> >> then
>> >> >> create a new EMF Model, and then ,with party.genmodel, generate the
>> > Model
>> >> >> Code. Then, I plan to persist my classes with Teneo and Hibernate.
>> >> >>
>> >> >> The problem I have is the types EMF creates inside the .ecore file
>> > (i.e.
>> >> >> party.javalang.String, party.javautil.Date), because these types
>> >> >> are
>> >> >> different from the primitive types (String, Date, ...). If I could
>> >> >> work
>> >> >> with the primitives from the begining, maybe i could get rid of
>> >> >> this
>> >> >> problem.
>> >> >>
>> >> >> I would very much appreciate to get your input to this problem.
>> >> >>
>> >> >> Thanks in advance.
>> >> >>
>> >> >> With regards,
>> >> >>
>> >> >> Gonzalo Castro
>> >> >>
>> >> >>
>> >>
>> >>
>> >
>> >
>>
>>
>>
>
>
Re: No primitive types in .ecore files (party.javalang.String, ...) [message #472805 is a reply to message #472804] Thu, 26 April 2007 09:19 Go to previous messageGo to next message
Tas Frangoullides is currently offline Tas FrangoullidesFriend
Messages: 195
Registered: July 2009
Senior Member
Pradeep,

My guess is James meant for you to create a UML Primitive Type as this is
where you can apply the <<eDataType>> stereotype.

Incase you don't have the profile here are the steps.

First you need to apply the ecore profile: Click on your model and use
Package->Apply Profile..
Then you need to apply the stereotype: Click on the primitive type and use
Element->Apply Stereotype..

The additional properties provided by the stereotype will appear in the
properties view under the "EData Type" category
Hope that helps.

This thread has reminded me of a something I've been meaning to ask... I'll
pop it in another thread.

Tas.

"Pradeep" <pradeep@live.com> wrote in message
news:f0oi6l$77t$1@build.eclipse.org...
> Hi James,
>
> I assume by type you mean an actual Class. But I don't see an option to
> specify a stereotype in the diagram editor. How do i specify it?
>
> Thanks
> Pradeep
>
> "James Bruck" <jbruck@ca.ibm.com> wrote in message
> news:f0nkjb$ap8$2@build.eclipse.org...
>> Hi Pradeep,
>>
>> UML Primitive types map to ecore DataTypes.
>> UML Data types map to ecore Classes.
>>
>> Ecore does not make distinctions between UML primitive types and UML data
>> types.
>>
>> The name of your java.util.Date is not an appropriate ecore metatype name
>> so
>> the periods were removed. I think what you really want to do is create
>> a
>> type called "Date", then use a <<eDataType>> stereotype and set the
>> instance
>> class name to java.util.Date. Or use the primitive types libraries as
>> mentioned previously.
>>
>> - James.
>>
>>
>>
>> "Pradeep Tamma" <pradeep_tamma@yahoo.com> wrote in message
>> news:f0m3f0$acg$1@build.eclipse.org...
>>> Please see the attachment. I am using uml2tools in eclipse. I created
>>> some
>>> Datatypes, some primitive types and some classes using the graphical
>> editor.
>>>
>>> Now in the .uml file you will see those primitive types, DataTypes and
>>> Classes. But when I import the same as ecore, there is no difference
>> between
>>> DataTypes and classes.
>>> Also for the primitive type, java.util.Date in uml file changed to
>>> javautilDate.
>>>
>>> When I generate classes using the genmodel I get classes for Datatypes
>>> as
>>> well. As expected javautilDate gives an error.
>>>
>>> Please let me know if I am not clear.
>>>
>>> Thanks
>>> Pradeep
>>>
>>> There
>>> "James Bruck" <jbruck@ca.ibm.com> wrote in message
>>> news:f0lv3g$7ks$2@build.eclipse.org...
>>> > Hi Pradeep,
>>> >
>>> > some comments below ...
>>> >
>>> > - James.
>>> >
>>> > "Pradeep Tamma" <pradeep_tamma@yahoo.com> wrote in message
>>> > news:f0lt0b$e1n$1@build.eclipse.org...
>>> >> I also have the Date problem mentioned below.
>>> >>
>>> > .. see previous posting for some suggestions ...
>>> >
>>> >> Also, when I import uml model to ecore, classes are being created for
>>> >> DataTypes in the uml model as well. Is there a way to avoid that?
>>> >
>>> > If you define the Datatypes in your .uml model they will be created in
>> the
>>> > .ecore model.
>>> >
>>> >>
>>> >> The importer doesn't seem to differentiate between Class and
>>> >> Datatype.
>>> >
>>> > .. not sure what you mean by "differentiate between"?
>>> >
>>> >>
>>> >> Thanks
>>> >> Pradeep
>>> >>
>>> >> "Ed Merks" <merks@ca.ibm.com> wrote in message
>>> >> news:f0l5jg$7v8$2@build.eclipse.org...
>>> >> > Gonzalo,
>>> >> >
>>> >> > I think this is more a question for the UML2 newsgroup, since that
>>> > project
>>> >> > implements the UML importer and they can describe the various
>>> > stereotypes
>>> >> > that are supported for mapping to Ecore better than me. I've added
>>> >> > that
>>> >> > newsgroup to the "to" list so we can continue to use this thread.
>>> >> >
>>> >> >
>>> >> > Gonzalo wrote:
>>> >> >> Hello! I'm searching for some help with the Omondo Eclipse UML to
>>> > ecore
>>> >> >> mapping (.uml -> .ecore). I hope you can help me:
>>> >> >>
>>> >> >> Once I've created and saved an UML class diagram, Omondo Eclipse
>>> >> >> UML
>>> >> >> creates a .uml file (i.e. party.uml).
>>> >> >> I'm using this file (party.uml) to create a new Empty EMF Project,
>>> >> >> then
>>> >> >> create a new EMF Model, and then ,with party.genmodel, generate
>>> >> >> the
>>> > Model
>>> >> >> Code. Then, I plan to persist my classes with Teneo and Hibernate.
>>> >> >>
>>> >> >> The problem I have is the types EMF creates inside the .ecore file
>>> > (i.e.
>>> >> >> party.javalang.String, party.javautil.Date), because these types
>>> >> >> are
>>> >> >> different from the primitive types (String, Date, ...). If I could
>>> >> >> work
>>> >> >> with the primitives from the begining, maybe i could get rid of
>>> >> >> this
>>> >> >> problem.
>>> >> >>
>>> >> >> I would very much appreciate to get your input to this problem.
>>> >> >>
>>> >> >> Thanks in advance.
>>> >> >>
>>> >> >> With regards,
>>> >> >>
>>> >> >> Gonzalo Castro
>>> >> >>
>>> >> >>
>>> >>
>>> >>
>>> >
>>> >
>>>
>>>
>>>
>>
>>
>
>
Re: No primitive types in .ecore files (party.javalang.String, ...) [message #472816 is a reply to message #472805] Thu, 26 April 2007 19:42 Go to previous message
Pradeep is currently offline PradeepFriend
Messages: 61
Registered: July 2009
Member
Hi Tas,

Thanks a lot. That really helped.

Pradeep

"Tas Frangoullides" <tas.frangoullides@barclaysglobal.com> wrote in message
news:f0pqrv$kqd$1@build.eclipse.org...
> Pradeep,
>
> My guess is James meant for you to create a UML Primitive Type as this is
> where you can apply the <<eDataType>> stereotype.
>
> Incase you don't have the profile here are the steps.
>
> First you need to apply the ecore profile: Click on your model and use
> Package->Apply Profile..
> Then you need to apply the stereotype: Click on the primitive type and use
> Element->Apply Stereotype..
>
> The additional properties provided by the stereotype will appear in the
> properties view under the "EData Type" category
> Hope that helps.
>
> This thread has reminded me of a something I've been meaning to ask...
> I'll pop it in another thread.
>
> Tas.
>
> "Pradeep" <pradeep@live.com> wrote in message
> news:f0oi6l$77t$1@build.eclipse.org...
>> Hi James,
>>
>> I assume by type you mean an actual Class. But I don't see an option to
>> specify a stereotype in the diagram editor. How do i specify it?
>>
>> Thanks
>> Pradeep
>>
>> "James Bruck" <jbruck@ca.ibm.com> wrote in message
>> news:f0nkjb$ap8$2@build.eclipse.org...
>>> Hi Pradeep,
>>>
>>> UML Primitive types map to ecore DataTypes.
>>> UML Data types map to ecore Classes.
>>>
>>> Ecore does not make distinctions between UML primitive types and UML
>>> data
>>> types.
>>>
>>> The name of your java.util.Date is not an appropriate ecore metatype
>>> name so
>>> the periods were removed. I think what you really want to do is create
>>> a
>>> type called "Date", then use a <<eDataType>> stereotype and set the
>>> instance
>>> class name to java.util.Date. Or use the primitive types libraries as
>>> mentioned previously.
>>>
>>> - James.
>>>
>>>
>>>
>>> "Pradeep Tamma" <pradeep_tamma@yahoo.com> wrote in message
>>> news:f0m3f0$acg$1@build.eclipse.org...
>>>> Please see the attachment. I am using uml2tools in eclipse. I created
>>>> some
>>>> Datatypes, some primitive types and some classes using the graphical
>>> editor.
>>>>
>>>> Now in the .uml file you will see those primitive types, DataTypes and
>>>> Classes. But when I import the same as ecore, there is no difference
>>> between
>>>> DataTypes and classes.
>>>> Also for the primitive type, java.util.Date in uml file changed to
>>>> javautilDate.
>>>>
>>>> When I generate classes using the genmodel I get classes for Datatypes
>>>> as
>>>> well. As expected javautilDate gives an error.
>>>>
>>>> Please let me know if I am not clear.
>>>>
>>>> Thanks
>>>> Pradeep
>>>>
>>>> There
>>>> "James Bruck" <jbruck@ca.ibm.com> wrote in message
>>>> news:f0lv3g$7ks$2@build.eclipse.org...
>>>> > Hi Pradeep,
>>>> >
>>>> > some comments below ...
>>>> >
>>>> > - James.
>>>> >
>>>> > "Pradeep Tamma" <pradeep_tamma@yahoo.com> wrote in message
>>>> > news:f0lt0b$e1n$1@build.eclipse.org...
>>>> >> I also have the Date problem mentioned below.
>>>> >>
>>>> > .. see previous posting for some suggestions ...
>>>> >
>>>> >> Also, when I import uml model to ecore, classes are being created
>>>> >> for
>>>> >> DataTypes in the uml model as well. Is there a way to avoid that?
>>>> >
>>>> > If you define the Datatypes in your .uml model they will be created
>>>> > in
>>> the
>>>> > .ecore model.
>>>> >
>>>> >>
>>>> >> The importer doesn't seem to differentiate between Class and
>>>> >> Datatype.
>>>> >
>>>> > .. not sure what you mean by "differentiate between"?
>>>> >
>>>> >>
>>>> >> Thanks
>>>> >> Pradeep
>>>> >>
>>>> >> "Ed Merks" <merks@ca.ibm.com> wrote in message
>>>> >> news:f0l5jg$7v8$2@build.eclipse.org...
>>>> >> > Gonzalo,
>>>> >> >
>>>> >> > I think this is more a question for the UML2 newsgroup, since that
>>>> > project
>>>> >> > implements the UML importer and they can describe the various
>>>> > stereotypes
>>>> >> > that are supported for mapping to Ecore better than me. I've
>>>> >> > added
>>>> >> > that
>>>> >> > newsgroup to the "to" list so we can continue to use this thread.
>>>> >> >
>>>> >> >
>>>> >> > Gonzalo wrote:
>>>> >> >> Hello! I'm searching for some help with the Omondo Eclipse UML
>>>> >> >> to
>>>> > ecore
>>>> >> >> mapping (.uml -> .ecore). I hope you can help me:
>>>> >> >>
>>>> >> >> Once I've created and saved an UML class diagram, Omondo Eclipse
>>>> >> >> UML
>>>> >> >> creates a .uml file (i.e. party.uml).
>>>> >> >> I'm using this file (party.uml) to create a new Empty EMF
>>>> >> >> Project,
>>>> >> >> then
>>>> >> >> create a new EMF Model, and then ,with party.genmodel, generate
>>>> >> >> the
>>>> > Model
>>>> >> >> Code. Then, I plan to persist my classes with Teneo and
>>>> >> >> Hibernate.
>>>> >> >>
>>>> >> >> The problem I have is the types EMF creates inside the .ecore
>>>> >> >> file
>>>> > (i.e.
>>>> >> >> party.javalang.String, party.javautil.Date), because these types
>>>> >> >> are
>>>> >> >> different from the primitive types (String, Date, ...). If I
>>>> >> >> could
>>>> >> >> work
>>>> >> >> with the primitives from the begining, maybe i could get rid of
>>>> >> >> this
>>>> >> >> problem.
>>>> >> >>
>>>> >> >> I would very much appreciate to get your input to this problem.
>>>> >> >>
>>>> >> >> Thanks in advance.
>>>> >> >>
>>>> >> >> With regards,
>>>> >> >>
>>>> >> >> Gonzalo Castro
>>>> >> >>
>>>> >> >>
>>>> >>
>>>> >>
>>>> >
>>>> >
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Re: No primitive types in .ecore files (party.javalang.String, ...) [message #611045 is a reply to message #472749] Tue, 24 April 2007 21:14 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Gonzalo,

I'm not sure how Omondo handles these types but opensource UML implements a
XMLPrimitiveTypes.library.uml and UMLPrimitiveTypes.library.uml that should
be used.

You can experiment with the opensource editor by typing your properties with
primitive types coming from these libraries and then generating your .ecore
model.

That should work.

You can alternatively stereotype your primitive types with <eDataType>
(from the ecore profile) and specify the instance class name explicitly.

Regards,

- James.



"Ed Merks" <merks@ca.ibm.com> wrote in message
news:f0l5jg$7v8$2@build.eclipse.org...
> Gonzalo,
>
> I think this is more a question for the UML2 newsgroup, since that
> project implements the UML importer and they can describe the various
> stereotypes that are supported for mapping to Ecore better than me.
> I've added that newsgroup to the "to" list so we can continue to use
> this thread.
>
>
> Gonzalo wrote:
> > Hello! I'm searching for some help with the Omondo Eclipse UML to ecore
> > mapping (.uml -> .ecore). I hope you can help me:
> >
> > Once I've created and saved an UML class diagram, Omondo Eclipse UML
creates
> > a .uml file (i.e. party.uml).
> > I'm using this file (party.uml) to create a new Empty EMF Project, then
> > create a new EMF Model, and then ,with party.genmodel, generate the
Model
> > Code. Then, I plan to persist my classes with Teneo and Hibernate.
> >
> > The problem I have is the types EMF creates inside the .ecore file (i.e.
> > party.javalang.String, party.javautil.Date), because these types are
> > different from the primitive types (String, Date, ...). If I could work
with
> > the primitives from the begining, maybe i could get rid of this problem.
> >
> > I would very much appreciate to get your input to this problem.
> >
> > Thanks in advance.
> >
> > With regards,
> >
> > Gonzalo Castro
> >
> >
> >
Re: No primitive types in .ecore files (party.javalang.String, ...) [message #611046 is a reply to message #472749] Tue, 24 April 2007 21:31 Go to previous message
Eclipse UserFriend
Originally posted by: pradeep_tamma.yahoo.com

I also have the Date problem mentioned below.

Also, when I import uml model to ecore, classes are being created for
DataTypes in the uml model as well. Is there a way to avoid that?

The importer doesn't seem to differentiate between Class and Datatype.

Thanks
Pradeep

"Ed Merks" <merks@ca.ibm.com> wrote in message
news:f0l5jg$7v8$2@build.eclipse.org...
> Gonzalo,
>
> I think this is more a question for the UML2 newsgroup, since that project
> implements the UML importer and they can describe the various stereotypes
> that are supported for mapping to Ecore better than me. I've added that
> newsgroup to the "to" list so we can continue to use this thread.
>
>
> Gonzalo wrote:
>> Hello! I'm searching for some help with the Omondo Eclipse UML to ecore
>> mapping (.uml -> .ecore). I hope you can help me:
>>
>> Once I've created and saved an UML class diagram, Omondo Eclipse UML
>> creates a .uml file (i.e. party.uml).
>> I'm using this file (party.uml) to create a new Empty EMF Project, then
>> create a new EMF Model, and then ,with party.genmodel, generate the Model
>> Code. Then, I plan to persist my classes with Teneo and Hibernate.
>>
>> The problem I have is the types EMF creates inside the .ecore file (i.e.
>> party.javalang.String, party.javautil.Date), because these types are
>> different from the primitive types (String, Date, ...). If I could work
>> with the primitives from the begining, maybe i could get rid of this
>> problem.
>>
>> I would very much appreciate to get your input to this problem.
>>
>> Thanks in advance.
>>
>> With regards,
>>
>> Gonzalo Castro
>>
>>
Re: No primitive types in .ecore files (party.javalang.String, ...) [message #611049 is a reply to message #472751] Tue, 24 April 2007 22:07 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Pradeep,

some comments below ...

- James.

"Pradeep Tamma" <pradeep_tamma@yahoo.com> wrote in message
news:f0lt0b$e1n$1@build.eclipse.org...
> I also have the Date problem mentioned below.
>
.. see previous posting for some suggestions ...

> Also, when I import uml model to ecore, classes are being created for
> DataTypes in the uml model as well. Is there a way to avoid that?

If you define the Datatypes in your .uml model they will be created in the
..ecore model.

>
> The importer doesn't seem to differentiate between Class and Datatype.

... not sure what you mean by "differentiate between"?

>
> Thanks
> Pradeep
>
> "Ed Merks" <merks@ca.ibm.com> wrote in message
> news:f0l5jg$7v8$2@build.eclipse.org...
> > Gonzalo,
> >
> > I think this is more a question for the UML2 newsgroup, since that
project
> > implements the UML importer and they can describe the various
stereotypes
> > that are supported for mapping to Ecore better than me. I've added that
> > newsgroup to the "to" list so we can continue to use this thread.
> >
> >
> > Gonzalo wrote:
> >> Hello! I'm searching for some help with the Omondo Eclipse UML to
ecore
> >> mapping (.uml -> .ecore). I hope you can help me:
> >>
> >> Once I've created and saved an UML class diagram, Omondo Eclipse UML
> >> creates a .uml file (i.e. party.uml).
> >> I'm using this file (party.uml) to create a new Empty EMF Project, then
> >> create a new EMF Model, and then ,with party.genmodel, generate the
Model
> >> Code. Then, I plan to persist my classes with Teneo and Hibernate.
> >>
> >> The problem I have is the types EMF creates inside the .ecore file
(i.e.
> >> party.javalang.String, party.javautil.Date), because these types are
> >> different from the primitive types (String, Date, ...). If I could work
> >> with the primitives from the begining, maybe i could get rid of this
> >> problem.
> >>
> >> I would very much appreciate to get your input to this problem.
> >>
> >> Thanks in advance.
> >>
> >> With regards,
> >>
> >> Gonzalo Castro
> >>
> >>
>
>
Re: No primitive types in .ecore files (party.javalang.String, ...) [message #611050 is a reply to message #472794] Tue, 24 April 2007 23:22 Go to previous message
Eclipse UserFriend
Originally posted by: pradeep_tamma.yahoo.com

Please see the attachment. I am using uml2tools in eclipse. I created some
Datatypes, some primitive types and some classes using the graphical editor.

Now in the .uml file you will see those primitive types, DataTypes and
Classes. But when I import the same as ecore, there is no difference between
DataTypes and classes.
Also for the primitive type, java.util.Date in uml file changed to
javautilDate.

When I generate classes using the genmodel I get classes for Datatypes as
well. As expected javautilDate gives an error.

Please let me know if I am not clear.

Thanks
Pradeep

There
"James Bruck" <jbruck@ca.ibm.com> wrote in message
news:f0lv3g$7ks$2@build.eclipse.org...
> Hi Pradeep,
>
> some comments below ...
>
> - James.
>
> "Pradeep Tamma" <pradeep_tamma@yahoo.com> wrote in message
> news:f0lt0b$e1n$1@build.eclipse.org...
>> I also have the Date problem mentioned below.
>>
> .. see previous posting for some suggestions ...
>
>> Also, when I import uml model to ecore, classes are being created for
>> DataTypes in the uml model as well. Is there a way to avoid that?
>
> If you define the Datatypes in your .uml model they will be created in the
> .ecore model.
>
>>
>> The importer doesn't seem to differentiate between Class and Datatype.
>
> .. not sure what you mean by "differentiate between"?
>
>>
>> Thanks
>> Pradeep
>>
>> "Ed Merks" <merks@ca.ibm.com> wrote in message
>> news:f0l5jg$7v8$2@build.eclipse.org...
>> > Gonzalo,
>> >
>> > I think this is more a question for the UML2 newsgroup, since that
> project
>> > implements the UML importer and they can describe the various
> stereotypes
>> > that are supported for mapping to Ecore better than me. I've added
>> > that
>> > newsgroup to the "to" list so we can continue to use this thread.
>> >
>> >
>> > Gonzalo wrote:
>> >> Hello! I'm searching for some help with the Omondo Eclipse UML to
> ecore
>> >> mapping (.uml -> .ecore). I hope you can help me:
>> >>
>> >> Once I've created and saved an UML class diagram, Omondo Eclipse UML
>> >> creates a .uml file (i.e. party.uml).
>> >> I'm using this file (party.uml) to create a new Empty EMF Project,
>> >> then
>> >> create a new EMF Model, and then ,with party.genmodel, generate the
> Model
>> >> Code. Then, I plan to persist my classes with Teneo and Hibernate.
>> >>
>> >> The problem I have is the types EMF creates inside the .ecore file
> (i.e.
>> >> party.javalang.String, party.javautil.Date), because these types are
>> >> different from the primitive types (String, Date, ...). If I could
>> >> work
>> >> with the primitives from the begining, maybe i could get rid of this
>> >> problem.
>> >>
>> >> I would very much appreciate to get your input to this problem.
>> >>
>> >> Thanks in advance.
>> >>
>> >> With regards,
>> >>
>> >> Gonzalo Castro
>> >>
>> >>
>>
>>
>
>


  • Attachment: uml.PNG
    (Size: 29.77KB, Downloaded 143 times)
Re: No primitive types in .ecore files (party.javalang.String, ...) [message #611052 is a reply to message #472795] Wed, 25 April 2007 13:20 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Pradeep,

UML Primitive types map to ecore DataTypes.
UML Data types map to ecore Classes.

Ecore does not make distinctions between UML primitive types and UML data
types.

The name of your java.util.Date is not an appropriate ecore metatype name so
the periods were removed. I think what you really want to do is create a
type called "Date", then use a <<eDataType>> stereotype and set the instance
class name to java.util.Date. Or use the primitive types libraries as
mentioned previously.

- James.



"Pradeep Tamma" <pradeep_tamma@yahoo.com> wrote in message
news:f0m3f0$acg$1@build.eclipse.org...
> Please see the attachment. I am using uml2tools in eclipse. I created some
> Datatypes, some primitive types and some classes using the graphical
editor.
>
> Now in the .uml file you will see those primitive types, DataTypes and
> Classes. But when I import the same as ecore, there is no difference
between
> DataTypes and classes.
> Also for the primitive type, java.util.Date in uml file changed to
> javautilDate.
>
> When I generate classes using the genmodel I get classes for Datatypes as
> well. As expected javautilDate gives an error.
>
> Please let me know if I am not clear.
>
> Thanks
> Pradeep
>
> There
> "James Bruck" <jbruck@ca.ibm.com> wrote in message
> news:f0lv3g$7ks$2@build.eclipse.org...
> > Hi Pradeep,
> >
> > some comments below ...
> >
> > - James.
> >
> > "Pradeep Tamma" <pradeep_tamma@yahoo.com> wrote in message
> > news:f0lt0b$e1n$1@build.eclipse.org...
> >> I also have the Date problem mentioned below.
> >>
> > .. see previous posting for some suggestions ...
> >
> >> Also, when I import uml model to ecore, classes are being created for
> >> DataTypes in the uml model as well. Is there a way to avoid that?
> >
> > If you define the Datatypes in your .uml model they will be created in
the
> > .ecore model.
> >
> >>
> >> The importer doesn't seem to differentiate between Class and Datatype.
> >
> > .. not sure what you mean by "differentiate between"?
> >
> >>
> >> Thanks
> >> Pradeep
> >>
> >> "Ed Merks" <merks@ca.ibm.com> wrote in message
> >> news:f0l5jg$7v8$2@build.eclipse.org...
> >> > Gonzalo,
> >> >
> >> > I think this is more a question for the UML2 newsgroup, since that
> > project
> >> > implements the UML importer and they can describe the various
> > stereotypes
> >> > that are supported for mapping to Ecore better than me. I've added
> >> > that
> >> > newsgroup to the "to" list so we can continue to use this thread.
> >> >
> >> >
> >> > Gonzalo wrote:
> >> >> Hello! I'm searching for some help with the Omondo Eclipse UML to
> > ecore
> >> >> mapping (.uml -> .ecore). I hope you can help me:
> >> >>
> >> >> Once I've created and saved an UML class diagram, Omondo Eclipse UML
> >> >> creates a .uml file (i.e. party.uml).
> >> >> I'm using this file (party.uml) to create a new Empty EMF Project,
> >> >> then
> >> >> create a new EMF Model, and then ,with party.genmodel, generate the
> > Model
> >> >> Code. Then, I plan to persist my classes with Teneo and Hibernate.
> >> >>
> >> >> The problem I have is the types EMF creates inside the .ecore file
> > (i.e.
> >> >> party.javalang.String, party.javautil.Date), because these types are
> >> >> different from the primitive types (String, Date, ...). If I could
> >> >> work
> >> >> with the primitives from the begining, maybe i could get rid of this
> >> >> problem.
> >> >>
> >> >> I would very much appreciate to get your input to this problem.
> >> >>
> >> >> Thanks in advance.
> >> >>
> >> >> With regards,
> >> >>
> >> >> Gonzalo Castro
> >> >>
> >> >>
> >>
> >>
> >
> >
>
>
>
Re: No primitive types in .ecore files (party.javalang.String, ...) [message #613186 is a reply to message #472797] Wed, 25 April 2007 21:45 Go to previous message
Pradeep is currently offline PradeepFriend
Messages: 61
Registered: July 2009
Member
Hi James,

I assume by type you mean an actual Class. But I don't see an option to
specify a stereotype in the diagram editor. How do i specify it?

Thanks
Pradeep

"James Bruck" <jbruck@ca.ibm.com> wrote in message
news:f0nkjb$ap8$2@build.eclipse.org...
> Hi Pradeep,
>
> UML Primitive types map to ecore DataTypes.
> UML Data types map to ecore Classes.
>
> Ecore does not make distinctions between UML primitive types and UML data
> types.
>
> The name of your java.util.Date is not an appropriate ecore metatype name
> so
> the periods were removed. I think what you really want to do is create a
> type called "Date", then use a <<eDataType>> stereotype and set the
> instance
> class name to java.util.Date. Or use the primitive types libraries as
> mentioned previously.
>
> - James.
>
>
>
> "Pradeep Tamma" <pradeep_tamma@yahoo.com> wrote in message
> news:f0m3f0$acg$1@build.eclipse.org...
>> Please see the attachment. I am using uml2tools in eclipse. I created
>> some
>> Datatypes, some primitive types and some classes using the graphical
> editor.
>>
>> Now in the .uml file you will see those primitive types, DataTypes and
>> Classes. But when I import the same as ecore, there is no difference
> between
>> DataTypes and classes.
>> Also for the primitive type, java.util.Date in uml file changed to
>> javautilDate.
>>
>> When I generate classes using the genmodel I get classes for Datatypes as
>> well. As expected javautilDate gives an error.
>>
>> Please let me know if I am not clear.
>>
>> Thanks
>> Pradeep
>>
>> There
>> "James Bruck" <jbruck@ca.ibm.com> wrote in message
>> news:f0lv3g$7ks$2@build.eclipse.org...
>> > Hi Pradeep,
>> >
>> > some comments below ...
>> >
>> > - James.
>> >
>> > "Pradeep Tamma" <pradeep_tamma@yahoo.com> wrote in message
>> > news:f0lt0b$e1n$1@build.eclipse.org...
>> >> I also have the Date problem mentioned below.
>> >>
>> > .. see previous posting for some suggestions ...
>> >
>> >> Also, when I import uml model to ecore, classes are being created for
>> >> DataTypes in the uml model as well. Is there a way to avoid that?
>> >
>> > If you define the Datatypes in your .uml model they will be created in
> the
>> > .ecore model.
>> >
>> >>
>> >> The importer doesn't seem to differentiate between Class and Datatype.
>> >
>> > .. not sure what you mean by "differentiate between"?
>> >
>> >>
>> >> Thanks
>> >> Pradeep
>> >>
>> >> "Ed Merks" <merks@ca.ibm.com> wrote in message
>> >> news:f0l5jg$7v8$2@build.eclipse.org...
>> >> > Gonzalo,
>> >> >
>> >> > I think this is more a question for the UML2 newsgroup, since that
>> > project
>> >> > implements the UML importer and they can describe the various
>> > stereotypes
>> >> > that are supported for mapping to Ecore better than me. I've added
>> >> > that
>> >> > newsgroup to the "to" list so we can continue to use this thread.
>> >> >
>> >> >
>> >> > Gonzalo wrote:
>> >> >> Hello! I'm searching for some help with the Omondo Eclipse UML to
>> > ecore
>> >> >> mapping (.uml -> .ecore). I hope you can help me:
>> >> >>
>> >> >> Once I've created and saved an UML class diagram, Omondo Eclipse
>> >> >> UML
>> >> >> creates a .uml file (i.e. party.uml).
>> >> >> I'm using this file (party.uml) to create a new Empty EMF Project,
>> >> >> then
>> >> >> create a new EMF Model, and then ,with party.genmodel, generate the
>> > Model
>> >> >> Code. Then, I plan to persist my classes with Teneo and Hibernate.
>> >> >>
>> >> >> The problem I have is the types EMF creates inside the .ecore file
>> > (i.e.
>> >> >> party.javalang.String, party.javautil.Date), because these types
>> >> >> are
>> >> >> different from the primitive types (String, Date, ...). If I could
>> >> >> work
>> >> >> with the primitives from the begining, maybe i could get rid of
>> >> >> this
>> >> >> problem.
>> >> >>
>> >> >> I would very much appreciate to get your input to this problem.
>> >> >>
>> >> >> Thanks in advance.
>> >> >>
>> >> >> With regards,
>> >> >>
>> >> >> Gonzalo Castro
>> >> >>
>> >> >>
>> >>
>> >>
>> >
>> >
>>
>>
>>
>
>
Re: No primitive types in .ecore files (party.javalang.String, ...) [message #613187 is a reply to message #472804] Thu, 26 April 2007 09:19 Go to previous message
Tas Frangoullides is currently offline Tas FrangoullidesFriend
Messages: 195
Registered: July 2009
Senior Member
Pradeep,

My guess is James meant for you to create a UML Primitive Type as this is
where you can apply the <<eDataType>> stereotype.

Incase you don't have the profile here are the steps.

First you need to apply the ecore profile: Click on your model and use
Package->Apply Profile..
Then you need to apply the stereotype: Click on the primitive type and use
Element->Apply Stereotype..

The additional properties provided by the stereotype will appear in the
properties view under the "EData Type" category
Hope that helps.

This thread has reminded me of a something I've been meaning to ask... I'll
pop it in another thread.

Tas.

"Pradeep" <pradeep@live.com> wrote in message
news:f0oi6l$77t$1@build.eclipse.org...
> Hi James,
>
> I assume by type you mean an actual Class. But I don't see an option to
> specify a stereotype in the diagram editor. How do i specify it?
>
> Thanks
> Pradeep
>
> "James Bruck" <jbruck@ca.ibm.com> wrote in message
> news:f0nkjb$ap8$2@build.eclipse.org...
>> Hi Pradeep,
>>
>> UML Primitive types map to ecore DataTypes.
>> UML Data types map to ecore Classes.
>>
>> Ecore does not make distinctions between UML primitive types and UML data
>> types.
>>
>> The name of your java.util.Date is not an appropriate ecore metatype name
>> so
>> the periods were removed. I think what you really want to do is create
>> a
>> type called "Date", then use a <<eDataType>> stereotype and set the
>> instance
>> class name to java.util.Date. Or use the primitive types libraries as
>> mentioned previously.
>>
>> - James.
>>
>>
>>
>> "Pradeep Tamma" <pradeep_tamma@yahoo.com> wrote in message
>> news:f0m3f0$acg$1@build.eclipse.org...
>>> Please see the attachment. I am using uml2tools in eclipse. I created
>>> some
>>> Datatypes, some primitive types and some classes using the graphical
>> editor.
>>>
>>> Now in the .uml file you will see those primitive types, DataTypes and
>>> Classes. But when I import the same as ecore, there is no difference
>> between
>>> DataTypes and classes.
>>> Also for the primitive type, java.util.Date in uml file changed to
>>> javautilDate.
>>>
>>> When I generate classes using the genmodel I get classes for Datatypes
>>> as
>>> well. As expected javautilDate gives an error.
>>>
>>> Please let me know if I am not clear.
>>>
>>> Thanks
>>> Pradeep
>>>
>>> There
>>> "James Bruck" <jbruck@ca.ibm.com> wrote in message
>>> news:f0lv3g$7ks$2@build.eclipse.org...
>>> > Hi Pradeep,
>>> >
>>> > some comments below ...
>>> >
>>> > - James.
>>> >
>>> > "Pradeep Tamma" <pradeep_tamma@yahoo.com> wrote in message
>>> > news:f0lt0b$e1n$1@build.eclipse.org...
>>> >> I also have the Date problem mentioned below.
>>> >>
>>> > .. see previous posting for some suggestions ...
>>> >
>>> >> Also, when I import uml model to ecore, classes are being created for
>>> >> DataTypes in the uml model as well. Is there a way to avoid that?
>>> >
>>> > If you define the Datatypes in your .uml model they will be created in
>> the
>>> > .ecore model.
>>> >
>>> >>
>>> >> The importer doesn't seem to differentiate between Class and
>>> >> Datatype.
>>> >
>>> > .. not sure what you mean by "differentiate between"?
>>> >
>>> >>
>>> >> Thanks
>>> >> Pradeep
>>> >>
>>> >> "Ed Merks" <merks@ca.ibm.com> wrote in message
>>> >> news:f0l5jg$7v8$2@build.eclipse.org...
>>> >> > Gonzalo,
>>> >> >
>>> >> > I think this is more a question for the UML2 newsgroup, since that
>>> > project
>>> >> > implements the UML importer and they can describe the various
>>> > stereotypes
>>> >> > that are supported for mapping to Ecore better than me. I've added
>>> >> > that
>>> >> > newsgroup to the "to" list so we can continue to use this thread.
>>> >> >
>>> >> >
>>> >> > Gonzalo wrote:
>>> >> >> Hello! I'm searching for some help with the Omondo Eclipse UML to
>>> > ecore
>>> >> >> mapping (.uml -> .ecore). I hope you can help me:
>>> >> >>
>>> >> >> Once I've created and saved an UML class diagram, Omondo Eclipse
>>> >> >> UML
>>> >> >> creates a .uml file (i.e. party.uml).
>>> >> >> I'm using this file (party.uml) to create a new Empty EMF Project,
>>> >> >> then
>>> >> >> create a new EMF Model, and then ,with party.genmodel, generate
>>> >> >> the
>>> > Model
>>> >> >> Code. Then, I plan to persist my classes with Teneo and Hibernate.
>>> >> >>
>>> >> >> The problem I have is the types EMF creates inside the .ecore file
>>> > (i.e.
>>> >> >> party.javalang.String, party.javautil.Date), because these types
>>> >> >> are
>>> >> >> different from the primitive types (String, Date, ...). If I could
>>> >> >> work
>>> >> >> with the primitives from the begining, maybe i could get rid of
>>> >> >> this
>>> >> >> problem.
>>> >> >>
>>> >> >> I would very much appreciate to get your input to this problem.
>>> >> >>
>>> >> >> Thanks in advance.
>>> >> >>
>>> >> >> With regards,
>>> >> >>
>>> >> >> Gonzalo Castro
>>> >> >>
>>> >> >>
>>> >>
>>> >>
>>> >
>>> >
>>>
>>>
>>>
>>
>>
>
>
Re: No primitive types in .ecore files (party.javalang.String, ...) [message #613198 is a reply to message #472805] Thu, 26 April 2007 19:42 Go to previous message
Pradeep is currently offline PradeepFriend
Messages: 61
Registered: July 2009
Member
Hi Tas,

Thanks a lot. That really helped.

Pradeep

"Tas Frangoullides" <tas.frangoullides@barclaysglobal.com> wrote in message
news:f0pqrv$kqd$1@build.eclipse.org...
> Pradeep,
>
> My guess is James meant for you to create a UML Primitive Type as this is
> where you can apply the <<eDataType>> stereotype.
>
> Incase you don't have the profile here are the steps.
>
> First you need to apply the ecore profile: Click on your model and use
> Package->Apply Profile..
> Then you need to apply the stereotype: Click on the primitive type and use
> Element->Apply Stereotype..
>
> The additional properties provided by the stereotype will appear in the
> properties view under the "EData Type" category
> Hope that helps.
>
> This thread has reminded me of a something I've been meaning to ask...
> I'll pop it in another thread.
>
> Tas.
>
> "Pradeep" <pradeep@live.com> wrote in message
> news:f0oi6l$77t$1@build.eclipse.org...
>> Hi James,
>>
>> I assume by type you mean an actual Class. But I don't see an option to
>> specify a stereotype in the diagram editor. How do i specify it?
>>
>> Thanks
>> Pradeep
>>
>> "James Bruck" <jbruck@ca.ibm.com> wrote in message
>> news:f0nkjb$ap8$2@build.eclipse.org...
>>> Hi Pradeep,
>>>
>>> UML Primitive types map to ecore DataTypes.
>>> UML Data types map to ecore Classes.
>>>
>>> Ecore does not make distinctions between UML primitive types and UML
>>> data
>>> types.
>>>
>>> The name of your java.util.Date is not an appropriate ecore metatype
>>> name so
>>> the periods were removed. I think what you really want to do is create
>>> a
>>> type called "Date", then use a <<eDataType>> stereotype and set the
>>> instance
>>> class name to java.util.Date. Or use the primitive types libraries as
>>> mentioned previously.
>>>
>>> - James.
>>>
>>>
>>>
>>> "Pradeep Tamma" <pradeep_tamma@yahoo.com> wrote in message
>>> news:f0m3f0$acg$1@build.eclipse.org...
>>>> Please see the attachment. I am using uml2tools in eclipse. I created
>>>> some
>>>> Datatypes, some primitive types and some classes using the graphical
>>> editor.
>>>>
>>>> Now in the .uml file you will see those primitive types, DataTypes and
>>>> Classes. But when I import the same as ecore, there is no difference
>>> between
>>>> DataTypes and classes.
>>>> Also for the primitive type, java.util.Date in uml file changed to
>>>> javautilDate.
>>>>
>>>> When I generate classes using the genmodel I get classes for Datatypes
>>>> as
>>>> well. As expected javautilDate gives an error.
>>>>
>>>> Please let me know if I am not clear.
>>>>
>>>> Thanks
>>>> Pradeep
>>>>
>>>> There
>>>> "James Bruck" <jbruck@ca.ibm.com> wrote in message
>>>> news:f0lv3g$7ks$2@build.eclipse.org...
>>>> > Hi Pradeep,
>>>> >
>>>> > some comments below ...
>>>> >
>>>> > - James.
>>>> >
>>>> > "Pradeep Tamma" <pradeep_tamma@yahoo.com> wrote in message
>>>> > news:f0lt0b$e1n$1@build.eclipse.org...
>>>> >> I also have the Date problem mentioned below.
>>>> >>
>>>> > .. see previous posting for some suggestions ...
>>>> >
>>>> >> Also, when I import uml model to ecore, classes are being created
>>>> >> for
>>>> >> DataTypes in the uml model as well. Is there a way to avoid that?
>>>> >
>>>> > If you define the Datatypes in your .uml model they will be created
>>>> > in
>>> the
>>>> > .ecore model.
>>>> >
>>>> >>
>>>> >> The importer doesn't seem to differentiate between Class and
>>>> >> Datatype.
>>>> >
>>>> > .. not sure what you mean by "differentiate between"?
>>>> >
>>>> >>
>>>> >> Thanks
>>>> >> Pradeep
>>>> >>
>>>> >> "Ed Merks" <merks@ca.ibm.com> wrote in message
>>>> >> news:f0l5jg$7v8$2@build.eclipse.org...
>>>> >> > Gonzalo,
>>>> >> >
>>>> >> > I think this is more a question for the UML2 newsgroup, since that
>>>> > project
>>>> >> > implements the UML importer and they can describe the various
>>>> > stereotypes
>>>> >> > that are supported for mapping to Ecore better than me. I've
>>>> >> > added
>>>> >> > that
>>>> >> > newsgroup to the "to" list so we can continue to use this thread.
>>>> >> >
>>>> >> >
>>>> >> > Gonzalo wrote:
>>>> >> >> Hello! I'm searching for some help with the Omondo Eclipse UML
>>>> >> >> to
>>>> > ecore
>>>> >> >> mapping (.uml -> .ecore). I hope you can help me:
>>>> >> >>
>>>> >> >> Once I've created and saved an UML class diagram, Omondo Eclipse
>>>> >> >> UML
>>>> >> >> creates a .uml file (i.e. party.uml).
>>>> >> >> I'm using this file (party.uml) to create a new Empty EMF
>>>> >> >> Project,
>>>> >> >> then
>>>> >> >> create a new EMF Model, and then ,with party.genmodel, generate
>>>> >> >> the
>>>> > Model
>>>> >> >> Code. Then, I plan to persist my classes with Teneo and
>>>> >> >> Hibernate.
>>>> >> >>
>>>> >> >> The problem I have is the types EMF creates inside the .ecore
>>>> >> >> file
>>>> > (i.e.
>>>> >> >> party.javalang.String, party.javautil.Date), because these types
>>>> >> >> are
>>>> >> >> different from the primitive types (String, Date, ...). If I
>>>> >> >> could
>>>> >> >> work
>>>> >> >> with the primitives from the begining, maybe i could get rid of
>>>> >> >> this
>>>> >> >> problem.
>>>> >> >>
>>>> >> >> I would very much appreciate to get your input to this problem.
>>>> >> >>
>>>> >> >> Thanks in advance.
>>>> >> >>
>>>> >> >> With regards,
>>>> >> >>
>>>> >> >> Gonzalo Castro
>>>> >> >>
>>>> >> >>
>>>> >>
>>>> >>
>>>> >
>>>> >
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Previous Topic:Code generation does not work
Next Topic:Is it reasonable to want EDataType stereotype to be applyable to DataType
Goto Forum:
  


Current Time: Tue Apr 23 13:23:39 GMT 2024

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

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

Back to the top