--- a/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/annotation/XmlIDREF.java Thu Apr 09 06:40:17 2015 -0700
+++ b/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/annotation/XmlIDREF.java Fri Apr 10 14:54:20 2015 +0300
@@ -37,7 +37,7 @@
* <p>
* To preserve referential integrity of an object graph across XML
* serialization followed by a XML deserialization, requires an object
- * reference to be marshalled by reference or containment
+ * reference to be marshaled by reference or containment
* appropriately. Annotations <tt>@XmlID</tt> and <tt>@XmlIDREF</tt>
* together allow a customized mapping of a JavaBean property's
* type by containment or reference.
@@ -82,18 +82,19 @@
* public void setCustomer(Customer customer);
* ....
* }
+ * {@code
*
- * <!-- Example: XML Schema fragment -->
- * <xs:complexType name="Shipping">
- * <xs:complexContent>
- * <xs:sequence>
- * <xs:element name="customer" type="xs:IDREF"/>
+ * <!-- Example: XML Schema fragment -->
+ * <xs:complexType name="Shipping">
+ * <xs:complexContent>
+ * <xs:sequence>
+ * <xs:element name="customer" type="xs:IDREF"/>
* ....
- * </xs:sequence>
- * </xs:complexContent>
- * </xs:complexType>
+ * </xs:sequence>
+ * </xs:complexContent>
+ * </xs:complexType>
*
- * </pre>
+ * }</pre>
*
*
* <p><b>Example 2: </b> The following is a complete example of
@@ -142,64 +143,65 @@
* // maps reference to Invoice by containment by default.
* public Invoice getInvoice();
* }
+ * {@code
*
- * <!-- XML Schema mapping for above code frament -->
+ * <!-- XML Schema mapping for above code frament -->
*
- * <xs:complexType name="Invoice">
- * <xs:complexContent>
- * <xs:sequence>
- * <xs:element name="customer" type="xs:IDREF"/>
+ * <xs:complexType name="Invoice">
+ * <xs:complexContent>
+ * <xs:sequence>
+ * <xs:element name="customer" type="xs:IDREF"/>
* ....
- * </xs:sequence>
- * </xs:complexContent>
- * </xs:complexType>
+ * </xs:sequence>
+ * </xs:complexContent>
+ * </xs:complexType>
*
- * <xs:complexType name="Shipping">
- * <xs:complexContent>
- * <xs:sequence>
- * <xs:element name="customer" type="xs:IDREF"/>
+ * <xs:complexType name="Shipping">
+ * <xs:complexContent>
+ * <xs:sequence>
+ * <xs:element name="customer" type="xs:IDREF"/>
* ....
- * </xs:sequence>
- * </xs:complexContent>
- * </xs:complexType>
+ * </xs:sequence>
+ * </xs:complexContent>
+ * </xs:complexType>
*
- * <xs:complexType name="Customer">
- * <xs:complexContent>
- * <xs:sequence>
+ * <xs:complexType name="Customer">
+ * <xs:complexContent>
+ * <xs:sequence>
* ....
- * </xs:sequence>
- * <xs:attribute name="CustomerID" type="xs:ID"/>
- * </xs:complexContent>
- * </xs:complexType>
+ * </xs:sequence>
+ * <xs:attribute name="CustomerID" type="xs:ID"/>
+ * </xs:complexContent>
+ * </xs:complexType>
*
- * <xs:complexType name="CustomerData">
- * <xs:complexContent>
- * <xs:sequence>
- * <xs:element name="customer" type="xs:Customer"/>
- * <xs:element name="shipping" type="xs:Shipping"/>
- * <xs:element name="invoice" type="xs:Invoice"/>
- * </xs:sequence>
- * </xs:complexContent>
- * </xs:complexType>
+ * <xs:complexType name="CustomerData">
+ * <xs:complexContent>
+ * <xs:sequence>
+ * <xs:element name="customer" type="xs:Customer"/>
+ * <xs:element name="shipping" type="xs:Shipping"/>
+ * <xs:element name="invoice" type="xs:Invoice"/>
+ * </xs:sequence>
+ * </xs:complexContent>
+ * </xs:complexType>
*
- * <xs:element name"customerData" type="xs:CustomerData"/>
+ * <xs:element name"customerData" type="xs:CustomerData"/>
*
- * <!-- Instance document conforming to the above XML Schema -->
- * <customerData>
- * <customer customerID="Alice">
+ * <!-- Instance document conforming to the above XML Schema -->
+ * <customerData>
+ * <customer customerID="Alice">
* ....
- * </customer>
+ * </customer>
*
- * <shipping customer="Alice">
+ * <shipping customer="Alice">
* ....
- * </shipping>
+ * </shipping>
*
- * <invoice customer="Alice">
+ * <invoice customer="Alice">
* ....
- * </invoice>
- * </customerData>
+ * </invoice>
+ * </customerData>
*
- * </pre>
+ * }</pre>
*
* <p><b>Example 3: </b> Mapping List to repeating element of type IDREF
* <pre>
@@ -209,16 +211,17 @@
* @XmlElement(name="Alice")
* public List customers;
* }
+ * {@code
*
- * <!-- XML schema fragment -->
- * <xs:complexType name="Shipping">
- * <xs:sequence>
- * <xs:choice minOccurs="0" maxOccurs="unbounded">
- * <xs:element name="Alice" type="xs:IDREF"/>
- * </xs:choice>
- * </xs:sequence>
- * </xs:complexType>
- * </pre>
+ * <!-- XML schema fragment -->
+ * <xs:complexType name="Shipping">
+ * <xs:sequence>
+ * <xs:choice minOccurs="0" maxOccurs="unbounded">
+ * <xs:element name="Alice" type="xs:IDREF"/>
+ * </xs:choice>
+ * </xs:sequence>
+ * </xs:complexType>
+ * }</pre>
*
* <p><b>Example 4: </b> Mapping a List to a list of elements of type IDREF.
* <pre>
@@ -230,17 +233,18 @@
* @XmlElement(name="John", type="InternationalCustomer.class")
* public List customers;
* }
+ * {@code
*
- * <!-- XML Schema fragment -->
- * <xs:complexType name="Shipping">
- * <xs:sequence>
- * <xs:choice minOccurs="0" maxOccurs="unbounded">
- * <xs:element name="Alice" type="xs:IDREF"/>
- * <xs:element name="John" type="xs:IDREF"/>
- * </xs:choice>
- * </xs:sequence>
- * </xs:complexType>
- * </pre>
+ * <!-- XML Schema fragment -->
+ * <xs:complexType name="Shipping">
+ * <xs:sequence>
+ * <xs:choice minOccurs="0" maxOccurs="unbounded">
+ * <xs:element name="Alice" type="xs:IDREF"/>
+ * <xs:element name="John" type="xs:IDREF"/>
+ * </xs:choice>
+ * </xs:sequence>
+ * </xs:complexType>
+ * }</pre>
* @author Sekhar Vajjhala, Sun Microsystems, Inc.
* @see XmlID
* @since 1.6, JAXB 2.0