Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 329107

Summary: Support default xml binding
Product: z_Archived Reporter: Konstantin Komissarchik <konstantin>
Component: SapphireAssignee: Konstantin Komissarchik <konstantin>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: ling.hao
Version: unspecifiedKeywords: plan
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Konstantin Komissarchik CLA 2010-10-29 16:25:24 EDT
There are cases when it is convenient to be able to take a model or a part of
a model and serialize it as XML without spending time specifying detailed
binding. This comes up, for instance, when debugging or writing unit tests.
To address this requirement, Sapphire should support default XML binding that
doesn't require any XML binding annotations to be used.
Comment 1 Konstantin Komissarchik CLA 2010-10-29 16:25:46 EDT
This feature has been implemented. Unit tests have been added. Documentation
is available under Sapphire Developer Guide -> Modeling Framework -> XML ->
Binding -> Default XML Binding.

Implementation Details

Default XML binding uses property and type names for element names in XML.
More formally:

1. A model element is mapped to an XML element whose name is derived from
model element type. The local type name is used (no package prefix) and the
'I' prefix is removed.

2. A property is mapped to an XML element whose name is equal to the property
name.

3. The value of a value property is stored as text content inside the
property's XML element.
Comment 2 Konstantin Komissarchik CLA 2010-11-16 12:19:34 EST
Marking as fixed.
Comment 3 Ling Hao CLA 2011-01-04 19:47:45 EST
Removed @XmlBinding from an example, and verify that default XML binding was generated as described in the docs.