can't see connector [message #475153] |
Tue, 21 August 2007 15:48 |
Eclipse User |
|
|
|
Originally posted by: nickkirtley.gmail.com
hi,
I'm looking for connector in the uml diagram but I can't find it. Someone
know why? I see it in javadoc of uml2 so it should be there right?
thx for any help
Nick
|
|
|
|
Re: can't see connector [message #475163 is a reply to message #475156] |
Wed, 22 August 2007 09:59 |
Eclipse User |
|
|
|
Originally posted by: nickkirtley.gmail.com
hi,
thx for your reply.
I see the connector (i added a component and then it showed). I want to
connect two components with each other. But an owned connector is only for
one component isn't it? How I connect two components via a connector?
regards,
Nick
|
|
|
Re: can't see connector [message #475167 is a reply to message #475163] |
Wed, 22 August 2007 12:06 |
Eclipse User |
|
|
|
Originally posted by: cdamus.ca.ibm.com
Hi, Nick,
Connectors are owned by structured classifiers, so you must have a
structured classifier context in which to create your connector.
If you're looking to connect two components together, then you will need a
component (the context) that has two parts or roles (i.e., properties of
some flavour) that are typed by your respective components. Then, you can
connect these two parts and the context component will own the connector.
On either of your component parts, you can also choose to attach the
connector to a port on the part. In this case, the ConnectorEnd will
reference as its "role" the port owned by the component that is the type of
the part, and the ConnectorEnd should reference the part as its
"partWithPort".
HTH,
Christian
Nick Kirtley wrote:
> hi,
>
> thx for your reply.
>
> I see the connector (i added a component and then it showed). I want to
> connect two components with each other. But an owned connector is only for
> one component isn't it? How I connect two components via a connector?
>
> regards,
>
> Nick
|
|
|
Re: can't see connector [message #475181 is a reply to message #475167] |
Wed, 22 August 2007 13:20 |
james bruck Messages: 1724 Registered: July 2009 |
Senior Member |
|
|
.... also, additional (similar) information was added to a post in the
uml2tools newsgroup entitled using "uml2tools" on June 11.
- James.
"Christian W. Damus" <cdamus@ca.ibm.com> wrote in message
news:fah8sb$6pr$1@build.eclipse.org...
> Hi, Nick,
>
> Connectors are owned by structured classifiers, so you must have a
> structured classifier context in which to create your connector.
>
> If you're looking to connect two components together, then you will need a
> component (the context) that has two parts or roles (i.e., properties of
> some flavour) that are typed by your respective components. Then, you can
> connect these two parts and the context component will own the connector.
>
> On either of your component parts, you can also choose to attach the
> connector to a port on the part. In this case, the ConnectorEnd will
> reference as its "role" the port owned by the component that is the type
of
> the part, and the ConnectorEnd should reference the part as its
> "partWithPort".
>
> HTH,
>
> Christian
>
>
> Nick Kirtley wrote:
>
> > hi,
> >
> > thx for your reply.
> >
> > I see the connector (i added a component and then it showed). I want to
> > connect two components with each other. But an owned connector is only
for
> > one component isn't it? How I connect two components via a connector?
> >
> > regards,
> >
> > Nick
>
|
|
|
Re: can't see connector [message #475241 is a reply to message #475181] |
Mon, 27 August 2007 09:05 |
Eclipse User |
|
|
|
Originally posted by: nickkirtley.gmail.com
Hi James and Christian,
This is what I want:
from the omg uml2 spec.
An assembly connector is a connector between two components that defines
that one component provides the services that
another component requires. An assembly connector is a connector that is
defined from a required interface or port to a
provided interface or port.
I want the connectors to be connected through the ports. As is described
above. So how do you mean that it can't be done James?
regards,
Nick
|
|
|
|
Re: can't see connector [message #475246 is a reply to message #475244] |
Mon, 27 August 2007 14:58 |
Eclipse User |
|
|
|
Originally posted by: nickkirtley.gmail.com
ok,
It was slightly inaccurate of me to say connector between two components.
I meant between ports/interfaces.
nick
|
|
|
|
Re: can't see connector [message #475257 is a reply to message #475247] |
Tue, 28 August 2007 13:55 |
Eclipse User |
|
|
|
Originally posted by: nickkirtley.gmail.com
Hi james, thx for that last post, I understand the connector/component
relationship a little better, but I don't think I understand it 100%
It's important I understand this correctly because it's an essential part
of my project.
Let me confirm this:
If I have two components in a component diagram I cannot connect them with
a connector because they have no context?
So even if I have two components: lets say user and billing.
A user uses services, lets say some digital services like renting movies
online. Billing keeps track of billing info. I want to connect these two
because obviously they have a relationship. Can I connect them in a
component diagram (with for ex. connectors that each have a port) or can I
NOT connect them and have to define some sort of context in a context
diagram?
If this example is no good then another example is welcome.
regards,
Nick
|
|
|
Re: can't see connector [message #475259 is a reply to message #475257] |
Tue, 28 August 2007 15:19 |
james bruck Messages: 1724 Registered: July 2009 |
Senior Member |
|
|
Hi Nick,
Lets take a really silly example just to illustrate a point.
Say you have 3 classes ( or components ). Say, "Hero", "Villain" and
"Sidekick". In a class diagram ( or component diagram ) you could model
these classes (components).
In one context say "Action Movie" you could have some connection between
Hero and Villain, and another connection between Hero and Sidekick.
In another context, say "Romantic Comedy" you could have a connection
between "Hero" and "Sidekick", there would be no connection between "Hero"
and "Villain".
Imagine that you drew connectors between "Hero" and "Villain" in your class
( or component ) diagram. In effect you would be saying that regardless of
context you always have some connection between "Hero" and "Villain", but
this is not the case.
You would need to create some other structured classifier called "Action
Movie" and in that structured classifier, create a composite structure
diagram and show some role typed by hero, a role typed by villain and a role
typed by Sidekick with the connections between them.
For example, say you want to model the movie "Shrek" and assume it is of
type "Action Movie".
Shrek would be playing the role of Hero, donkey would be playing the role
of Sidekick and evil fairy godmother would be plaing the role of Villain and
since the movie Shrek is of type "Action Movie" there would be some
connection between the hero and villain and between hero and sidekick.
In the context of a particular "Romantic Comedy" shrek could be playing the
role of "Sidekick" and donkey could be playing the role of "Hero" and there
would be a relationship between them ( maybey the hero falls in love with
the sidekick ... kinda weird ).
The point here is that in your class/component diagram you model general
components that can be used in different contexts. You wouldn't want to
create connectors between Hero and Villain on your component diagram because
you have no idea what context's Hero and Villain will be used... they may or
may not be "connected".
Keep in mind that you can use Collaborations as context.
( There is no such thing as "context diagram" but rather "composite
structure diagram" )
Does that help?
- James.
"Nick Kirtley" <nickkirtley@gmail.com> wrote in message
news:0676bd910f2a09d4c960d350761df970$1@www.eclipse.org...
> Hi james, thx for that last post, I understand the connector/component
> relationship a little better, but I don't think I understand it 100%
>
> It's important I understand this correctly because it's an essential part
> of my project.
>
> Let me confirm this:
>
> If I have two components in a component diagram I cannot connect them with
> a connector because they have no context?
>
> So even if I have two components: lets say user and billing.
>
> A user uses services, lets say some digital services like renting movies
> online. Billing keeps track of billing info. I want to connect these two
> because obviously they have a relationship. Can I connect them in a
> component diagram (with for ex. connectors that each have a port) or can I
> NOT connect them and have to define some sort of context in a context
> diagram?
>
> If this example is no good then another example is welcome.
>
> regards,
> Nick
>
|
|
|
Re: can't see connector [message #475355 is a reply to message #475259] |
Wed, 29 August 2007 11:03 |
Eclipse User |
|
|
|
Originally posted by: nickkirtley.gmail.com
Hi james,
I understand the concept now. But i'm having trouble implementing the
concept into uml2.
Could you explain step by step how to model the shrek example in the uml2
diagram?
thx
|
|
|
|
Re: can't see connector [message #475365 is a reply to message #475359] |
Thu, 30 August 2007 12:38 |
Eclipse User |
|
|
|
Originally posted by: nickkirtley.gmail.com
Ok got it working up until creating the composite structure diagram.
You're right that it's not working in uml2 tools. How do I do it in the
uml2 diagram editor?
thx
Nick
|
|
|
Re: can't see connector [message #475366 is a reply to message #475365] |
Thu, 30 August 2007 12:42 |
Eclipse User |
|
|
|
Originally posted by: nickkirtley.gmail.com
One more thing. Is this explained anywhere in the mdt uml2 documentation?
I haven't found it but if it does exist then it would save having to ask
you ;)
nick
|
|
|
|
|
Re: can't see connector [message #475371 is a reply to message #475367] |
Thu, 30 August 2007 13:32 |
Eclipse User |
|
|
|
Originally posted by: nickkirtley.gmail.com
ok and how do I do this in the uml2 diagram editor?
-Create a composite structure diagram whose context is C2. you should see
foo:C1 with ports/required provided interfaces etc.
nick
|
|
|
Re: can't see connector [message #475372 is a reply to message #475369] |
Thu, 30 August 2007 13:44 |
Eclipse User |
|
|
|
Originally posted by: nickkirtley.gmail.com
Hi james,
yeah but I only need it for very simple situations ( and later on more
complicated ones. but that can wait ), more proof of concept at the
moment. You said that it was possible in the uml2 tree editor(which is
what i meant when i said uml2 diagram editor) to create a composite
structure, yet I haven't found that option.
nick
|
|
|
|
Re: can't see connector [message #475574 is a reply to message #475376] |
Fri, 31 August 2007 08:59 |
Eclipse User |
|
|
|
Originally posted by: nickkirtley.gmail.com
Hi,
Yes but now I haven't created a connector between c1 and c2. This should
be done in a composite structure right? How do I do this in the uml editor?
nick
|
|
|
|
Re: can't see connector [message #475849 is a reply to message #475583] |
Mon, 10 September 2007 11:03 |
Eclipse User |
|
|
|
Originally posted by: nickkirtley.gmail.com
hi,
this is what I've done:
created a component c1
created port named e
stereotyped e with a stereotype
created a component c2
created a port named c
stereotyped c with a stereotype
created a property (selected c2, New child->OwnedAttribute->Property)
called the property foo, typed it with c1
created a property
called the property bar, typed it with c2
created a connector
created 2 connector ends
added foo to one of the roles and bar as the other.
is this how I should correctly connect two components within a context?
I get an error when I validate the model:
Assembly connector 'connector' must only be defined from a role end
requiring an interface to a role end providing that interface.
what am I doing wrong?
thx
Nick
|
|
|
|
Re: can't see connector [message #476440 is a reply to message #475851] |
Tue, 30 October 2007 10:12 |
Eclipse User |
|
|
|
Originally posted by: nickkirtley.gmail.com
sorry to bring this up again ;)
From this thread I learnt how to make a connector between two components.
This works fine and validates properly.
One of the components owns the connector with the connector ends role set
as properties typed by the two components. However, in this case the
'receiving' component, or c2, doesn't contain any information about the
connector. If I have two components and a connector in between then surely
the 'receiving/other' end should have a reference to the connector as well?
regards,
nick
|
|
|
|
Re: can't see connector [message #476447 is a reply to message #476446] |
Thu, 01 November 2007 09:44 |
Eclipse User |
|
|
|
Originally posted by: nickkirtley.gmail.com
A connector can be "typed" by an association which is a way of providing
information about how the components typing the role's being connected are
associated. However, connectors do not have to specify a type.
The ConnectableElement::getEnds() might also be of some use in determining
'other' ends given a particular role or part that is connected.
Hi
Could you explain what you mean by typing an association using an example
with uml tree editor.
Also , my point was that the calling side of the connector contains all of
the information regarding the connector. So if I can only view the
information contained within the receiving component, how then can I tell
if it has been connected. The ConnectableElement::getEnds() only works if
you have access to the connector itself, thus the calling end.
regards,
Nick
|
|
|
|
|
Re: can't see connector [message #624457 is a reply to message #475156] |
Wed, 22 August 2007 09:59 |
Eclipse User |
|
|
|
Originally posted by: nickkirtley.gmail.com
hi,
thx for your reply.
I see the connector (i added a component and then it showed). I want to
connect two components with each other. But an owned connector is only for
one component isn't it? How I connect two components via a connector?
regards,
Nick
|
|
|
Re: can't see connector [message #624458 is a reply to message #475163] |
Wed, 22 August 2007 12:06 |
Eclipse User |
|
|
|
Originally posted by: cdamus.ca.ibm.com
Hi, Nick,
Connectors are owned by structured classifiers, so you must have a
structured classifier context in which to create your connector.
If you're looking to connect two components together, then you will need a
component (the context) that has two parts or roles (i.e., properties of
some flavour) that are typed by your respective components. Then, you can
connect these two parts and the context component will own the connector.
On either of your component parts, you can also choose to attach the
connector to a port on the part. In this case, the ConnectorEnd will
reference as its "role" the port owned by the component that is the type of
the part, and the ConnectorEnd should reference the part as its
"partWithPort".
HTH,
Christian
Nick Kirtley wrote:
> hi,
>
> thx for your reply.
>
> I see the connector (i added a component and then it showed). I want to
> connect two components with each other. But an owned connector is only for
> one component isn't it? How I connect two components via a connector?
>
> regards,
>
> Nick
|
|
|
Re: can't see connector [message #624463 is a reply to message #475167] |
Wed, 22 August 2007 13:20 |
james bruck Messages: 1724 Registered: July 2009 |
Senior Member |
|
|
.... also, additional (similar) information was added to a post in the
uml2tools newsgroup entitled using "uml2tools" on June 11.
- James.
"Christian W. Damus" <cdamus@ca.ibm.com> wrote in message
news:fah8sb$6pr$1@build.eclipse.org...
> Hi, Nick,
>
> Connectors are owned by structured classifiers, so you must have a
> structured classifier context in which to create your connector.
>
> If you're looking to connect two components together, then you will need a
> component (the context) that has two parts or roles (i.e., properties of
> some flavour) that are typed by your respective components. Then, you can
> connect these two parts and the context component will own the connector.
>
> On either of your component parts, you can also choose to attach the
> connector to a port on the part. In this case, the ConnectorEnd will
> reference as its "role" the port owned by the component that is the type
of
> the part, and the ConnectorEnd should reference the part as its
> "partWithPort".
>
> HTH,
>
> Christian
>
>
> Nick Kirtley wrote:
>
> > hi,
> >
> > thx for your reply.
> >
> > I see the connector (i added a component and then it showed). I want to
> > connect two components with each other. But an owned connector is only
for
> > one component isn't it? How I connect two components via a connector?
> >
> > regards,
> >
> > Nick
>
|
|
|
Re: can't see connector [message #624542 is a reply to message #475181] |
Mon, 27 August 2007 09:05 |
Eclipse User |
|
|
|
Originally posted by: nickkirtley.gmail.com
Hi James and Christian,
This is what I want:
from the omg uml2 spec.
An assembly connector is a connector between two components that defines
that one component provides the services that
another component requires. An assembly connector is a connector that is
defined from a required interface or port to a
provided interface or port.
I want the connectors to be connected through the ports. As is described
above. So how do you mean that it can't be done James?
regards,
Nick
|
|
|
|
Re: can't see connector [message #624545 is a reply to message #475244] |
Mon, 27 August 2007 14:58 |
Eclipse User |
|
|
|
Originally posted by: nickkirtley.gmail.com
ok,
It was slightly inaccurate of me to say connector between two components.
I meant between ports/interfaces.
nick
|
|
|
|
Re: can't see connector [message #624550 is a reply to message #475247] |
Tue, 28 August 2007 13:55 |
Eclipse User |
|
|
|
Originally posted by: nickkirtley.gmail.com
Hi james, thx for that last post, I understand the connector/component
relationship a little better, but I don't think I understand it 100%
It's important I understand this correctly because it's an essential part
of my project.
Let me confirm this:
If I have two components in a component diagram I cannot connect them with
a connector because they have no context?
So even if I have two components: lets say user and billing.
A user uses services, lets say some digital services like renting movies
online. Billing keeps track of billing info. I want to connect these two
because obviously they have a relationship. Can I connect them in a
component diagram (with for ex. connectors that each have a port) or can I
NOT connect them and have to define some sort of context in a context
diagram?
If this example is no good then another example is welcome.
regards,
Nick
|
|
|
Re: can't see connector [message #624551 is a reply to message #475257] |
Tue, 28 August 2007 15:19 |
james bruck Messages: 1724 Registered: July 2009 |
Senior Member |
|
|
Hi Nick,
Lets take a really silly example just to illustrate a point.
Say you have 3 classes ( or components ). Say, "Hero", "Villain" and
"Sidekick". In a class diagram ( or component diagram ) you could model
these classes (components).
In one context say "Action Movie" you could have some connection between
Hero and Villain, and another connection between Hero and Sidekick.
In another context, say "Romantic Comedy" you could have a connection
between "Hero" and "Sidekick", there would be no connection between "Hero"
and "Villain".
Imagine that you drew connectors between "Hero" and "Villain" in your class
( or component ) diagram. In effect you would be saying that regardless of
context you always have some connection between "Hero" and "Villain", but
this is not the case.
You would need to create some other structured classifier called "Action
Movie" and in that structured classifier, create a composite structure
diagram and show some role typed by hero, a role typed by villain and a role
typed by Sidekick with the connections between them.
For example, say you want to model the movie "Shrek" and assume it is of
type "Action Movie".
Shrek would be playing the role of Hero, donkey would be playing the role
of Sidekick and evil fairy godmother would be plaing the role of Villain and
since the movie Shrek is of type "Action Movie" there would be some
connection between the hero and villain and between hero and sidekick.
In the context of a particular "Romantic Comedy" shrek could be playing the
role of "Sidekick" and donkey could be playing the role of "Hero" and there
would be a relationship between them ( maybey the hero falls in love with
the sidekick ... kinda weird ).
The point here is that in your class/component diagram you model general
components that can be used in different contexts. You wouldn't want to
create connectors between Hero and Villain on your component diagram because
you have no idea what context's Hero and Villain will be used... they may or
may not be "connected".
Keep in mind that you can use Collaborations as context.
( There is no such thing as "context diagram" but rather "composite
structure diagram" )
Does that help?
- James.
"Nick Kirtley" <nickkirtley@gmail.com> wrote in message
news:0676bd910f2a09d4c960d350761df970$1@www.eclipse.org...
> Hi james, thx for that last post, I understand the connector/component
> relationship a little better, but I don't think I understand it 100%
>
> It's important I understand this correctly because it's an essential part
> of my project.
>
> Let me confirm this:
>
> If I have two components in a component diagram I cannot connect them with
> a connector because they have no context?
>
> So even if I have two components: lets say user and billing.
>
> A user uses services, lets say some digital services like renting movies
> online. Billing keeps track of billing info. I want to connect these two
> because obviously they have a relationship. Can I connect them in a
> component diagram (with for ex. connectors that each have a port) or can I
> NOT connect them and have to define some sort of context in a context
> diagram?
>
> If this example is no good then another example is welcome.
>
> regards,
> Nick
>
|
|
|
Re: can't see connector [message #624573 is a reply to message #475259] |
Wed, 29 August 2007 11:03 |
Eclipse User |
|
|
|
Originally posted by: nickkirtley.gmail.com
Hi james,
I understand the concept now. But i'm having trouble implementing the
concept into uml2.
Could you explain step by step how to model the shrek example in the uml2
diagram?
thx
|
|
|
|
Re: can't see connector [message #624582 is a reply to message #475359] |
Thu, 30 August 2007 12:38 |
Eclipse User |
|
|
|
Originally posted by: nickkirtley.gmail.com
Ok got it working up until creating the composite structure diagram.
You're right that it's not working in uml2 tools. How do I do it in the
uml2 diagram editor?
thx
Nick
|
|
|
Re: can't see connector [message #624584 is a reply to message #475365] |
Thu, 30 August 2007 12:42 |
Eclipse User |
|
|
|
Originally posted by: nickkirtley.gmail.com
One more thing. Is this explained anywhere in the mdt uml2 documentation?
I haven't found it but if it does exist then it would save having to ask
you ;)
nick
|
|
|
|
|
Re: can't see connector [message #624590 is a reply to message #475367] |
Thu, 30 August 2007 13:32 |
Eclipse User |
|
|
|
Originally posted by: nickkirtley.gmail.com
ok and how do I do this in the uml2 diagram editor?
-Create a composite structure diagram whose context is C2. you should see
foo:C1 with ports/required provided interfaces etc.
nick
|
|
|
Re: can't see connector [message #624591 is a reply to message #475369] |
Thu, 30 August 2007 13:44 |
Eclipse User |
|
|
|
Originally posted by: nickkirtley.gmail.com
Hi james,
yeah but I only need it for very simple situations ( and later on more
complicated ones. but that can wait ), more proof of concept at the
moment. You said that it was possible in the uml2 tree editor(which is
what i meant when i said uml2 diagram editor) to create a composite
structure, yet I haven't found that option.
nick
|
|
|
|
Re: can't see connector [message #624601 is a reply to message #475376] |
Fri, 31 August 2007 08:59 |
Eclipse User |
|
|
|
Originally posted by: nickkirtley.gmail.com
Hi,
Yes but now I haven't created a connector between c1 and c2. This should
be done in a composite structure right? How do I do this in the uml editor?
nick
|
|
|
|
Re: can't see connector [message #624740 is a reply to message #475583] |
Mon, 10 September 2007 11:03 |
Eclipse User |
|
|
|
Originally posted by: nickkirtley.gmail.com
hi,
this is what I've done:
created a component c1
created port named e
stereotyped e with a stereotype
created a component c2
created a port named c
stereotyped c with a stereotype
created a property (selected c2, New child->OwnedAttribute->Property)
called the property foo, typed it with c1
created a property
called the property bar, typed it with c2
created a connector
created 2 connector ends
added foo to one of the roles and bar as the other.
is this how I should correctly connect two components within a context?
I get an error when I validate the model:
Assembly connector 'connector' must only be defined from a role end
requiring an interface to a role end providing that interface.
what am I doing wrong?
thx
Nick
|
|
|
|
Re: can't see connector [message #625343 is a reply to message #475851] |
Tue, 30 October 2007 10:12 |
Eclipse User |
|
|
|
Originally posted by: nickkirtley.gmail.com
sorry to bring this up again ;)
From this thread I learnt how to make a connector between two components.
This works fine and validates properly.
One of the components owns the connector with the connector ends role set
as properties typed by the two components. However, in this case the
'receiving' component, or c2, doesn't contain any information about the
connector. If I have two components and a connector in between then surely
the 'receiving/other' end should have a reference to the connector as well?
regards,
nick
|
|
|
|
Re: can't see connector [message #625350 is a reply to message #476446] |
Thu, 01 November 2007 09:44 |
Eclipse User |
|
|
|
Originally posted by: nickkirtley.gmail.com
A connector can be "typed" by an association which is a way of providing
information about how the components typing the role's being connected are
associated. However, connectors do not have to specify a type.
The ConnectableElement::getEnds() might also be of some use in determining
'other' ends given a particular role or part that is connected.
Hi
Could you explain what you mean by typing an association using an example
with uml tree editor.
Also , my point was that the calling side of the connector contains all of
the information regarding the connector. So if I can only view the
information contained within the receiving component, how then can I tell
if it has been connected. The ConnectableElement::getEnds() only works if
you have access to the connector itself, thus the calling end.
regards,
Nick
|
|
|
|