Home » Modeling » UML2 » [newbie] Basic Types in UML
|
Re: [newbie] Basic Types in UML [message #532254 is a reply to message #531588] |
Fri, 07 May 2010 16:56 |
|
Hi,
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)?
|
|
| | |
Re: [newbie] Basic Types in UML [message #533187 is a reply to message #532957] |
Wed, 12 May 2010 13:27 |
Erhard Weinell Messages: 39 Registered: January 2010 Location: Kassel, Germany |
Member |
|
|
Am 11.05.2010 18:54, schrieb orlin:
> @Erhard, can you give me an example of such a qualified association?
Have a look at this picture:
http://weinell.de/bin/qualified.png
(might not work at the moment due to DNS problems in germany)
A Person can have multiple addresses, and refers to each with a specific
kind (qualifier) such as "home", "work", etc. Note the cardinality
constraint 0..1 on the Address side. This means that for each qualifier
there is at most one address.
This is presumably the closest (and most highlevel) way to express maps
in UML. In theory, your UML tool should generate code that maps the
qualifier to a Map field.
BTW, UML comes with a set of primitive types.
Best,
Erhard
--
Meet us online!
w http://www.yatta.de
tw @YattaSolutions
fb http://www.facebook.com/pages/Yatta-Solutions-GmbH/933852562 69
|
|
| |
Re: [newbie] Basic Types in UML [message #628446 is a reply to message #532957] |
Wed, 12 May 2010 13:27 |
Erhard Weinell Messages: 39 Registered: January 2010 Location: Kassel, Germany |
Member |
|
|
Am 11.05.2010 18:54, schrieb orlin:
> @Erhard, can you give me an example of such a qualified association?
Have a look at this picture:
http://weinell.de/bin/qualified.png
(might not work at the moment due to DNS problems in germany)
A Person can have multiple addresses, and refers to each with a specific
kind (qualifier) such as "home", "work", etc. Note the cardinality
constraint 0..1 on the Address side. This means that for each qualifier
there is at most one address.
This is presumably the closest (and most highlevel) way to express maps
in UML. In theory, your UML tool should generate code that maps the
qualifier to a Map field.
BTW, UML comes with a set of primitive types.
Best,
Erhard
--
Meet us online!
w http://www.yatta.de
tw @YattaSolutions
fb http://www.facebook.com/pages/Yatta-Solutions-GmbH/933852562 69
|
|
|
Goto Forum:
Current Time: Thu Sep 26 01:35:41 GMT 2024
Powered by FUDForum. Page generated in 0.03844 seconds
|