Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Can all Classifier take part in an Association?
Can all Classifier take part in an Association? [message #691134] Thu, 30 June 2011 19:36 Go to next message
st oehm is currently offline st oehmFriend
Messages: 79
Registered: October 2009
Member
hi to all
i don't unterstand if really all classifier can take part in an association
up to now i thougth, that is only possible for classes and interfaces but i found no constraint or something like that.
that would mean, a datatype, a enumeration or even an association can take part in an association, that would be very strange
is there no constraint like that or am i just blind?

best regards
Re: Can all Classifier take part in an Association? [message #691449 is a reply to message #691134] Fri, 01 July 2011 13:29 Go to previous messageGo to next message
Vlad Varnica is currently offline Vlad VarnicaFriend
Messages: 546
Registered: July 2009
Location: Milton Keynes - UK
Senior Member
I would say that you need to validate your model and see if it is accepted during the validation process.
You can open the .uml file with the Eclipse Model Editor and then click on the .uml model file in your package explorer > Validate Model.
If no warning then your model is valid.
This is the answer on technical point of view but I don't know what to say about best practices.

(no subject) [message #691456 is a reply to message #691134] Fri, 01 July 2011 13:43 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 4186
Registered: July 2009
Senior Member
Hi

I think you need to be clearer in your wording.

An Association is between its ends that are a Property owned by a Class
or a DataType or an Association, so no an Association is not for
Classifiers.
Ultimately the types of each Property are a Type, so yes an Association
is for Classifiers and Types.

Regards

Ed Willink

On 30/06/2011 21:36, stoehm wrote:
> hi to all
> i don't unterstand if really all classifier can take part in an
> association
> up to now i thougth, that is only possible for classes and interfaces
> but i found no constraint or something like that.
> that would mean, a datatype, a enumeration or even an association can
> take part in an association, that would be very strange
> is there no constraint like that or am i just blind?
>
> best regards
Re: (no subject) [message #691756 is a reply to message #691456] Sat, 02 July 2011 08:51 Go to previous messageGo to next message
st oehm is currently offline st oehmFriend
Messages: 79
Registered: October 2009
Member
hi ed
thanks for your reply.
i'm not sure if i understood all now(because i'm still thinking that way, that an association is between classes):
an association is between its associationsends, which are properties, the properties has an type, and this type is the part of the association (that would mean the owner of the attribute has no influence)?
for example three classes A,B,C and one association (like in the picture):
class A has an property with type C and Class B has an property with type C, the associationsends of the association are the properties of the classes A and B. Now when the type of the property is deciding, then that would mean we have an reflective Association from the class C, although the owners of the properties are Class A and B?
that seems a little bit strange to me
  • Attachment: ClassABC.png
    (Size: 228.36KB, Downloaded 102 times)
Re: (no subject) [message #691777 is a reply to message #691756] Sat, 02 July 2011 09:23 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 4186
Registered: July 2009
Senior Member
Hi

It certainly seems strange to me.

Just because you have N information fields that you can enter, it does
not mean that you have a free choice for all of them.

Have you validated your example?

The usual case for a bidirectional association is that each end has the
opposite container as its type; two type choices are therefore constrained.

The extra UML specification complexity seems to arise from an ability to
have an association to a type that cannot own associationEnds/properties
so the association has to own the associationEnd/property on behalf of
that type.

I recommend ignoring the complex case and concentrate on the more
obvious bidirectional use case.

Regards

Ed Willink



On 02/07/2011 10:51, stoehm wrote:
> hi ed
> thanks for your reply.
> i'm not sure if i understood all now(because i'm still thinking that way, that an association is between classes):
> an association is between its associationsends, which are properties, the properties has an type, and this type is the part of the association (that would mean the owner of the attribute has no influence)?
> for example three classes A,B,C and one association (like in the picture):
> class A has an property with type C and Class B has an property with type C, the associationsends of the association are the properties of the classes A and B. Now when the type of the property is deciding, then that would mean we have an reflective Association from the class C, although the owners of the properties are Class A and B?
> that seems a little bit strange to me
>
Re: (no subject) [message #691798 is a reply to message #691777] Sat, 02 July 2011 11:12 Go to previous messageGo to next message
st oehm is currently offline st oehmFriend
Messages: 79
Registered: October 2009
Member
hi ed
thanks for your fast reply
yes i've validated the example an it caused no errors
maybe i should go back to my mainproblem, i'm writing a codegenerator for an uml-editor the main question is (with an abstract view on association, for example in the uml-editor), is an association allowed between only classes and interfaces or is something else possible. like in the picture, is it possible to have an association between Datatypes or between primitiveType or bewtween enumerations (what make no real sense to me)

best regards stoehm
  • Attachment: assoc.png
    (Size: 219.03KB, Downloaded 112 times)
Re: (no subject) [message #691910 is a reply to message #691798] Sat, 02 July 2011 19:16 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 4186
Registered: July 2009
Senior Member
Hi

I think that associations from Enumerations are allowed; associations
associate.

Why shouldn't I associate an Enumeration with a Spannish table of strings?

[I am _not_ a UML expert, just someone who has scanned parts of the
specification occasionally.]

Regards

Ed Willink

On 02/07/2011 12:12, stoehm wrote:
> hi ed
> thanks for your fast reply
> yes i've validated the example an it caused no errors
> maybe i should go back to my mainproblem, i'm writing a codegenerator for an uml-editor the main question is (with an abstract view on association, for example in the uml-editor), is an association allowed between only classes and interfaces or is something else possible. like in the picture, is it possible to have an association between Datatypes or between primitiveType or bewtween enumerations (what make no real sense to me)
>
> best regards stoehm
Re: (no subject) [message #692340 is a reply to message #691910] Mon, 04 July 2011 09:02 Go to previous message
st oehm is currently offline st oehmFriend
Messages: 79
Registered: October 2009
Member
hi ed
thanks for your reply
you are right, there are no real problems when a enumeration or a datatype take parts in an association, but i don't think there is a need for that. a normal attribute should be enough for that case. for me it is a little problem, because in my codegeneration i have take care for the referential integrity, and i thougth during runtime it makes no sense to take care of referential integrity in case of datatypes or something like this.
so far i thank so for helping me to reflect the problem

best regards
stoehm
Previous Topic:qualified Association in TreeEditor
Next Topic:UML2 API vs UML metamodel
Goto Forum:
  


Current Time: Fri Dec 19 00:47:23 GMT 2014

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

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