|
Re: Semantic annotations for UML elements [message #803108 is a reply to message #803075] |
Mon, 20 February 2012 23:36 |
Vlad Varnica Messages: 546 Registered: July 2009 Location: Milton Keynes - UK |
Senior Member |
|
|
It is always the same dilema in UML.
Should we save more information in the model itself or work mainly at graphical level.
I would say yes we need to save more information directly in the model itself because with the new graphical UML views we have already reach the UML limits. UML will either die because no more real evolution or will start a new life if we use the model itself.
No real evolution has been done in that UML model used as a datawarehouse except by only one company Omondo in the last few years. I therefore don't know if this UML metamodeling will ever become a standard !!
[Updated on: Mon, 20 February 2012 23:44] Report message to a moderator
|
|
|
|
|
|
|
|
Re: Semantic annotations for UML elements [message #804569 is a reply to message #804513] |
Wed, 22 February 2012 19:42 |
Michael Bob Messages: 29 Registered: February 2012 |
Junior Member |
|
|
Hi,
hm I am not sure, whether we mean the same
I have created a UML model (no UML profile) with two classes: "Car" and "Train". Then, each class has an operation "run()". Now, I want to add the information about the duration. But I don't want to create a profile, because maybe later I need more information to be saved. And additionally: When exchanging the model, everybody would need to have my UML profile.
Now, I create an OCL constraint for the operations and def new properties? Is it possible to parse this information with OCL?
Seems to look nice, but the last time I tried to use OCL programmatically (I have to programmatically create and manipulate models) I did not get it working UML and profiles work pretty well, but I will keep trying
Michael
|
|
|
|
|
|
|
|
Re: Semantic annotations for UML elements [message #809200 is a reply to message #803506] |
Tue, 28 February 2012 15:37 |
Kenn Hussey Messages: 1620 Registered: July 2009 |
Senior Member |
|
|
Michael,
I would suggest using constraints (based on the language of your
choosing, be it OCL, Java, or whatever) if the kind of information
you're looking to add represents rules or conditions on the elements.
Another (less-structured) alternative is to use comments.
Otherwise, I would recommend using profiles/stereotypes because that's
what they are for - to extend UML with additional "non-standard"
information that's meaningful in a specific domain...
Kenn
On 12-02-21 7:36 AM, Michael Bob wrote:
> Hi,
>
> hm, very interesting. But when applying your answers on my question: How
> can I add some textual description or the information that operation X
> takes 10 seconds in OCL?
>
> I create the operation. Then I add an OCL constraint with the content:
>
> 'textual_description = "Hello World"'
>
> And another OCL constraint with:
>
> 'duration = 10'?
>
> What about the usage of alternative 3? I create stereotypes and now
> create a class "<<semantic>> description" with tagged values "textual
> description" and "duration" and set these values?
>
> Regards,
>
> Michael
|
|
|
|
|
Re: Semantic annotations for UML elements [message #814338 is a reply to message #811553] |
Tue, 06 March 2012 10:27 |
Eclipse User |
|
|
|
And one last remark on this...
The information you want to store in the model sounds to me pretty much like
non-/extra- functional requirements. So, UML constraints are definitely more
appropriate than comments or derived OCL properties - althought it'd work.
However, in your case it might be worth to have a look into the MARTE
profile, which is a (huge and sophisticated) UML profile to model, among
other things, non-functional properties qof software-intensive systems
(which doesn't have to be embedded systems necessarily).
Marc-Florian
"Ed Willink" schrieb im Newsbeitrag news:jiqjju$feo$1@news.eclipse.org...
Hi
If you use OCL constraints you can have nested collections and tuples.
Regards
Ed Willink
On 02/03/2012 13:22, Michael Bob wrote:
> Hi,
>
> thanks. I think, I will use stereotyped constraints. Or do I have to use
> stereotyped specifications subordinate to constraints?
>
> However, I have one question: Is it possible to use constraints to add
> Lists of values? Currently, I have only found LiteralInteger
> Specifications etc. But is there a specification that enables list of
> values? Especially references to other elements (List of classes with
> certain stereotype)
>
> Regards,
>
> Michael
|
|
|
Powered by
FUDForum. Page generated in 0.05255 seconds