Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Set and Bag types
Set and Bag types [message #759285] Mon, 28 November 2011 09:27 Go to next message
Eclipse UserFriend
Hi all, maybe a silly question, but still.. is there Set (Bag) type in
UML2? And if yes, how attribute of that type is described? Thanks in
advance.
Re: Set and Bag types [message #759294 is a reply to message #759285] Mon, 28 November 2011 09:51 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 4186
Registered: July 2009
Senior Member
Hi Emil

Not entirely silly; it is a mismatch between OCL and UML that awaits
resolution.

In UML, collection kinds are deduced from the ordered/unique
multiplicity properties, so a Bag is configired by a MultiplicityElement
with upperBound > 1, !unique, !ordered.

Regards

Ed Willink

On 28/11/2011 09:27, Emil Huseynli wrote:
> Hi all, maybe a silly question, but still.. is there Set (Bag) type in
> UML2? And if yes, how attribute of that type is described? Thanks in
> advance.
Re: Set and Bag types [message #759305 is a reply to message #759294] Mon, 28 November 2011 10:33 Go to previous messageGo to next message
Eclipse UserFriend
So, multiplicity of the attribute defines that, understood.

What i didn't know, that attributes can have multiplicity (thought
multiplicity is only related to the class as whole)

If we have

org.eclipse.uml2.uml.Class theClass;
org.eclipse.uml2.uml.Property prop = theClass.getAllAttributes().get(0);

And prop.getLower() (prop.getUpper()) will then contain multiplicity for
that attribute? How is that depicted in the class diagramm?


On 28.11.2011 10:51, Ed Willink wrote:
> Hi Emil
>
> Not entirely silly; it is a mismatch between OCL and UML that awaits
> resolution.
>
> In UML, collection kinds are deduced from the ordered/unique
> multiplicity properties, so a Bag is configired by a MultiplicityElement
> with upperBound > 1, !unique, !ordered.
>
> Regards
>
> Ed Willink
>
> On 28/11/2011 09:27, Emil Huseynli wrote:
>> Hi all, maybe a silly question, but still.. is there Set (Bag) type in
>> UML2? And if yes, how attribute of that type is described? Thanks in
>> advance.
>
Re: Set and Bag types [message #759470 is a reply to message #759305] Mon, 28 November 2011 18:57 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 4186
Registered: July 2009
Senior Member
Hi

> And prop.getLower() (prop.getUpper()) will then contain multiplicity
> for that attribute? How is that depicted in the class diagramm?
It depends on your diagram tool and viewing filters, but many display
things such as ?,*,+,1..3

Regards

Ed Willink
Re: Set and Bag types [message #759612 is a reply to message #759470] Tue, 29 November 2011 10:47 Go to previous message
Eclipse UserFriend
Ok, thanks a lot

On 28.11.2011 19:57, Ed Willink wrote:
> Hi
>
>> And prop.getLower() (prop.getUpper()) will then contain multiplicity
>> for that attribute? How is that depicted in the class diagramm?
> It depends on your diagram tool and viewing filters, but many display
> things such as ?,*,+,1..3
>
> Regards
>
> Ed Willink
Previous Topic:createClass and createOwnedClass
Next Topic:n-ary association
Goto Forum:
  


Current Time: Fri Dec 19 04:04:39 GMT 2014

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

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