Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » EMF Model : Conditional Reference(EMF Model : Conditional Reference)
EMF Model : Conditional Reference [message #1694059] Thu, 30 April 2015 09:34 Go to next message
Keyur Mahajan is currently offline Keyur MahajanFriend
Messages: 3
Registered: February 2015
Junior Member
Hi all,

I am new to Eclipse EMF so pardon me if my question sounds dumb. I want to know if there is any way in EMF data modeling to provide conditional reference to multiple class?

For Example:

Suppose I have a following model like this:

Class Project
Attribute projectName : EString
Attribute projectType : EString
Reference projectConfig : //can i make this reference dynamic with value of project type

Class ProjectConfigA
Attribute xyz : EString

Class ProjectConfigB
Attribute abc: EString

So here I want my model to behave like this:
1. As per the string of value of projectType, reference of projectConfig should be changed to either ProjectConfigA or ProjectConfigB
2. if User select project Type="A" => reference projectconfig will refere to ->ProjectConfigA
3. if User select project Type="B" => reference projectconfig will refere to ->ProjectConfigB

please give me something where i should look into or is there any feature available for this in EMF.

Thanks,

Regards,
KBM

Re: EMF Model : Conditional Reference [message #1694075 is a reply to message #1694059] Thu, 30 April 2015 11:43 Go to previous messageGo to next message
Ali Akar is currently offline Ali AkarFriend
Messages: 28
Registered: July 2009
Junior Member
Hi,

You can have a look on derived features.

Regards,
Ali

Le 30/04/2015 11:34, Keyur Mahajan a écrit :
> Hi all,
>
> I am new to Eclipse EMF so pardon me if my question sounds dumb. I want
> to know if there is any way in EMF data modeling to provide conditional
> reference to multiple class?
>
> For Example:
>
> Suppose I have a following model like this:
>
> Class Project
> Attribute projectName : EString
> Attribute projectType : EString
> Reference projectConfig : //can i make this reference dynamic with
> value of project type
>
> Class ProjectConfigA
> Attribute xyz : EString
>
> Class ProjectConfigB
> Attribute abc: EString
>
> So here I want my model to behave like this:
> 1. As per the string of value of projectType, reference of
> projectConfig should be changed to either ProjectConfigA or ProjectConfigB
> 2. if User select project Type="A" => reference projectconfig will
> refere to ->ProjectConfigA
> 3. if User select project Type="B" => reference projectconfig will
> refere to ->ProjectConfigB
>
> please give me something where i should look into or is there any
> feature available for this in EMF.
>
> Thanks,
>
> Regards,
> KBM
>
>
Re: EMF Model : Conditional Reference [message #1694395 is a reply to message #1694075] Tue, 05 May 2015 05:27 Go to previous message
Keyur Mahajan is currently offline Keyur MahajanFriend
Messages: 3
Registered: February 2015
Junior Member
Thanks for pointing out the direction.

Previous Topic:[CDO] MARS Enhancements
Next Topic:How can I implement attribute propagation in EMF?
Goto Forum:
  


Current Time: Fri Oct 18 09:36:00 GMT 2019

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

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

Back to the top