Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] UML2COPY problem
[ATL] UML2COPY problem [message #102282] Tue, 24 March 2009 10:15 Go to next message
micromilua  is currently offline micromilua Friend
Messages: 20
Registered: July 2009
Junior Member
I use the UML2COPY example's ATL File (UML2COPY.atl)and
I want to copy a simple uml class structure
============================================================ ================
My Source UML file is
============================================================ ================
<?xml version="1.0" encoding="UTF-8"?>
<xmi:XMI xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
xmlns:testprofile="http:///schemas/testprofile/_fQ49YAR6Ed6CdPeSt3_6Wg/0"
xmlns:uml="http://www.eclipse.org/uml2/2.1.0/UML"
xsi:schemaLocation="http:///schemas/testprofile/_fQ49YAR6Ed6CdPeSt3_6Wg/0
testprofile.profile.uml#_fRCuYAR6Ed6CdPeSt3_6Wg">
<uml:Model xmi:id="_X5HUCAR5Ed6CdPeSt3_6Wg" name="testprofile model">
<packageImport xmi:id="_X5HUCQR5Ed6CdPeSt3_6Wg">
<importedPackage xmi:type="uml:Model"
href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
</packageImport>
<packagedElement xmi:type="uml:Class" xmi:id="_ZcNecAR5Ed6CdPeSt3_6Wg"
name="Class_1"/>
<profileApplication xmi:id="_X5HUCgR5Ed6CdPeSt3_6Wg">
<eAnnotations xmi:id="_X5HUCwR5Ed6CdPeSt3_6Wg"
source="http://www.eclipse.org/uml2/2.0.0/UML">
<references xmi:type="ecore:EPackage"
href="http://www.eclipse.org/uml2/schemas/Standard/1#/"/>
</eAnnotations>
<appliedProfile
href="pathmap://UML_PROFILES/Standard.profile.uml#_0"/>
</profileApplication>
<profileApplication xmi:id="_muxEMAR6Ed6CdPeSt3_6Wg">
<eAnnotations xmi:id="_mu61MAR6Ed6CdPeSt3_6Wg"
source="http://www.eclipse.org/uml2/2.0.0/UML">
<references xmi:type="ecore:EPackage"
href="testprofile.profile.uml#_fRCuYAR6Ed6CdPeSt3_6Wg"/>
</eAnnotations>
<appliedProfile
href="testprofile.profile.uml#_T1GPtwR6Ed6CdPeSt3_6Wg"/>
</profileApplication>
</uml:Model>
<testprofile:Mystereotype xmi:id="_o90VsAR6Ed6CdPeSt3_6Wg"
base_Class="_ZcNecAR5Ed6CdPeSt3_6Wg"/>
</xmi:XMI>

============================================================ ================
and The transformed target UML file is:
============================================================ ================
<?xml version="1.0" encoding="ISO-8859-1"?>
<uml:Model xmi:version="2.1"
xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
xmlns:uml="http://www.eclipse.org/uml2/2.1.0/UML"
xmi:id="_kkHYoRhREd6huMCUFFstHQ" name="testprofile model">
<packageImport xmi:id="_kj9nohhREd6huMCUFFstHQ">
<importedPackage xmi:type="uml:Model"
href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
</packageImport>
<packagedElement xmi:type="uml:Class" xmi:id="_kkHYoBhREd6huMCUFFstHQ"
name="test"/>
<profileApplication xmi:id="_kkHYohhREd6huMCUFFstHQ">
<eAnnotations xmi:id="_kj9noBhREd6huMCUFFstHQ"
source="http://www.eclipse.org/uml2/2.0.0/UML">
<references xmi:type="uml:Profile"
href="pathmap://UML_PROFILES/Standard.profile.uml#_0"/>
</eAnnotations>
<appliedProfile href="pathmap://UML_PROFILES/Standard.profile.uml#_0"/>
</profileApplication>
<profileApplication xmi:id="_kkHYoxhREd6huMCUFFstHQ">
<eAnnotations xmi:id="_kj9noRhREd6huMCUFFstHQ"
source="http://www.eclipse.org/uml2/2.0.0/UML">
<references xmi:type="ecore:EPackage"
href=" platform:/resource/test%20VMC/InputModel/testprofile.profile .uml#_fRCuYAR6Ed6CdPeSt3_6Wg "/>
</eAnnotations>
<appliedProfile
href=" platform:/resource/test%20VMC/InputModel/testprofile.profile .uml#_T1GPtwR6Ed6CdPeSt3_6Wg "/>
</profileApplication>
</uml:Model>


and I loss "1" line of codes
<testprofile:Mystereotype xmi:id="_o90VsAR6Ed6CdPeSt3_6Wg"
base_Class="_ZcNecAR5Ed6CdPeSt3_6Wg"/>

because I haven't define the rule at the ATL File (UML2COPY.atl)
and I dont't know how to modify the file

anyone can give me some suggestion??

Thanks
Re: [ATL] UML2COPY problem [message #102299 is a reply to message #102282] Tue, 24 March 2009 13:49 Go to previous messageGo to next message
Tristan Faure is currently offline Tristan FaureFriend
Messages: 460
Registered: July 2009
Senior Member
hi
uml2copy doesn't copy stereotypes and profiles
if you want to copy them i succeed re applying them in do section maybe
it exists a better solution

micromilua a écrit :
> I use the UML2COPY example's ATL File (UML2COPY.atl)and
> I want to copy a simple uml class structure
> ============================================================ ================
>
> My Source UML file is
> ============================================================ ================
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xmi:XMI xmi:version="2.1"
> xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
> xmlns:testprofile="http:///schemas/testprofile/_fQ49YAR6Ed6CdPeSt3_6Wg/0"
> xmlns:uml="http://www.eclipse.org/uml2/2.1.0/UML"
> xsi:schemaLocation="http:///schemas/testprofile/_fQ49YAR6Ed6CdPeSt3_6Wg/0
> testprofile.profile.uml#_fRCuYAR6Ed6CdPeSt3_6Wg">
> <uml:Model xmi:id="_X5HUCAR5Ed6CdPeSt3_6Wg" name="testprofile model">
> <packageImport xmi:id="_X5HUCQR5Ed6CdPeSt3_6Wg">
> <importedPackage xmi:type="uml:Model"
> href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
> </packageImport>
> <packagedElement xmi:type="uml:Class"
> xmi:id="_ZcNecAR5Ed6CdPeSt3_6Wg" name="Class_1"/>
> <profileApplication xmi:id="_X5HUCgR5Ed6CdPeSt3_6Wg">
> <eAnnotations xmi:id="_X5HUCwR5Ed6CdPeSt3_6Wg"
> source="http://www.eclipse.org/uml2/2.0.0/UML">
> <references xmi:type="ecore:EPackage"
> href="http://www.eclipse.org/uml2/schemas/Standard/1#/"/>
> </eAnnotations>
> <appliedProfile
> href="pathmap://UML_PROFILES/Standard.profile.uml#_0"/>
> </profileApplication>
> <profileApplication xmi:id="_muxEMAR6Ed6CdPeSt3_6Wg">
> <eAnnotations xmi:id="_mu61MAR6Ed6CdPeSt3_6Wg"
> source="http://www.eclipse.org/uml2/2.0.0/UML">
> <references xmi:type="ecore:EPackage"
> href="testprofile.profile.uml#_fRCuYAR6Ed6CdPeSt3_6Wg"/>
> </eAnnotations>
> <appliedProfile
> href="testprofile.profile.uml#_T1GPtwR6Ed6CdPeSt3_6Wg"/>
> </profileApplication>
> </uml:Model>
> <testprofile:Mystereotype xmi:id="_o90VsAR6Ed6CdPeSt3_6Wg"
> base_Class="_ZcNecAR5Ed6CdPeSt3_6Wg"/>
> </xmi:XMI>
>
> ============================================================ ================
>
> and The transformed target UML file is:
> ============================================================ ================
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <uml:Model xmi:version="2.1"
> xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
> xmlns:uml="http://www.eclipse.org/uml2/2.1.0/UML"
> xmi:id="_kkHYoRhREd6huMCUFFstHQ" name="testprofile model">
> <packageImport xmi:id="_kj9nohhREd6huMCUFFstHQ">
> <importedPackage xmi:type="uml:Model"
> href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
> </packageImport>
> <packagedElement xmi:type="uml:Class"
> xmi:id="_kkHYoBhREd6huMCUFFstHQ" name="test"/>
> <profileApplication xmi:id="_kkHYohhREd6huMCUFFstHQ">
> <eAnnotations xmi:id="_kj9noBhREd6huMCUFFstHQ"
> source="http://www.eclipse.org/uml2/2.0.0/UML">
> <references xmi:type="uml:Profile"
> href="pathmap://UML_PROFILES/Standard.profile.uml#_0"/>
> </eAnnotations>
> <appliedProfile
> href="pathmap://UML_PROFILES/Standard.profile.uml#_0"/>
> </profileApplication>
> <profileApplication xmi:id="_kkHYoxhREd6huMCUFFstHQ">
> <eAnnotations xmi:id="_kj9noRhREd6huMCUFFstHQ"
> source="http://www.eclipse.org/uml2/2.0.0/UML">
> <references xmi:type="ecore:EPackage"
> href=" platform:/resource/test%20VMC/InputModel/testprofile.profile .uml#_fRCuYAR6Ed6CdPeSt3_6Wg "/>
>
> </eAnnotations>
> <appliedProfile
> href=" platform:/resource/test%20VMC/InputModel/testprofile.profile .uml#_T1GPtwR6Ed6CdPeSt3_6Wg "/>
>
> </profileApplication>
> </uml:Model>
>
>
> and I loss "1" line of codes
> <testprofile:Mystereotype xmi:id="_o90VsAR6Ed6CdPeSt3_6Wg"
> base_Class="_ZcNecAR5Ed6CdPeSt3_6Wg"/>
>
> because I haven't define the rule at the ATL File (UML2COPY.atl)
> and I dont't know how to modify the file
>
> anyone can give me some suggestion??
> Thanks
>
>
>
>
>
>




Re: [ATL] UML2COPY problem [message #102313 is a reply to message #102299] Tue, 24 March 2009 16:34 Go to previous message
micromilua  is currently offline micromilua Friend
Messages: 20
Registered: July 2009
Junior Member
Hi:

Firstly, Thank you very much
I try to apply profile, it is difficult to me

Can you share the apply profile example to me (any website or sample code)

Very Thanks


>Tristan FAURE wrote:
> hi
> uml2copy doesn't copy stereotypes and profiles
> if you want to copy them i succeed re applying them in do section maybe
> it exists a better solution
Previous Topic:[QVTO] Some issues with M6
Next Topic:UML2COPY, then re-apply Stereotype question
Goto Forum:
  


Current Time: Fri Apr 26 12:19:21 GMT 2024

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

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

Back to the top