Skip to main content

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.

Jump to: navigation, search

EclipseLink/DesignDocs/293925

Design Specification: MOXy - OXM XSD

ER 293925

Document History

Date Author Version Description & Notes
2009/11/09 David McCann Initial Contribution. The work outlined in this design document is a continuation of the work done for ER 277920
2009/12/08 David McCann Bringing page up to date: xml schema, goals, etc. needed attention.

Project overview

Goals:

  • Support JAXB 2.1 annotations via XML external metadata.
  • Support MOXy metadata (used to extend JAXB) via external metadata.
  • Support the use of the XML metadata as a means to override metadata specified by annotations.

Note:

  • This work is a continuation of support added for ER 277920

Concepts

  • Although JAXB annotations can be applied independently they are logically linked. For example @XmlList can only be used with XmlElement, XmlAttribute, XmlValue, XmlIDREF. These rules will be enforced through the XML metadata.
  • Overriding will be handled at the property level.

Requirements

The following sections will expand the goals of this project into more concrete requirements.

Design Constraints

JAXB Annotations

The XML should have the same feel as the JAXB annotations.

javax.xml.bind.annotation Javadoc

EclipseLink JPA Metadata

The XML should have the same feel as the equivalent XML for EclipseLink JPA

EclipseLink JPA XSD

EclipseLink MOXy Metadata

At a minimum the metadata available in EclipseLink 2.1 must be available in the new format (see below).

High Level Design

JAXB 2.1 annotation support via XML external metadata

This support will be added as outlined in the following phases:

XML external metadata support for WebServices

TBD.

OXM mapping support via XML external metadata

Design for this portion of the project can be found here.

Design / Functionality

XML Schema

Design Notes

Design notes from 2.0 release

Annotations to XML

The following table outlines how annotations relate to schema components:

Annotation XML Global Element Global Attribute Local Element Local Attribute Enum
XmlAccessOrder xml-access-order X
XmlAccessorOrder xml-accessor-order X
XmlAccessorType xml-accessor-type X
XmlAccessType xml-access-type X
XmlAnyAttribute xml-any-attribute X
XmlAnyElement xml-any-element X
XmlAttribute xml-attribute X
XmlAttributeRef xml-attribute-ref X
XmlCustomizer (MOXy) xml-customizer X
XmlElement xml-element X
XmlElementDecl xml-element-decl X
XmlElements xml-elements X
XmlElementRef xml-element-ref X
XmlElementRefs xml-element-refs X
XmlElementWrapper xml-element-wrapper X
XmlEnum xml-enum X
XmlEnumValue xml-enum-value X
XmlID xml-id X
XmlIDREF xml-idref X
XmlInlineBinaryData xml-inline-binary-data X
XmlJavaTypeAdapter xml-java-type-adapter X
XmlJavaTypeAdapters xml-java-type-adapters X
XmlList xml-List X
N/A xml-map X
XmlMimeType xml-mime-type X
XmlMixed xml-mixed X
XmlNs xml-ns X
XmlNsForm xml-ns-form X
XmlRegistry xml-registry X
XmlRootElement xml-root-element X
XmlSchema xml-schema X
XmlSchemaType xml-schema-type X
XmlSchemaTypes xml-schema-types X
XmlSeeAlso xml-see-also X
XmlTransient xml-transient X
XmlType xml-type X
XmlValue xml-value X

Schema file

The schema file for EclipseLink 2.1 can be found in the eclipselink.jar here: xsd\eclipselink_oxm_2_1.xsd. The JAR can be downloaded on the EclipseLink nightly build page.

XML Bindings

Bindings info/example from 2.0

Boot Strapping

Specifying the Externalized Metadata File

Testing

The basic testing strategy will be to have a test suite for each annotation (JAXB) and mapping (MOXy). Each suite will, at a minimum, test schema generation, unmarshal and marshal operations.

API

GUI

Config files

Documentation

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

Future Considerations

During the research for this project the following items were identified as out of scope but are captured here as potential future enhancements. If agreed upon during the review process these should be logged in the bug system.

Back to the top