Select a Component from bag [message #765707] |
Wed, 14 December 2011 14:54 |
|
Hello Every one
I have been trying to map two elements for a long time but unfortunately due to my limited experience and knowledge I can not figure out a solution. I will much appreciate if any one can guide me little bit. I have attached a rough sketch of the scenario.
In the attached figure I have two attributes in the Class2 named IN and Out and of type XYZ. The source class has two aggregated elements of same type. The aggregated elements have an attribute DIRECTION whose value is defined by another enumeration class.
I have a separate mapping function for the type XYZ.
what i want to do is to map the aggregated element of Class 1 whose direction is IN to the IN attribute of class 2.
Is there any possible solution for this. Please correct if I am wrong some where
Thanks in Advance.
-
Attachment: mapping.jpg
(Size: 351.93KB, Downloaded 747 times)
|
|
|
|
|
Re: Select a Component from bag [message #765727 is a reply to message #765720] |
Wed, 14 December 2011 15:32 |
|
Hello Ed
thanks for the reply I appreciate that. I am using qvto for the transformations. I understood that select returns a set(bag) of elements.
for example for a transformation like
IN:= class1.port -> select ( port whose direction is IN)
the error is that IN is a component of type XYZ however I am trying to assign a bag to it. This is what my problem is.
I hope i was able to explain it better this time.
Regards
|
|
|
|
Powered by
FUDForum. Page generated in 0.03496 seconds