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

Difference between revisions of "EclipseLink/DesignDocs/317962/Phase3"

(Phase 3 - MOXy Equavilents of EclipseLink JPA Annotations)
(XML Schema)
Line 48: Line 48:
 
==== xml-discriminator-node ====
 
==== xml-discriminator-node ====
 
The <code>xml-discriminator-node</code> metadata tag will be used to set the class type indicator when using inheritance.  The value will be in the form of an XPath to an attribute, i.e. <code>xsi:type</code>.
 
The <code>xml-discriminator-node</code> metadata tag will be used to set the class type indicator when using inheritance.  The value will be in the form of an XPath to an attribute, i.e. <code>xsi:type</code>.
==== XML Schema ====
+
==== XML Schema ====
Following is the proposed XSD change for this support:
+
 
<source lang="xml">
+
Following is the proposed XSD change for this support: <source lang="xml">
 
<xs:element name="java-type">
 
<xs:element name="java-type">
 
     <xs:complexType>
 
     <xs:complexType>
Line 72: Line 72:
 
         <xs:attribute name="xml-accessor-type" type="xml-access-type" default="PUBLIC_MEMBER" />
 
         <xs:attribute name="xml-accessor-type" type="xml-access-type" default="PUBLIC_MEMBER" />
 
         <xs:attribute name="xml-customizer" type="xs:string" />
 
         <xs:attribute name="xml-customizer" type="xs:string" />
         <b><xs:attribute name="xml-discriminator-node" type="xs:string" /></b>
+
         '''<xs:attribute name="xml-discriminator-node" type="xs:string" />'''
 
         <xs:attribute name="xml-inline-binary-data" type="xs:boolean" default="false" />
 
         <xs:attribute name="xml-inline-binary-data" type="xs:boolean" default="false" />
 
         <xs:attribute name="xml-transient" type="xs:boolean" default="false" />
 
         <xs:attribute name="xml-transient" type="xs:boolean" default="false" />
Line 78: Line 78:
 
</xs:element>
 
</xs:element>
 
</source>
 
</source>
 +
 
=== Example:  ===
 
=== Example:  ===
 
The following example will demonstrate ...
 
The following example will demonstrate ...

Revision as of 11:59, 17 August 2010

Phase 3 - MOXy Equavilents of EclipseLink JPA Annotations

This phase of development involves providing additional MOXy annotations and XML metadata support equivalent to that of EclipseLink JPA.

Annotations/XML Metadata

The following MOXy annotations/XML metadata will be targeted in this phase:

MOXy Annotation XML Metadata Tag Package Type Field Method
XmlDescriminatorNode xml-discriminator-node X
XmlDescriminatorValue xml-discriminator-value X

XmlDescriminatorNode

Purpose

Provide a means to set the class type indicator when using inheritance.

Java Metadata

package org.eclipse.persistence.oxm.annotations;
 
@Target({TYPE}) 
@Retention(RUNTIME)
public @interface XmlDiscriminatorNode {
    String value();
}

XML Metadata

xml-discriminator-node

The xml-discriminator-node metadata tag will be used to set the class type indicator when using inheritance. The value will be in the form of an XPath to an attribute, i.e. xsi:type.

XML Schema

Following is the proposed XSD change for this support:
<xs:element name="java-type">
    <xs:complexType>
        <xs:all>
            <xs:element ref="xml-type" minOccurs="0"/>
            <xs:element ref="xml-root-element" minOccurs="0"/>
            <xs:element ref="xml-see-also" minOccurs="0"/>
            <xs:element ref="xml-java-type-adapter" minOccurs="0"/>
            <xs:element ref="xml-class-extractor" minOccurs="0"/>
            <xs:element ref="xml-properties" minOccurs="0" />
            <xs:element name="java-attributes" minOccurs="0">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element ref="java-attribute" minOccurs="0" maxOccurs="unbounded" />
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:all>
        <xs:attribute name="name" type="xs:string" />
        <xs:attribute name="xml-accessor-order" type="xml-access-order" default="UNDEFINED" />
        <xs:attribute name="xml-accessor-type" type="xml-access-type" default="PUBLIC_MEMBER" />
        <xs:attribute name="xml-customizer" type="xs:string" />
        '''<xs:attribute name="xml-discriminator-node" type="xs:string" />'''
        <xs:attribute name="xml-inline-binary-data" type="xs:boolean" default="false" />
        <xs:attribute name="xml-transient" type="xs:boolean" default="false" />
    </xs:complexType>
</xs:element>

Example:

The following example will demonstrate ...

Testing

This section identifies the test package(s) for each feature outlined on this page.

XML Metadata

XML Metadata Package

Annotations

Annotation Package

Open Issues

This section lists open issues.

Issue# Description/Notes
1

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.

Decision# Description/Notes Decision
1

Back to the top