Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "EclipseLink/DesignDocs/293925/MOXyExtensions/XmlBinaryDataMapping"
(New page: <div style="border: 1px solid rgb(0, 0, 0); margin: 5px; padding: 5px; float: right;">__TOC__</div> = XMLBinaryDataMapping = == Requirements == Provide support for XML binary data mappin...) |
(No difference)
|
Revision as of 12:37, 31 March 2010
XMLBinaryDataMapping
Requirements
Provide support for XML binary data mapping configuration via XML metadata file.
The following should be configurable:
Design
Basic XML binary data mapping support
We will extend our current xml-element
and xml-attribute
support to allow binary data mapping configuration. For example, the following XML metadata snippet would be used to setup a binary data mapping for 'bytes' (where bytes is a byte[] in the object model):
<xml-attribute java-attribute="bytes" />
The same thing mapped to 'mybytes':
<xml-attribute java-attribute="bytes" xml-path="@mybytes" />
Example:
The following example will demonstrate how to configure XML binary data mappings via XML metadata by using xml-element
and xml-attribute
.
org.example.MyData.java
package org.example; public class MyData { public byte[] bytes; }
Deployment XML
XML Instance Document
<?xml version="1.0" encoding="UTF-8"?> <my-data mybytes="AAECAw=="/>
org/example/eclipselink-oxm.xml
This XML file demonstrates configuring XML binary data mappings on the "org.example.MyData" class.
<?xml version="1.0" encoding="US-ASCII"?> <xml-bindings xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <java-types> <java-type name="org.example.MyData"> <xml-root-element name="my-data" /> <java-attributes> <xml-attribute java-attribute="bytes" xml-path="@mybytes" /> </java-attributes> </java-type> </java-types> </xml-bindings>
Open Issues
This section lists the open issues that are still pending that must be decided prior to fully implementing this project's requirements.
Issue# | Owner | Description/Notes |
---|---|---|
Decisions
This section lists decisions made. These are intended to document the resolution of open issues or constraints added to the project that are important.
Issue# | Description/Notes | Decision |
---|---|---|