|
Re: Trying to define attribute in class in diagram of type "Set<ComponentType>" [message #501913 is a reply to message #501797] |
Fri, 04 December 2009 12:49 |
Vlad Varnica Messages: 546 Registered: July 2009 Location: Milton Keynes - UK |
Senior Member |
|
|
It is not an easy question because when you create an attribute in the model this is not detected as an association till you don't also create an association between both classifiers. This is a two steps creation and not just the attribute creation.
If you use Java then I agree that if you create an attribute having set<category> then you will have an association between both classifiers. Don't forget that this association is detected and coming from the java tool using JDK and not from the UML model itself. It means that this information is detected from the java code then copied in the model in which both attribute and association will be create at the same time.
[Updated on: Fri, 04 December 2009 12:52] Report message to a moderator
|
|
|
Re: Trying to define attribute in class in diagram of type "Set<ComponentType>" [message #501931 is a reply to message #501797] |
Fri, 04 December 2009 14:02 |
Ed Merks Messages: 33139 Registered: July 2009 |
Senior Member |
|
|
David,
Your question appears to be about Java generics but that isn't directly
supported by UML itself. I suppose something equivalent is a
multi-valued property that's unordered and unique, but even this, if
mapped to Ecore and then to Java will result in EList<Category> not
Set<Category>...
David M. Karr wrote:
> I have a simple class diagram, with classes "Catalog" and "Category".
> I'll be adding many more classes, but these are the first two. There
> is a property of "Catalog" called "rootCategories", which should be a
> "Set<Category>". It's easy enough to define an association from
> Catalog to Category and label it on the source end with
> "rootCategories", but I'd like to define a "rootCategories" attribute
> of "Catalog" of type "Set<Category>".
>
> I've created the two class icons, along with the association, but I
> don't understand the steps required to get that attribute created with
> that type.
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
|
|
Re: Trying to define attribute in class in diagram of type "Set<ComponentType>" [message #502021 is a reply to message #502018] |
Fri, 04 December 2009 19:32 |
Ed Merks Messages: 33139 Registered: July 2009 |
Senior Member |
|
|
Vlad,
I make no claims to be a credible UML expert let alone an expert in the
tools. I simply help as best I can when no one else steps in to do better.
Of course you copied my previous reply. It's a bit juvenile, but that
seems to keep you entertained.
Vlad Varnica wrote:
> Ed answer below:
>
> Quote:
>> Unfortunately I know nothing about how to use the UML graphical
>> editor to achieve your, so I'm not sure what steps you need to take.
>> Maybe someone else will help with the specifics of your question.
>
>
> Do we really need such an answer ? you undermine any shred of
> credibility you might still have left on UML modeling.
>
> PS: Please don't say I copied your previous reply, I know and this
> intentional :)
>
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
Re: Trying to define attribute in class in diagram of type "Set<ComponentType>" [message #625328 is a reply to message #625327] |
Fri, 04 December 2009 15:45 |
Ed Merks Messages: 33139 Registered: July 2009 |
Senior Member |
|
|
David,
I believe in UML terminology it's just a many-valued (unbounded
multiplicity) property and that the fact it's a set, collection, or list
is implicit in things like the property being unordered and unique.
Unfortunately I know nothing about how to use the UML graphical editor
to achieve your, so I'm not sure what steps you need to take. Maybe
someone else will help with the specifics of your question.
David M. Karr wrote:
> Just show me the best reasonable compromise, in order to show in the
> UML diagram that it represents a Set of a particular component type.
> If you can't show the component type, I can live with that. If you
> can't use the word "Set", I can live with that. What's the best I can
> get, and how do I do it? There are some steps in defining UML in this
> plugin that are not obvious.
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
Re: Trying to define attribute in class in diagram of type "Set<ComponentType>" [message #625381 is a reply to message #625380] |
Fri, 04 December 2009 19:32 |
Ed Merks Messages: 33139 Registered: July 2009 |
Senior Member |
|
|
Vlad,
I make no claims to be a credible UML expert let alone an expert in the
tools. I simply help as best I can when no one else steps in to do better.
Of course you copied my previous reply. It's a bit juvenile, but that
seems to keep you entertained.
Vlad Varnica wrote:
> Ed answer below:
>
> Quote:
>> Unfortunately I know nothing about how to use the UML graphical
>> editor to achieve your, so I'm not sure what steps you need to take.
>> Maybe someone else will help with the specifics of your question.
>
>
> Do we really need such an answer ? you undermine any shred of
> credibility you might still have left on UML modeling.
>
> PS: Please don't say I copied your previous reply, I know and this
> intentional :)
>
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.04156 seconds