Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] how to get the parent's name in UML
[ATL] how to get the parent's name in UML [message #83116] Sat, 31 May 2008 07:00 Go to next message
Eclipse UserFriend
Originally posted by: hr_mi.live.cn

Hi everyone,

I want to judge if a class is in the compsite package,for example :

<packagedElement xmi:type="uml:Package" name="Composite Package">
<packagedElement xmi:type="uml:Class" name="onlinesale"/>
</packagedElement>


now in another package named "class package" it also has a class named
"onlinesale",I want to judge the class named "onlinesale" belonging to
Package named "Compsite Package".
How should I do it ?

Thanks very much.
Best for wishes!
Re: [ATL] how to get the parent's name in UML [message #83171 is a reply to message #83116] Sat, 31 May 2008 10:41 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: me.urszeidler.de

unique schrieb:
> Hi everyone,
>
> I want to judge if a class is in the compsite package,for example :
>
> <packagedElement xmi:type="uml:Package" name="Composite Package">
> <packagedElement xmi:type="uml:Class" name="onlinesale"/>
> </packagedElement>
>
>
> now in another package named "class package" it also has a class named
> "onlinesale",I want to judge the class named "onlinesale" belonging to
> Package named "Compsite Package".
> How should I do it ?
>
> Thanks very much.
> Best for wishes!
you can get the container of an element with refImmediateComposite(),
for the class it would the containing package.

greetings, urs.
Re: [ATL] how to get the parent's name in UML [message #83247 is a reply to message #83171] Sun, 01 June 2008 08:58 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: hr_mi.live.cn

urs zeidler 写道:
> unique schrieb:
>> Hi everyone,
>>
>> I want to judge if a class is in the compsite package,for example :
>>
>> <packagedElement xmi:type="uml:Package" name="Composite Package">
>> <packagedElement xmi:type="uml:Class" name="onlinesale"/>
>> </packagedElement>
>>
>>
>> now in another package named "class package" it also has a class named
>> "onlinesale",I want to judge the class named "onlinesale" belonging to
>> Package named "Compsite Package".
>> How should I do it ?
>>
>> Thanks very much.
>> Best for wishes!
> you can get the container of an element with refImmediateComposite(),
> for the class it would the containing package.
>
> greetings, urs.
Hi urs zeidler,
Would you please write an example ??
I don't how to use it .

Thanks !
Re: [ATL] how to get the parent's name in UML [message #83275 is a reply to message #83247] Sun, 01 June 2008 10:34 Go to previous message
Eclipse UserFriend
Originally posted by: me.urszeidler.de

>>> Thanks very much.
>>> Best for wishes!
>> you can get the container of an element with refImmediateComposite(),



object.refImmediateComposite() should return the container for the object.

greetings, urs.
Previous Topic:[ATL] Adding elements to collections
Next Topic:Problem with Inter-model reference
Goto Forum:
  


Current Time: Tue Apr 16 22:30:13 GMT 2024

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

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

Back to the top