EMF ecore and xsd out of sync, how to resolve ?

Posted by SeB on Stack Overflow See other posts from Stack Overflow or by SeB
Published on 2009-09-01T11:34:45Z Indexed on 2010/05/03 8:08 UTC
Read the original article Hit count: 243

Filed under:
|
|

Hi there,

My application is using a model base on an xsd that have been converted to an ecore before generation of the java classes. One of my team member modified the .ecore metamodel in a previous version ,one attribute that used to be generated. He modified the attribute name but not the Extended MetaData specifying the element name used for xml persistance.

<eStructuralFeatures xsi:type="ecore:EReference" name="javaDocsAndUserApi" upperBound="-1"
    eType="#//JavaDocsAndUserApi" containment="true" resolveProxies="false">
  <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
    <details key="kind" value="element"/>
    <details key="name" value="docsAndUserApi"/>
  </eAnnotations>
</eStructuralFeatures>

so we have an attribute name which is javaDocsAndUserApi and the persisted element named docsAndUserApi, and of course if I create change the attribute in the xsd to be named javaDocsAndUserApi, the ecore transformation will generate a metadata name javaDocsAndUserApi as well, which will break compatibility with previously persisted models.

I have looked at xsd authoring guide to find an ecore:som_attribute that would allow me to specify which key to use in the xsd to force the metadata to be named docsAndUserApi during the xsd to ecore transformation but did not find anything. Does anybody have an idea to help me?

Thank you.

© Stack Overflow or respective owner

Related posts about emf

  • How to use EMF to read XML file?

    as seen on Stack Overflow - Search for 'Stack Overflow'
    I have to use EMF in one of my class projects. I am trying to understand how to use EMF to do the following: Read XML, Get the values into objects. Use ORM to persist the values in objects to database. - Done Get data from database using ORM and generate XML. I need to do all of that using: EMF… >>> More

  • DPI for EMF files

    as seen on Stack Overflow - Search for 'Stack Overflow'
    Do EMF files have a DPI that can be set? I have an application that allows saving an image in multiple formats (including EMF). I allow the user to specify the resolution/DPI for the image(s). However, I cannot find a way to do this for a MetaFile in C#. Is this possible or does EMF not have a DPI… >>> More

  • Recursion in Ecore-File?!

    as seen on Stack Overflow - Search for 'Stack Overflow'
    Hey guys, just tried to convert towards a Ecore-Model from a given UML-Model. After this I am trying to create a Generator Model. Everytime I try to do this I get the Error Message, that there is a "Unhandled event loop exception" with this log: org.eclipse.swt.SWTException: Failed to execute… >>> More

  • EMF to EPS Converter

    as seen on Super User - Search for 'Super User'
    I'm looking for (free) tools for converting images stored in EMF (Enhanced Metafile Format) format to EPS (Encapsulated Postscript). What features make your recommendation stand out? Edit: can you recommendation be used for batch processing? >>> More

  • AXway/tumbleweed EMF in exchange 2007

    as seen on Server Fault - Search for 'Server Fault'
    Looking for someone who has implemented an axway EMF recently. I'm about to implement an axway SM product for company wide email encryption. I current have an edge transport server and an exchange 2007 server. I want to route email like the follow: the edge picks up internet email to exchange and… >>> More

Related posts about ecore