|
Re: Profiles eCore <-> UML [message #476021 is a reply to message #476016] |
Fri, 21 September 2007 18:45 |
james bruck Messages: 1724 Registered: July 2009 |
Senior Member |
|
|
Some comments below...
"SKuhn" <kuhn@oio.de> wrote in message
news:fcu22g$kvo$1@build.eclipse.org...
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> hi, I was wondering how profiles defined in UML and eCore are connected
> or differ from each other.
Profile's defined using UML use metatypes from the UML metamodel. When
you "define" your profile, you create an ecore representation. In general,
UML is more expressive than Ecore however, the kind of information that
should be added to the UML representation in your profile should be fairly
simple and therefore the Ecore represnentation should roughly map 1-1 to the
Ecore representation.
>
> I noticed 2 major differences when definining a profile:
>
> the profile in UML imports UML.metamodel.uml.
> the profile in eCore imports UML.ecore
> what are the differences between both metamodels?
UML.ecore is the ecore representation of the merged UML metamodel. The api
is ultimately controlled by this .ecore representation but a mapping is made
from the .uml version of the metamodel to the ecore version first.
>
> Why is an association class needed in the profile definition? When I
> compare both serialization:
> UML:
> <packagedElement xmi:type="uml:Stereotype" xmi:id="(...)**2"
> name="Element">
> <ownedAttribute xmi:id="(...)**3" name="base_Class"
> visibility="private" association="(...)**1">
> <type xmi:type="uml:Class"
> href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
> </ownedAttribute>
> </packagedElement>
>
> And the association class:
>
> <packagedElement xmi:type="uml:Extension" xmi:id="(...)**1" name=""
> memberEnd="(...)**4 (...)**3">
> <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="(...)**4"
> name="extension_" visibility="private" type="(...)**2"
> aggregation="composite" association="(...)**1">
> <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="(...)"
> name="" value="1"/>
> <lowerValue xmi:type="uml:LiteralInteger" xmi:id="(...)" name=""/>
> </ownedEnd>
> </packagedElement>
>
I'm not sure what you mean by "association class" are you referring to the
extension? It is a way of indicating the metatype being extended.
>
> Ecore seems much more readable, and I don't see a benefit of the UML
> definition since there's no lose of information in eCore:
> <eClassifiers xsi:type="ecore:EClass" name="Element">
> <eStructuralFeatures xsi:type="ecore:EReference" name="base_Class"
> ordered="false"
> lowerBound="1" eType="ecore:EClass
> platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Clas s "/>
> </eClassifiers>
>
>
Ecore is definitely more readable but it represents a subset of what UML can
represent. It basically focuses on the "class" part of UML, ie.
representing classes, properties etc. Ecore does not deal with
statemachines, activities, interactions etc.
> thanks
> - -stefan
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.7 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFG8otuIYVWjMSpDwwRAmFIAKD1V6SkblABNo2wgabUl65w68JOrQCf djah
> A+I6rFVCzIYZ3BC2CqudXj4=
> =Ol5Q
> -----END PGP SIGNATURE-----
|
|
|
Re: Profiles eCore <-> UML [message #624932 is a reply to message #476016] |
Fri, 21 September 2007 18:45 |
james bruck Messages: 1724 Registered: July 2009 |
Senior Member |
|
|
Some comments below...
"SKuhn" <kuhn@oio.de> wrote in message
news:fcu22g$kvo$1@build.eclipse.org...
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> hi, I was wondering how profiles defined in UML and eCore are connected
> or differ from each other.
Profile's defined using UML use metatypes from the UML metamodel. When
you "define" your profile, you create an ecore representation. In general,
UML is more expressive than Ecore however, the kind of information that
should be added to the UML representation in your profile should be fairly
simple and therefore the Ecore represnentation should roughly map 1-1 to the
Ecore representation.
>
> I noticed 2 major differences when definining a profile:
>
> the profile in UML imports UML.metamodel.uml.
> the profile in eCore imports UML.ecore
> what are the differences between both metamodels?
UML.ecore is the ecore representation of the merged UML metamodel. The api
is ultimately controlled by this .ecore representation but a mapping is made
from the .uml version of the metamodel to the ecore version first.
>
> Why is an association class needed in the profile definition? When I
> compare both serialization:
> UML:
> <packagedElement xmi:type="uml:Stereotype" xmi:id="(...)**2"
> name="Element">
> <ownedAttribute xmi:id="(...)**3" name="base_Class"
> visibility="private" association="(...)**1">
> <type xmi:type="uml:Class"
> href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
> </ownedAttribute>
> </packagedElement>
>
> And the association class:
>
> <packagedElement xmi:type="uml:Extension" xmi:id="(...)**1" name=""
> memberEnd="(...)**4 (...)**3">
> <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="(...)**4"
> name="extension_" visibility="private" type="(...)**2"
> aggregation="composite" association="(...)**1">
> <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="(...)"
> name="" value="1"/>
> <lowerValue xmi:type="uml:LiteralInteger" xmi:id="(...)" name=""/>
> </ownedEnd>
> </packagedElement>
>
I'm not sure what you mean by "association class" are you referring to the
extension? It is a way of indicating the metatype being extended.
>
> Ecore seems much more readable, and I don't see a benefit of the UML
> definition since there's no lose of information in eCore:
> <eClassifiers xsi:type="ecore:EClass" name="Element">
> <eStructuralFeatures xsi:type="ecore:EReference" name="base_Class"
> ordered="false"
> lowerBound="1" eType="ecore:EClass
> platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Clas s "/>
> </eClassifiers>
>
>
Ecore is definitely more readable but it represents a subset of what UML can
represent. It basically focuses on the "class" part of UML, ie.
representing classes, properties etc. Ecore does not deal with
statemachines, activities, interactions etc.
> thanks
> - -stefan
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.7 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFG8otuIYVWjMSpDwwRAmFIAKD1V6SkblABNo2wgabUl65w68JOrQCf djah
> A+I6rFVCzIYZ3BC2CqudXj4=
> =Ol5Q
> -----END PGP SIGNATURE-----
|
|
|
Powered by
FUDForum. Page generated in 0.02705 seconds