Skip to main content



      Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Edapt] Unmodeled XML attributes got lost during migration
[Edapt] Unmodeled XML attributes got lost during migration [message #1767855] Tue, 11 July 2017 11:44 Go to next message
Eclipse UserFriend
Hi @all,

I want to migrate an EMF model, which tolerates unmodeled XML attributes during deserialization and serialization.

Background: Our customers use their own XML attributes to store custom information in their model files.

I'm using the model serialization mapping options "OPTION_KEEP_DEFAULT_CONTENT" and "OPTION_RECORD_UNKNOWN_FEATURE" in my ResourceFactory:

public class MyResourceFactoryImpl extends ResourceFactoryImpl {

    // ...

    @Override
    public Resource createResource(URI uri) {
        XMLResource result = (XMLResource) createResourceGen(uri);

        result.getDefaultSaveOptions()
                .put(XMLResource.OPTION_KEEP_DEFAULT_CONTENT, Boolean.TRUE);
        result.getDefaultLoadOptions()
                .put(XMLResource.OPTION_RECORD_UNKNOWN_FEATURE, Boolean.TRUE);
        // ...

        return result;
    }

    // ...

}


We didn't need migration until now and for the default use case (editing XML files with unmodeled attributes without losing those) this worked just fine. But now we have to do some migration with Edapt and these attributes got lost when saving the XML file after the migration process. Is there any way to convince Edapt about keeping those attributes?

Thanks in advance,

Sebastian
Re: [Edapt] Unmodeled XML attributes got lost during migration [message #1767981 is a reply to message #1767855] Wed, 12 July 2017 10:04 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

this is currently not supported by EDAPT and would be a new feature. Please let us know, if you are interested in a contribution or sponsoring.

Best regards
Jonas

--
Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Re: [Edapt] Unmodeled XML attributes got lost during migration [message #1768410 is a reply to message #1767981] Tue, 18 July 2017 08:24 Go to previous message
Eclipse UserFriend
Thanks, Jonas, that's good to know. I would like to contribute such a feature, but currently we don't have the capacities and the feature is not important enough for us. But if you can tell me some entry points where such feature can be implemented, I would be grateful. The tool is a great help for us, so if I can manage it, I would like to give something back.

For a first start, is there any process to improve the documentation?

And last but not least a question related to the topic: Does Edapt support keeping of XML comments from the unmigrated XML representation to the new one? And if so, how is it done?

Previous Topic:[EMF Forms] Table: Single column for different EStructuralFeatures
Next Topic:EMF Forms
Goto Forum:
  


Current Time: Thu Jun 12 22:00:28 EDT 2025

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

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

Back to the top