Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 329107 - Support default xml binding
Summary: Support default xml binding
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Sapphire (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Konstantin Komissarchik CLA
QA Contact:
URL:
Whiteboard:
Keywords: plan
Depends on:
Blocks:
 
Reported: 2010-10-29 16:25 EDT by Konstantin Komissarchik CLA
Modified: 2021-11-19 09:21 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.