Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » connectors
connectors [message #1151579] Wed, 23 October 2013 12:53 Go to next message
Jeni Martin is currently offline Jeni MartinFriend
Messages: 42
Registered: November 2012
Member
Hi,

I want to create a UML model by EMF that two classes are connected to each other via their ports. So, I created each class with their owned ports. to connect them, I read in the UML specification, that associations can be between any two instances, but connectors in UML 2 is introduced to "specify links between instances playing the connected parts only".
But there is no connector so that I can use or even I cannot create an association which its member ends are ports. I mean for each association, I cannot have two properties as member end that are themselves a kind of property. Does anyone know how I can connect them?

Thanks.

[Updated on: Wed, 23 October 2013 13:04]

Report message to a moderator

Re: connectors [message #1152081 is a reply to message #1151579] Wed, 23 October 2013 20:11 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Attempting to create new UML constructs programmatically is very hard.

I suggest you draw what you intend in your favourite UML tool and
examine the XMI.

Regards

Ed Willink

On 23/10/2013 13:53, Jeni Martin wrote:
> Hi,
>
> I want to create a UML model by EMF that two classes are connected to
> each other via their ports. So, I created each class with their owned
> ports. to connect them, I read in the UML specification, that
> associations can be between any two instances, but connectors in UML 2
> is introduced to connectors "specify links between instances playing
> the connected parts only".
> But I cannot create an association which its member ends are ports. I
> mean for each association, I cannot have two properties as member end
> that are themselves a kind of property. Does anyone know how I can
> connect them?
>
> Thanks.
Re: connectors [message #1152117 is a reply to message #1152081] Wed, 23 October 2013 20:41 Go to previous message
Jeni Martin is currently offline Jeni MartinFriend
Messages: 42
Registered: November 2012
Member
Hi,

Thank you very much for your reply. I am not sure if I got your answer correctly. I want to have a model that my UML profile I defined before, is applied on it. I use EMF for it.
In the profile, I have 3 meta classes that extend Class, Port and Connector UML meta classes. ports belong to class and connector connects the ports of classes. I defined my profile and seems OK. Next, I want to have a model and apply the defined UML profile. I am able to create classes and their ports and apply the stereotypes on them. But there is no connector element to add between the ports.
So, I changed my profile and used meta class association instead of connector. to be able to connect ports by association. Then when I wanted to apply the profile, I can add the association and apply the stereotype, but cannot assign the defined ports as member ends of association.

Thank you very much.
Previous Topic:Applying stereotype to property as association end throws IllegalArgumentException
Next Topic:UMLPackage.eINSTANCE.eClass() is ecore.EPackage?
Goto Forum:
  


Current Time: Thu Apr 25 12:25:16 GMT 2024

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

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

Back to the top