comparison src/share/classes/javax/xml/bind/annotation/package.html @ 0:0961a4a21176

Initial load
author duke
date Sat, 01 Dec 2007 00:00:00 +0000
parents
children 31822b475baa
comparison
equal deleted inserted replaced
-1:000000000000 0:e34299dcd560
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
2 <html>
3 <head>
4 <!--
5 Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved.
6 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
7
8 This code is free software; you can redistribute it and/or modify it
9 under the terms of the GNU General Public License version 2 only, as
10 published by the Free Software Foundation. Sun designates this
11 particular file as subject to the "Classpath" exception as provided
12 by Sun in the LICENSE file that accompanied this code.
13
14 This code is distributed in the hope that it will be useful, but WITHOUT
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17 version 2 for more details (a copy is included in the LICENSE file that
18 accompanied this code).
19
20 You should have received a copy of the GNU General Public License version
21 2 along with this work; if not, write to the Free Software Foundation,
22 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
23
24 Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
25 CA 95054 USA or visit www.sun.com if you need additional information or
26 have any questions.
27
28 -->
29 </head>
30
31 <body bgcolor="white">
32
33 <p>
34 Defines annotations for customizing Java program elements to XML Schema mapping.
35
36 <h2>Package Specification</h2>
37 <p>The following table shows the JAXB mapping annotations
38 that can be associated with each program element. </p>
39
40 <table border="1" cellpadding="4" cellspacing="3">
41 <tbody>
42 <tr>
43 <td><b>Program Element</td>
44 <td><b>JAXB annotation</b></td>
45 </tr>
46 <tr valign="top">
47 <td><b>Package</td>
48 <td>
49 <table>
50 <tr valign="top">
51 <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlAccessorOrder.html">XmlAccessorOrder</b></td>
52 </tr>
53 <tr valign="top">
54 <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlAccessorType.html">XmlAccessorType</b></td>
55 </tr>
56 <tr valign="top">
57 <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlSchema.html">XmlSchema</b></td>
58 </tr>
59 <tr valign="top">
60 <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlSchemaType.html">XmlSchemaType</b></td>
61 </tr>
62 <tr valign="top">
63 <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlSchemaTypes.html">XmlSchemaTypes</b></td>
64 </tr>
65 <tr valign="top">
66 <td><b><a HREF="../../../../javax/xml/bind/annotation/adapters/XmlJavaTypeAdapter.html">XmlJavaTypeAdapter</b></td>
67 </tr>
68 <tr valign="top">
69 <td><b><a HREF="../../../../javax/xml/bind/annotation/adapters/XmlJavaTypeAdapters.html">XmlJavaTypeAdapters</b></td>
70 </tr>
71 </table>
72 </td>
73 </tr>
74
75 <tr valign="top">
76 <td><b>Class</td>
77 <td>
78 <table>
79 <tr valign="top">
80 <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlAccessorOrder.html">XmlAccessorOrder</b></td>
81 </tr>
82 <tr valign="top">
83 <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlAccessorType.html">XmlAccessorType</b></td>
84 </tr>
85 <tr valign="top">
86 <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlInlineBinaryData.html">XmlInlineBinaryData</b></td>
87 </tr>
88 <tr valign="top">
89 <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlRootElement.html">XmlRootElement</b></td>
90 </tr>
91 <tr valign="top">
92 <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlType.html">XmlType</b></td>
93 </tr>
94 <tr valign="top">
95 <td><b><a HREF="../../../../javax/xml/bind/annotation/adapters/XmlJavaTypeAdapter.html">XmlJavaTypeAdapter</b></td>
96 </tr>
97 </table>
98 </td>
99 </tr>
100
101 <tr valign="top">
102 <td><b>Enum type</td>
103 <td>
104 <table>
105 <tr valign="top">
106 <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlEnum.html">XmlEnum</b></td>
107 </tr>
108 <tr valign="top">
109 <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlEnumValue.html">XmlEnumValue (enum constant only)</b></td>
110 </tr>
111 <tr valign="top">
112 <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlRootElement.html">XmlRootElement</b></td>
113 </tr>
114 <tr valign="top">
115 <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlType.html">XmlType</b></td>
116 </tr>
117 <tr valign="top">
118 <td><b><a HREF="../../../../javax/xml/bind/annotation/adapters/XmlJavaTypeAdapter.html">XmlJavaTypeAdapter</b></td>
119 </tr>
120 </table>
121 </td>
122 </tr>
123
124 <tr valign="top">
125 <td><b>JavaBean Property/field</td>
126 <td>
127 <table>
128 <tr valign="top">
129 <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlElement.html">XmlElement</b></td>
130 </tr>
131 <tr valign="top">
132 <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlElements.html">XmlElements</b></td>
133 </tr>
134 <tr valign="top">
135 <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlElementRef.html">XmlElementRef</b></td>
136 </tr>
137 <tr valign="top">
138 <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlElementRefs.html">XmlElementRefs</b></td>
139 </tr>
140 <tr valign="top">
141 <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlElementWrapper.html">XmlElementWrapper</b></td>
142 </tr>
143 <tr valign="top">
144 <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlAnyElement.html">XmlAnyElement</b></td>
145 </tr>
146 <tr valign="top">
147 <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlAttribute.html">XmlAttribute</b></td>
148 </tr>
149 <tr valign="top">
150 <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlAnyAttribute.html">XmlAnyAttribute</b></td>
151 </tr>
152 <tr valign="top">
153 <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlTransient.html">XmlTransient</b></td>
154 </tr>
155 <tr valign="top">
156 <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlValue.html">XmlValue</b></td>
157 </tr>
158 <tr valign="top">
159 <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlID.html">XmlID</b></td>
160 </tr>
161 <tr valign="top">
162 <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlIDREF.html">XmlIDREF</b></td>
163 </tr>
164 <tr valign="top">
165 <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlList.html">XmlList</b></td>
166 </tr>
167 <tr valign="top">
168 <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlMixed.html">XmlMixed</b></td>
169 </tr>
170 <tr valign="top">
171 <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlMimeType.html">XmlMimeType</b></td>
172 </tr>
173 <tr valign="top">
174 <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlAttachmentRef.html">XmlAttachmentRef</b></td>
175 </tr>
176 <tr valign="top">
177 <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlInlineBinaryData.html">XmlInlineBinaryData</b></td>
178 </tr>
179 <tr valign="top">
180 <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlElementDecl.html">XmlElementDecl (only on method)</b></td>
181 </tr>
182 <tr valign="top">
183 <td><b><a HREF="../../../../javax/xml/bind/annotation/adapters/XmlJavaTypeAdapter.html">XmlJavaTypeAdapter</b></td>
184 </tr>
185 </table>
186 </td>
187 </tr>
188
189 <tr valign="top">
190 <td><b>Parameter</td>
191 <td>
192 <table>
193 <tr valign="top">
194 <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlList.html">XmlList</b></td>
195 </tr>
196 <tr valign="top">
197 <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlAttachmentRef.html">XmlAttachmentRef</b></td>
198 </tr>
199 <tr valign="top">
200 <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlMimeType.html">XmlMimeType</b></td>
201 </tr>
202 <tr valign="top">
203 <td><b><a HREF="../../../../javax/xml/bind/annotation/adapters/XmlJavaTypeAdapter.html">XmlJavaTypeAdapter</b></td>
204 </tr>
205 </table>
206 </td>
207 </tr>
208
209 </tbody>
210 </table>
211 <h3>Terminology</h3>
212 <p>
213 <b>JavaBean property and field:</b> For the purposes of
214 mapping, there is no semantic difference between a field and
215 a JavaBean property. Thus, an annotation that can be applied
216 to a JavaBean property can always be applied to a
217 field. Hence in the Javadoc documentation, for brevity, the
218 term JavaBean property or property is used to mean either JavaBean
219 property or a field. Where required, both are explicitly
220 mentioned.
221 <p>
222 <b>top level class:</b> For the purpose of mapping, there is
223 no semantic difference between a top level class and a
224 static nested class. Thus, an annotation that can be applied
225 to a top level class, can always be applied to a nested
226 static class. Hence in the Javadoc documentation, for
227 brevity, the term "top level class" or just class is used to
228 mean either a top level class or a nested static
229 class.
230 <p>
231 <b>mapping annotation:</b>A JAXB 2.0 defined program
232 annotation based on the JSR 175 programming annotation
233 facility.
234 <h3>Common Usage Constraints</h3>
235 <p>The following usage constraints are defined here since
236 they apply to more than annotation:
237 <ul>
238 <li> For a property, a given annotation can be applied to
239 either read or write property but not both. </li>
240
241 <li> A property name must be different from any other
242 property name in any of the super classes of the
243 class being mapped. </li>
244
245 <li> A mapped field name or the decapitalized name of a
246 mapped property must be unique within a class. </li>
247 </ul>
248 <h3>Notations</h3>
249 <b>Namespace prefixes</b>
250 <p>The following namespace prefixes are used in the XML Schema
251 fragments in this package.<p>
252
253 <table border="1" cellpadding="4" cellspacing="3">
254 <tbody>
255 <tr>
256 <td><b>Prefix</td>
257 <td><b>Namespace</b></td>
258 <td><b>Notes</b></td>
259 </tr>
260
261 <tr valign="top">
262 <td>xs</td>
263 <td>http://www.w3.org/2001/XMLSchema</td>
264 <td>Namespace of XML Schema namespace</td>
265 </tr>
266 <tr valign="top">
267 <td>ref</td>
268 <td>http://ws-i.org/profiles/basic/1.1/xsd</td>
269 <td>Namespace for swaref schema component</td>
270 </tr>
271 <tr valign="top">
272 <td>xsi</td>
273 <td>http://www.w3.org/2001/XMLSchema-instance</td>
274 <td>XML Schema namespace for instances</td>
275 </tr>
276 </tbody>
277 </table>
278
279 <!-- Put @see and @since tags down here. -->
280 @since JAXB 2.0
281 </body>
282 </html>
283
284