Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <blockquote> <p>Does anyone know if it is possible to transform the generated XMI to Ecore XMI ?!</p> </blockquote> <p>Yes, it's possible - at least in outline. You can think of the problem in two parts:</p> <ol> <li>What's the semantic mapping? In other words, how do you map concepts in the source XMI to concepts in the target eCore model?</li> <li>How will you implement those mappings in practice?</li> </ol> <p><strong>Semantic Mapping</strong></p> <p>I'm assuming here your metamodel focuses on static structure. ECore doesn't support dynamic concepts outside of declaring EOperations. More on dynamics below if that's of relevance.</p> <p>I don't know EA specifically, nor which version(s) of XMI it supports. However, it will be some variant of the core UML concepts: Class, Attribute, Operation, Association, AssociationEnd, etc. eCore has a <a href="http://www.kermeta.org/docs/org.kermeta.ecore.documentation/build/html.chunked/Ecore-MDK/ch02.html" rel="nofollow">similar (if smaller) set of concepts</a>: <code>EClass</code>, <code>EAttribute</code>, <code>EDataType</code>, <code>EReference</code>, <code>EOperation</code>, etc. There's a fairly strong correlation among the 'type' concepts; for example: </p> <ul> <li>UML Class --> EClass </li> <li>Attribute --> EAttribute</li> <li>Operation --> EOperation</li> </ul> <p>So the mapping there should be straighforward. Basically create one instance of the ECore equivalent for each UML concept.</p> <p>Relationships are a little less obvious but still doable. ECore doesn't support relationships directly; <code>EReference</code> is the only analogous concept. However it's pretty easy to synthesise associations, for example:</p> <ul> <li>A one way navigable UML association becomes a single <code>EReference</code> with min &amp; max cardinality copied over</li> <li>A UML bi-directional association becomes two <code>EReferences</code>, one in each direction. You should also set the <code>EOtherEnd</code> property, which effectively says the two <code>EReferences</code> are part of the same association.</li> </ul> <p>Hopefully that gives you the idea.</p> <p><strong>Implementation</strong></p> <p>Having defined your conceptual mapping there are lots of options on how to do it. All will generally follow the same basic model:</p> <p>Parse Source --> Map Source Concepts to Target Concepts --> generate target text.</p> <p>You could use xslt (since it's just an XML->XML transformation). You could also use one of the many Model-to-model (M2M) and/or Model-to-text (M2T) toolkits available. See e.g. the eclipse modeling project (<a href="http://www.eclipse.org/m2m/" rel="nofollow">M2M</a>, <a href="http://www.eclipse.org/modeling/m2t/" rel="nofollow">M2T</a>). You could also go direct from EA by reading the model using the EA API instead of generating &amp; parsing XMI. Which you choose will depend on your environment, skillset, etc.</p> <p>If you want to see what it could look like in practice, you might take a look at <a href="https://www.magicdraw.com/" rel="nofollow">MagicDraw</a>. It provides ECore export out of the box. (Note it's a paid-for tool - but eval is available).</p> <p>It might also be worth asking Sparx directly: I'd be a bit surprised if there isn't some ECore export add-on/plugin available for EA.</p> <p>hth.</p> <hr> <p><strong>Dynamics</strong></p> <p>If your model has dynamics (state models etc.) then you have more of a problem. ECore doesn't cover those concepts at all. It's possible to extend ECore and that might be an option - but it's potentially more work as the tools that work with ECore will be less likely to understand your extensions.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload