Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community Forums[newbie] Basic Types in UML
https://www.eclipse.org/forums/index.php/mv/msg/197073/628435/#msg_628435
Can I represent generic types (Map <String, String>) in UML (or can I do so only in OCL)?]]>orlin 2010-05-05T13:39:55-00:00Re: [newbie] Basic Types in UML
https://www.eclipse.org/forums/index.php/mv/msg/197073/628438/#msg_628438
UML has a template construct call TemplateSignature that you can use to
define parameters for types. To see how it works, I suggest that you
look at the Ecore.UML model provided by the UML2 project, or convert any
Ecore model that defines generic types to UML.
As for OCL, it defines a few parameterized types in the standard
library, but provides no means to define new parameterized types of your
own nor even a syntax to for working with parameterized types in your
UML model. It's a pretty big hole in the language ...
HTH,
Christian
On 05/05/10 09:39 AM, orlin wrote:
> How can I use basic types, such as Map, String, etc?
>
> Can I represent generic types (Map <String, String>) in UML (or can I do
> so only in OCL)?]]>Christian Damus2010-05-07T16:56:10-00:00Re: [newbie] Basic Types in UML
https://www.eclipse.org/forums/index.php/mv/msg/197073/628444/#msg_628444
> How can I use basic types, such as Map, String, etc?
>
> Can I represent generic types (Map <String, String>) in UML (or can I do
> so only in OCL)?
Map is a platform library and as such very low level in terms of model
abstraction. Better use qualified associations!
Best,
Erhard
--
Meet us online!
w http://www.yatta.de
tw @YattaSolutions
fb http://www.facebook.com/pages/Yatta-Solutions-GmbH/933852562 69]]>Erhard Weinell2010-05-11T14:50:32-00:00Re: [newbie] Basic Types in UML
https://www.eclipse.org/forums/index.php/mv/msg/197073/628445/#msg_628445
@Christian, generics are a newer concept then OCL, so I was actually quite skeptical about it. And for OCL I did mean to specify in the pre condition, that key is of type X and value of type Y
@Erhard, can you give me an example of such a qualified association?
The reason why I am searching for something less generic and more java orientated is, in order to be able to automaticly generate the (java) structure from the uml specification. If I am to create my own maps, then probably the code generation will recreate them as well.
Orlin]]>orlin 2010-05-11T16:54:49-00:00Re: [newbie] Basic Types in UML
https://www.eclipse.org/forums/index.php/mv/msg/197073/628447/#msg_628447
The reason I want (need) to use java maps (and probably other java classes), is because I need to be able to use some frameworks, for example (apache) commons chain, where I need the execute(Map) method.
My current solution is to create another model, where I create as primitive type Map (in package java.util), when I think about it, it might be the only possible way...]]>orlin 2010-05-12T14:32:49-00:00