Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » setValue on reference tag values of stereotyped elements
setValue on reference tag values of stereotyped elements [message #1014022] Mon, 25 February 2013 01:33 Go to next message
Alessandro Ranieri is currently offline Alessandro RanieriFriend
Messages: 16
Registered: November 2012
Junior Member
Hello,

I'm writing a tranformation from 2 input models:

- a uml model with a profile applied
- a model based on an ecore metamodel

I want to transform this two in a uml model with a profile applied (the same above). I use EMFTVM becouse I exploit the UML2Copy transformation.

In the following image there's a portion of the profile:

http://img685.imageshack.us/img685/3866/profileportion.png

As you can see the "covers" tag value is not a simple type like string, integer, etc., but it's a reference to another stereotyped element.

My question is: how can i set the tag value "covers" in my target model by ATL?
Of course, I would like to reference to an elements in output model...

In particular, how may I call the setValue method ?


Thanks in advance for any kind of help,

Alessandro R.

[Updated on: Mon, 25 February 2013 01:34]

Report message to a moderator

Re: setValue on reference tag values of stereotyped elements [message #1015824 is a reply to message #1014022] Sun, 03 March 2013 09:26 Go to previous messageGo to next message
Alessandro Ranieri is currently offline Alessandro RanieriFriend
Messages: 16
Registered: November 2012
Junior Member

I resolved my problem, and I want to post the solution also for return back some of the help the forumers have given to me.

The third argument of the setValue must refere to the StereotypeApplication of the element and not to the element itself, and OCL provide a simple method to retrieve this: getStereotypeApplications()

So, basically, we need to query the element which we wanto to refere with the "covers" association and to call the above ocl method.

I hope this could help someone.

Alessandro Ranieri
Re: setValue on reference tag values of stereotyped elements [message #1015835 is a reply to message #1015824] Sun, 03 March 2013 13:57 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

getStereotypeApplications() is not an OCL method.

It is part of the (non-standard) added-value of the MDT/UML2 UML model
support.

Regards

Ed Willink


On 03/03/2013 09:26, Alessandro Ranieri wrote:
>
> I resolved my problem, and I want to post the solution also for return
> back some of the help the forumers have given to me.
>
> The third argument of the setValue must refere to the
> StereotypeApplication of the element and not to the element itself,
> and OCL provide a simple method to retrieve this:
> getStereotypeApplications()
>
> So, basically, we need to query the element which we wanto to refere
> with the "covers" association and to call the above ocl method.
>
> I hope this could help someone.
>
> Alessandro Ranieri
Previous Topic:Using external parameters in ATL
Next Topic:"at" operation with ordered set
Goto Forum:
  


Current Time: Fri Apr 19 04:05:59 GMT 2024

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

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

Back to the top