Skip to main content



      Home
Home » Modeling » EMF » Emap with EMF (in ecorediagram)
Emap with EMF (in ecorediagram) [message #687766] Thu, 23 June 2011 03:35 Go to next message
Eclipse UserFriend
Hi,

I have searched about my problem before writing this topic but I have not found answers to my problem.

First I want to create an attribute with Etype Emap <K,V> : K =EString and V = EFloat but I don't know how apply that in the metamodel (in the diagram. Ecorediagram)

Second I want to create an attribute of type Vector<X> : X reference to a class that I have already defined in my metamodel.

Thankx,
Best Regards,
AménieV
Re: Emap with EMF (in ecorediagram) [message #688010 is a reply to message #687766] Thu, 23 June 2011 13:11 Go to previous messageGo to next message
Eclipse UserFriend
Aménie,

Comments below.

Am wrote:
> Hi,
>
> I have searched about my problem before writing this topic but I have
> not found answers to my problem.
>
> First I want to create an attribute with Etype Emap <K,V> : K =EString
> and V = EFloat but I don't know how apply that in the metamodel (in
> the diagram. Ecorediagram)
You can look at how Ecore does this for EAnnotation's eDetails feature
of type EMap<EString, EString>.
>
> Second I want to create an attribute of type Vector<X> : X reference
> to a class that I have already defined in my metamodel.
You'd have to define an EDataType for java.util.Vector and define it to
have a type parameter. Then you could, via the outline view, populate
the generic type's type argument to reference X.
>
> Thankx,
> Best Regards,
> AménieV
Re: Emap with EMF (in ecorediagram) [message #909517 is a reply to message #687766] Fri, 07 September 2012 05:10 Go to previous messageGo to next message
Eclipse UserFriend
Hey there!

My problem is little bit same as yours but in my case i have a class whose attribute should be a datatype class which is already defined in my metamodel.i.e

Class A
attr1:Class B

Where class A and Class B are part of my metamodel. I tried creating a datatype named B but this does not seem to work.

Do you have any idea about it. I have searched different forums on it but i could only find your post a little bit relevant to the problem i am facing

Thanks in advance
Re: Emap with EMF (in ecorediagram) [message #909567 is a reply to message #909517] Fri, 07 September 2012 06:38 Go to previous message
Eclipse UserFriend
Is B an EClass or an EDataType. If it's the former, you have to create
a reference not an attribute.

On 07/09/2012 11:10 AM, noi poi wrote:
> Hey there!
>
> My problem is little bit same as yours but in my case i have a class
> whose attribute should be a datatype class which is already defined in
> my metamodel.i.e
>
> Class A
> attr1:Class B
> Where class A and Class B are part of my metamodel. I tried creating
> a datatype named B but this does not seem to work.
>
> Do you have any idea about it. I have searched different forums on it
> but i could only find your post a little bit relevant to the problem i
> am facing
>
> Thanks in advance
Previous Topic:[Teneo] Redundant indexes in database
Next Topic:EObject to StreamSource
Goto Forum:
  


Current Time: Thu Nov 06 16:00:17 EST 2025

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

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

Back to the top