Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Class attribute multiplicity property in class diagram designer(How to apply multiplicity property for a class diagram attribute)
Class attribute multiplicity property in class diagram designer [message #723889] Fri, 09 September 2011 15:09 Go to next message
Thanassis Viennas is currently offline Thanassis Viennas
Messages: 5
Registered: September 2011
Junior Member
My reference is UML2 Tools version 0.10.0.201103290534 on Indigo build: 20110615-0604 and my task to define a Typed Collection as type for a class attribute within a class diagram defined class e.g. List<TypeB> as attribute type in TypeA's bTypes attribute. I've noticed that there is no multiplicity attribute in the properties pane of a class's attribute. How can I achieve what I am describing?

Regards
Thanassis
Re: Class attribute multiplicity property in class diagram designer [message #723988 is a reply to message #723889] Sat, 10 September 2011 03:37 Go to previous messageGo to next message
Rafael Chaves is currently offline Rafael Chaves
Messages: 161
Registered: July 2009
Senior Member
Do you mean, there are no lower/lowerBound and upper/upperBound properties?
Re: Class attribute multiplicity property in class diagram designer [message #724004 is a reply to message #723988] Sat, 10 September 2011 06:13 Go to previous messageGo to next message
Thanassis Viennas is currently offline Thanassis Viennas
Messages: 5
Registered: September 2011
Junior Member
Well to be abstract enough so as to avoid mixing my own guess of how this could possibly be set-up. What is the suggested way of allowing an attribute to be of type "Typed Collection" e.g. List<MyType> or even "Untyped Collection" just List? The Type property does not allow me to define a domain type of List kind and I shouldn't ofcourse have to change a systems design specializing all Collection types just for the sake of being able to have them available for coding in "Type" property.
Re: Class attribute multiplicity property in class diagram designer [message #724017 is a reply to message #724004] Sat, 10 September 2011 07:05 Go to previous messageGo to next message
Thanassis Viennas is currently offline Thanassis Viennas
Messages: 5
Registered: September 2011
Junior Member
Assuming the availability of bound related properties I guess the requirement would be covered, but considering the lack of those properties as well as of the obvious "UML metamodel EType of kind List", how is such a requirement currently covered?
Re: Class attribute multiplicity property in class diagram designer [message #724034 is a reply to message #723988] Sat, 10 September 2011 08:20 Go to previous messageGo to next message
Thanassis Viennas is currently offline Thanassis Viennas
Messages: 5
Registered: September 2011
Junior Member
Rafael Chaves wrote on Sat, 10 September 2011 03:37
Do you mean, there are no lower/lowerBound and upper/upperBound properties?


Ok I missed upper and lower properties, additionally I found the following article for Generics path in UML templates.

eclipse.org/modeling/mdt/uml2/docs/articles/Defining_Generics_with_UML_Templates/article.html

Thank you very much!

Regards
Thanassis
Re: Class attribute multiplicity property in class diagram designer [message #724072 is a reply to message #724004] Sat, 10 September 2011 12:34 Go to previous messageGo to next message
Rafael Chaves is currently offline Rafael Chaves
Messages: 161
Registered: July 2009
Senior Member
To model a collection attribute where the element type is Foo, you declare the attribute type to be Foo (and not List of Foo) and set the upper bound to unlimited (-1).

See http://abstratt.com/blog/2007/11/17/uml-101-with-textuml-multiplicity-or/
(no subject) [message #724077 is a reply to message #724004] Sat, 10 September 2011 12:34 Go to previous messageGo to next message
Rafael Chaves is currently offline Rafael Chaves
Messages: 362
Registered: July 2009
Senior Member
To model a collection attribute where the element type is Foo, you declare the attribute type to be Foo (and not List of Foo) and set the upper bound to unlimited (-1).

See http://abstratt.com/blog/2007/11/17/uml-101-with-textuml-multiplicity-or/
Re: (no subject) [message #724109 is a reply to message #724077] Sat, 10 September 2011 16:34 Go to previous messageGo to next message
Thanassis Viennas is currently offline Thanassis Viennas
Messages: 5
Registered: September 2011
Junior Member
Rafael Chaves wrote on Sat, 10 September 2011 12:34
To model a collection attribute where the element type is Foo, you declare the attribute type to be Foo (and not List of Foo) and set the upper bound to unlimited (-1).

See abstratt.com/blog/2007/11/17/uml-101-with-textuml-multiplicity-or/


Rafael, thank you very much!
Re: (no subject) [message #724210 is a reply to message #724109] Sun, 11 September 2011 09:06 Go to previous message
Vlad Varnica is currently offline Vlad Varnica
Messages: 546
Registered: July 2009
Location: Milton Keynes - UK
Senior Member
I found this graphical view of a class diagram including generics.
Hope this help.
Previous Topic:How to deal with imported packages
Next Topic:Profile extends existing profile
Goto Forum:
  


Current Time: Mon Jul 28 22:37:16 EDT 2014

Powered by FUDForum. Page generated in 0.02629 seconds