Bug 435788 - Enable serialization/deseiralization for mixed content
Summary: Enable serialization/deseiralization for mixed content
Status: CLOSED WONTFIX
Alias: None
Product: Sphinx
Classification: Automotive
Component: Core (show other bugs)
Version: 0.8.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-26 10:25 EDT by Yue Ma CLA
Modified: 2024-05-07 00:13 EDT (History)
2 users (show)

See Also:


Attachments
Enable serialization/deseiralization for mixed content - figures (78.29 KB, application/x-zip-compressed)
2014-05-26 10:25 EDT, Yue Ma CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yue Ma CLA 2014-05-26 10:25:11 EDT
Created attachment 243492 [details]
Enable serialization/deseiralization for mixed content - figures

Currently the XMLPersistenceMapping saver and handler (XMLPersistenceMappingSavingImpl and XMLPersistenceMappingHandler) ignores the serialization/deserialization for mixed content.

For mixed elements, i.e., 
- XML Schema complexType with mixed="true", 
- or an Ecore Eclass with "kind"->"mixed", and with a feature map EAttribute of eType = "EFeatureMapEntry", and which includes the following entries in the details map of its extended metadata EAnnotation:
  "name"->":mixed" "kind"->"elementWildcard",
it should allow values of the derived references to be mixed with values of the special TEXT feature (XMLTypeDocumentRoot.text), which represents simple text.

An example could be found in the attached figures:
The "formula" attribute of EastADLErrorBehavior class is a FailureLogicFormula which is mixed of text and its other four references: externalFailure, processFault, internalFault and externalFault. Its super class FormulaExpression (figure mixed1.png) is of kind "mixed" with a "Formula" attribure as specified above.
The result should be a formula mixed of them, as in figure mixed3.png

==== proposed solution ====
- XMLPersistenceMappingHandler: a mixedTarget should also be poped from mixedTargets, when an object is poped from objects during the handling of endElement()
- XMLPersistenceMappingSavingImpl: override saveElementFeatureMap() to save the text
Comment 1 Balazs Grill CLA 2024-05-07 00:13:05 EDT
Closed stale issue before migration