Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Load with customized XML format
Load with customized XML format [message #417439] Mon, 10 March 2008 19:23 Go to next message
Lesley Macomber is currently offline Lesley MacomberFriend
Messages: 7
Registered: July 2009
Junior Member
I am using an EcoreToXMLExtendedMetaData to save and load a model in
customized XML format. The save portion is working correctly for the
components I have implemented. However, when I try to load the XML
format, some elements are not converted to their original EClass.

For example, my saved XML contains a property-spec which contains a
sub-element "conformance-class" which is of type ConformanceClass (a base
object). Upon load, the "conformance-class" is not translated into its
initial class type of ConformanceClass. In fact, the "conformance-class"
does not appear in the delegateXMLMap, extendedMetaData or the
NameToClassifierMap. Any object that is not an inherited does not appear
in the maps.

ConformanceClass is defined in my Ecore2XML model as:

Key: ConformanceClass [com.s1.pmt.common.ConformanceClass]
name: ConformanceClass [com.s1.pmt.common.ConformanceClass]
XMLRepresentation: 0

The declaration for ConformanceClass is:

public class ConformanceClass {

.....
}

Any help would be great. Thanks,

Lesley
Re: Load with customized XML format [message #417440 is a reply to message #417439] Mon, 10 March 2008 19:37 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Lesley,

I don't have a lot of person experience in how to use these things. I'm
also not able to understand much of what's going on just from your
verbal description. If you gather up your code as exported projects
that include a test case or example that demonstrates the issue I can
have a close look at the running example and associated model.
Modifying the generated *.tests project's XyzExample.java is a good way
of providing an example that would be easy for me to run. I'm not sure
this stuff is much good for introducing and recognizing cases where
levels of nested are introduced, but then I'm not even sure what your
XML looks like...


Lesley Macomber wrote:
>
> I am using an EcoreToXMLExtendedMetaData to save and load a model in
> customized XML format. The save portion is working correctly for the
> components I have implemented. However, when I try to load the XML
> format, some elements are not converted to their original EClass.
>
> For example, my saved XML contains a property-spec which contains a
> sub-element "conformance-class" which is of type ConformanceClass (a
> base object). Upon load, the "conformance-class" is not translated
> into its
> initial class type of ConformanceClass. In fact, the
> "conformance-class" does not appear in the delegateXMLMap,
> extendedMetaData or the NameToClassifierMap. Any object that is not
> an inherited does not appear in the maps.
>
> ConformanceClass is defined in my Ecore2XML model as:
>
> Key: ConformanceClass [com.s1.pmt.common.ConformanceClass]
> name: ConformanceClass [com.s1.pmt.common.ConformanceClass]
> XMLRepresentation: 0
>
> The declaration for ConformanceClass is:
>
> public class ConformanceClass {
>
> .....
> }
>
> Any help would be great. Thanks,
>
> Lesley
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:TRANSACTION: using transactional editing domain from wizard
Next Topic:Live validation, trasaction and triggers
Goto Forum:
  


Current Time: Fri Apr 26 04:37:39 GMT 2024

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

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

Back to the top