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