Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » [emf] multiple source target links
[emf] multiple source target links [message #1336785] Tue, 06 May 2014 15:12 Go to next message
Justus 2000 is currently offline Justus 2000Friend
Messages: 15
Registered: May 2014
Junior Member
Hi,

i have 4 elements that need diffrent links. some links need to have more sources or targets.

i need this

@gmf.link(source="from", target="to")
class Information_Requirement extends Requirements{
	ref Decision from;
	ref Decision to;
}


plus this

@gmf.link(source="from", target="to")
class Information_Requirement extends Requirements{
	ref Input_data from;
	ref Decision to;
}


is there a possibility to combine this? to use extends is not possible here.

sorry for my bad english
Re: [emf] multiple source target links [message #1338957 is a reply to message #1336785] Wed, 07 May 2014 12:59 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

Hi,

One option would be to use inheritance e.g.

class Information_Requirement extends Requirements{
ref Information_Requirement_End from;
ref Information_Requirement_End to;
}

abstract class Information_Requirement_End {}

class Decision extends Information_Requirement_End {}

class Input_Data extends Information_Requirement_End {}

Cheers,
Dimitris
Re: [emf] multiple source target links [message #1339228 is a reply to message #1338957] Wed, 07 May 2014 15:29 Go to previous messageGo to next message
Justus 2000 is currently offline Justus 2000Friend
Messages: 15
Registered: May 2014
Junior Member
Thank you for your post.

Inheritance is not possible in my case. I need a Interface and implements to do this, but i can only use extends in the emf file. Only one extends can be used per class.

I have 4 Elements and 3 connection types.

index.php/fa/18034/0/

I need to perform this connection. If there is an other possibility to modify this outside of the emf, let me know too.

Thanks,
Justus
  • Attachment: dmn.png
    (Size: 27.01KB, Downloaded 277 times)
Re: [emf] multiple source target links [message #1340698 is a reply to message #1339228] Thu, 08 May 2014 06:15 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

Hi Justus,

EMF supports multiple inheritance so this shouldn't be a problem.

Cheers,
Dimitris

[Updated on: Thu, 08 May 2014 13:03]

Report message to a moderator

Re: [emf] multiple source target links [message #1341369 is a reply to message #1340698] Thu, 08 May 2014 12:59 Go to previous messageGo to next message
Justus 2000 is currently offline Justus 2000Friend
Messages: 15
Registered: May 2014
Junior Member
Hi Dimitris,

i didn't tried this because it is not possible in java. many thanks for the help, this is what I need.

Best regards,
Justus
Re: [emf] multiple source target links [message #1341378 is a reply to message #1336785] Thu, 08 May 2014 13:03 Go to previous messageGo to next message
Justus 2000 is currently offline Justus 2000Friend
Messages: 15
Registered: May 2014
Junior Member
I tried it now and it works, but there is a new problem with the Authority Requirement connection. I grouprd Decision, Business_knowledge_model and Knowledge_source to DBK.

now I need 2 links [from Knowledge_source to DBK] and [from DBK to Knowledge_source].
DBK to DBK is not a possibility.

can I inheritance a link?

@gmf.link(source="fromTop", target="toTop")
class Authority_Requirement_top extends Requirements{
	ref Knowledge_source fromTop;
	ref DBK toTop;
}

@gmf.link(source="from", target="to")
class Authority_Requirement extends Authority_Requirement_top{
	ref DBK from;
	ref Knowledge_source to;
}


I tried this but it didn't work.

[Updated on: Thu, 08 May 2014 14:08]

Report message to a moderator

Re: [emf] multiple source target links [message #1348089 is a reply to message #1341378] Sun, 11 May 2014 20:17 Go to previous message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

Hi,

I'd suggest introducing a superclass of Knowledge_source and DBK (e.g. X) and then using constraints (e.g. with EVL) to define the exact types allowed in each reference.

@gmf.link(source="from", target="to")
class Authority_Requirement_top extends Requirements{
ref X from;
ref X to;
}

class Authority_Requirement extends Authority_Requirement_top {

}

Cheers,
Dimitris
Previous Topic:[Eugenia] Diagram partitioning
Next Topic:[ETL] Problems of applying stereotype
Goto Forum:
  


Current Time: Fri Apr 26 09:52:29 GMT 2024

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

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

Back to the top