|
Re: XMI UML Profile to Ecore [message #791114 is a reply to message #791096] |
Sun, 05 February 2012 09:44 |
Ed Willink Messages: 7655 Registered: July 2009 |
Senior Member |
|
|
Hi Michael
I don't understand your emphasis on XMI files; all Ecore, UML, ... files
are XMI.
From my limited observation, the UML2 tooling is designed to work on
UML files and when you have finished your UML preparations you can
export to Ecore to have something to instantiate.
I would therefore look to perform your preparations in the UML domain,
perhaps using the tools directly accessible from the UML Model Editor,
or perhaps by performing equivalent Java calls in your code.
Regards
Ed Willink
On 05/02/2012 09:07, Michael Gebhart wrote:
> Hello,
>
> I have the following problem:
>
> I want to use the UML2 ecore model part of Eclipse UML2 for generating
> and querying UML models. Furthermore, I have an XMI file describing an
> UML profile.
>
> Now my question is: I have the UML2 ecore file. How can I import the
> UML profile based on XMI in order to generate a UML profile that can
> be combined with the UML2 ecore model?
>
> Regards,
>
> Michael
|
|
|
|
Re: XMI UML Profile to Ecore [message #791150 is a reply to message #791132] |
Sun, 05 February 2012 10:46 |
Ed Willink Messages: 7655 Registered: July 2009 |
Senior Member |
|
|
Hi Michael
OMG don't use Ecore; except that rather a lot of practical tooling does
and so sometimes the Ecore slips out; it's supposed to be eliminated.
The new UML specification models are prepared with RAS (Eclipse OCL) and
then transformed to comply with XMI specifications. If nothing else,
this allows UML version Y to prepared with a tool supporting version X.
Unfortunately you couldn't post the link. The MDT/UML2 project has
recently (Juno M2 to M5) added support for UML 2.4.1 which has resulted
in many additional namespaces. As an early user of this support, I
encountered a few xmi:Extension anomalies. It is really rather difficult
to get everything correctly initialized. You may find
/org.eclipse.ocl.examples.pivot/src/org/eclipse/ocl/examples/pivot/uml/UMLUtils.java
provides some inspiration.
I suspect that SoaML may not be using a namespace supported by your
version of MDT/UML2.
You may find it easiest just to adjust the Soa profile to be
namespace-similar to the one that works for Papyrus.
Regards
Ed Willink
On 05/02/2012 10:28, Michael Gebhart wrote:
> Hi Ed,
>
> thanks for your answer. You are right, the models in Eclipse are XMI.
> However, I have the problem: When developing a UML profile with e.g.
> Papyrus it works. I can load the resource and apply the profile.
> However, on one OMG page I found the profile for SoaML: omg.org
> /spec/SoaML/20091101/SoaMLProfile.xmi
>
> I can open the file in Papyrus (EMF Tools). I can even define a
> profile and I can apply it.
>
> However, compared to the profile created in Papyrus I cannot apply
> stereotypes. Obviously the tool does not find the stereotypes within
> the SoaML XMI even though it looks very similar to my own profile. One
> big difference are elements like:
>
> <xmi:Extension extender="[can't post links'">
> <eAnnotations xmi:type="ecore:EAnnotation"
> xmi:id="_jWaD_U_gEeGtD9xJ-qsapA" source="[can't post links]"
> references="_bO2ggc0cEd6AF7oF64guDA"/>
> </xmi:Extension>
>
> Maybe xmi:Extension is something that does not work with UML2?
>
> What I am wondering: Why does OMG use Ecore within its XMI files? :)
> Thought they use MOF.
>
> Regards,
>
> Michael
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03852 seconds