Skip to main content
summaryrefslogtreecommitdiffstats
blob: bb10ce4894f792d4acbfc53b462f50d5366a6a82 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
<?xml version="1.0" encoding="UTF-8"?>
<!--
******************************************************************************
 Copyright (c) 1998, 2010 Oracle. All rights reserved.
 This program and the accompanying materials are made available under the 
 terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
 which accompanies this distribution. 
 The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
 and the Eclipse Distribution License is available at 
 http://www.eclipse.org/org/documents/edl-v10.php.

 Contributors:
     dmccann - November 24/2009 - 2.0 - Initial implementation
*****************************************************************************/
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" 
    xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm"
    targetNamespace="http://www.eclipse.org/eclipselink/xsds/persistence/oxm" 
    elementFormDefault="qualified"
    attributeFormDefault="unqualified"
    version="2.0">

    <xs:element name="xml-bindings">
        <xs:complexType>
            <xs:all>
                <xs:element ref="xml-schema" minOccurs="0"/>
                <xs:element ref="xml-java-type-adapters" minOccurs="0"/>
                <xs:element name="java-types" minOccurs="0">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element ref="java-type" minOccurs="0" maxOccurs="unbounded" />
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
            </xs:all>
            <xs:attribute name="xml-accessor-type" type="xml-access-type" default="PUBLIC_MEMBER" />
            <xs:attribute name="xml-accessor-order" type="xml-access-order" default="UNDEFINED" />
        </xs:complexType>
    </xs:element>
    <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 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-transient" type="xs:boolean" default="false" />
            <xs:attribute name="xml-customizer" type="xs:string" />
            <xs:attribute name="xml-accessor-type" type="xml-access-type" default="PUBLIC_MEMBER" />
            <xs:attribute name="xml-accessor-order" type="xml-access-order" default="UNDEFINED" />
        </xs:complexType>
    </xs:element>
    <xs:element name="java-attribute" type="java-attribute" />
    <xs:complexType name="java-attribute" abstract="true">
        <xs:attribute name="java-attribute" type="xs:string" />
    </xs:complexType>

    <!-- Enums -->
    <xs:simpleType name="xml-access-order">
        <xs:restriction base="xs:string">
            <xs:enumeration value="ALPHABETICAL" />
            <xs:enumeration value="UNDEFINED" />
        </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="xml-access-type">
        <xs:restriction base="xs:string">
            <xs:enumeration value="FIELD" />
            <xs:enumeration value="NONE" />
            <xs:enumeration value="PROPERTY" />
            <xs:enumeration value="PUBLIC_MEMBER" />
        </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="xml-ns-form">
        <xs:restriction base="xs:string">
            <xs:enumeration value="UNQUALIFIED" />
            <xs:enumeration value="QUALIFIED" />
            <xs:enumeration value="UNSET" />
        </xs:restriction>
    </xs:simpleType>

    <!-- @Target(value=PACKAGE) -->
    <xs:element name="xml-schema">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="xml-ns" minOccurs="0" maxOccurs="unbounded">
                    <xs:complexType>
                        <xs:attribute name="namespace-uri" type="xs:string" />
                        <xs:attribute name="prefix" type="xs:string" />
                    </xs:complexType>
                </xs:element>
            </xs:sequence>
            <xs:attribute name="attribute-form-default" type="xml-ns-form" default="UNSET" />
            <xs:attribute name="element-form-default" type="xml-ns-form" default="UNSET" />
            <xs:attribute name="location" type="xs:string" />
            <xs:attribute name="namespace" type="xs:string" />
        </xs:complexType>
    </xs:element>
    <xs:element name="xml-java-type-adapters">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="xml-java-type-adapter" minOccurs="0" maxOccurs="unbounded" />
            </xs:sequence>
        </xs:complexType>
    </xs:element>

    <!-- @Target(value={FIELD,METHOD,PACKAGE}) -->

    <!-- @Target(value={PACKAGE,FIELD,METHOD,TYPE,PARAMETER}) -->
    <xs:element name="xml-java-type-adapter" substitutionGroup="java-attribute">
        <xs:complexType>
            <xs:complexContent>
                <xs:extension base="java-attribute">
                    <xs:attribute name="value" type="xs:string" />
                    <xs:attribute name="type" type="xs:string" default="javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter.DEFAULT" />
                </xs:extension>
            </xs:complexContent>
        </xs:complexType>
    </xs:element>

    <!-- @Target(value={FIELD,METHOD,TYPE}) -->
    <xs:element name="xml-transient" substitutionGroup="java-attribute">
        <xs:complexType>
            <xs:complexContent>
                <xs:extension base="java-attribute" />
            </xs:complexContent>
        </xs:complexType>
    </xs:element>

    <!-- @Target(value=TYPE) -->
    <xs:element name="xml-type">
        <xs:complexType>
            <xs:attribute name="name" type="xs:string" default="##default" />
            <xs:attribute name="namespace" type="xs:string" default="##default" />
            <xs:attribute name="prop-order">
                <xs:simpleType>
                    <xs:list itemType="xs:string" />
                </xs:simpleType>
            </xs:attribute>
        </xs:complexType>
    </xs:element>
    <xs:element name="xml-root-element">
        <xs:complexType>
            <xs:attribute name="name" type="xs:string" default="##default" />
            <xs:attribute name="namespace" type="xs:string" default="##default" />
        </xs:complexType>
    </xs:element>
    <xs:element name="xml-see-also">
        <xs:simpleType>
            <xs:list itemType="xs:string" />
        </xs:simpleType>
    </xs:element>

    <!-- @Target(value={FIELD})  -->

    <!-- @Target(value={FIELD,METHOD}) -->
    <xs:element name="xml-any-attribute" substitutionGroup="java-attribute">
        <xs:complexType>
            <xs:complexContent>
                <xs:extension base="java-attribute" />
            </xs:complexContent>
        </xs:complexType>
    </xs:element>
    <xs:element name="xml-attribute" substitutionGroup="java-attribute">
        <xs:complexType>
            <xs:complexContent>
                <xs:extension base="java-attribute">
                    <xs:all>
                        <xs:element ref="xml-java-type-adapter" minOccurs="0"/>
                    </xs:all>
                    <xs:attribute name="name" type="xs:string" default="##default" />
                    <xs:attribute name="namespace" type="xs:string" default="##default" />
                    <xs:attribute name="required" type="xs:boolean" default="false" />
                    <xs:attribute name="xml-id" type="xs:boolean" default="false" />
                    <xs:attribute name="xml-idref" type="xs:boolean" default="false" />
                    <xs:attribute name="xml-list" type="xs:boolean" default="false" />
                    <xs:attribute name="xml-attachment-ref" type="xs:boolean" default="false" />
                    <xs:attribute name="xml-mime-type" type="xs:string" />
                </xs:extension>
            </xs:complexContent>
        </xs:complexType>
    </xs:element>
    <xs:element name="xml-any-element" substitutionGroup="java-attribute">
        <xs:complexType>
            <xs:complexContent>
                <xs:extension base="java-attribute">
                    <xs:all>
                        <xs:element ref="xml-java-type-adapter" minOccurs="0"/>
                    </xs:all>
                    <xs:attribute name="xml-mixed" type="xs:boolean" default="false" />
                    <xs:attribute name="lax" type="xs:boolean" default="false" />
                    <xs:attribute name="dom-handler" type="xs:string" default="javax.xml.bind.annotation.W3CDomHandler" />
                </xs:extension>
            </xs:complexContent>
        </xs:complexType>
    </xs:element>
    <xs:element name="xml-element" substitutionGroup="java-attribute">
        <xs:complexType>
            <xs:complexContent>
                <xs:extension base="java-attribute">
                    <xs:all>
                        <xs:element ref="xml-element-wrapper" minOccurs="0"/>
                        <xs:element ref="xml-java-type-adapter" minOccurs="0"/>
                        <xs:element ref="xml-map" minOccurs="0"/>
                    </xs:all>
                    <xs:attribute name="name" type="xs:string" default="##default" />
                    <xs:attribute name="namespace" type="xs:string" default="##default" />
                    <xs:attribute name="default-value" type="xs:string" />
                    <xs:attribute name="nillable" type="xs:boolean" default="false" />
                    <xs:attribute name="required" type="xs:boolean" default="false" />
                    <xs:attribute name="type" type="xs:string" default="javax.xml.bind.annotation.XmlElement.DEFAULT" />
                    <xs:attribute name="xml-id" type="xs:boolean" default="false" />
                    <xs:attribute name="xml-idref" type="xs:boolean" default="false" />
                    <xs:attribute name="xml-list" type="xs:boolean" default="false" />
                    <xs:attribute name="xml-attachment-ref" type="xs:boolean" default="false" />
                    <xs:attribute name="xml-mime-type" type="xs:string" />
                </xs:extension>
            </xs:complexContent>
        </xs:complexType>
    </xs:element>
    <xs:element name="xml-element-wrapper">
        <xs:complexType>
            <xs:attribute name="name" type="xs:string" default="##default" />
            <xs:attribute name="namespace" type="xs:string" default="##default" />
            <xs:attribute name="nillable" type="xs:boolean" default="false" />
            <xs:attribute name="required" type="xs:boolean" default="false" />
        </xs:complexType>
    </xs:element>
    <xs:element name="xml-value" substitutionGroup="java-attribute">
        <xs:complexType>
            <xs:complexContent>
                <xs:extension base="java-attribute" />
            </xs:complexContent>
        </xs:complexType>
    </xs:element>
    <xs:element name="xml-map">
        <xs:complexType>
            <xs:all>
                <xs:element name="key" minOccurs="0">
                    <xs:complexType>
                        <xs:attribute name="type" type="xs:string" />
                    </xs:complexType>
                </xs:element>
                <xs:element name="value" minOccurs="0">
                    <xs:complexType>
                        <xs:attribute name="type" type="xs:string" />
                    </xs:complexType>
                </xs:element>
            </xs:all>
        </xs:complexType> 
    </xs:element>
</xs:schema>

Back to the top