< prev index next >

src/java.xml.bind/share/classes/javax/xml/bind/annotation/XmlValue.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 65,75 **** * * <li>If the type of the field or property is not a collection * type, then the type must map to a XML Schema simple type. </li> * * </ul> - * </p> * <p> * If the annotated JavaBean property is the sole class member being * mapped to XML Schema construct, then the class is mapped to a * simple type. * --- 65,74 ----
*** 87,100 **** * public class USPrice { * @XmlValue * public java.math.BigDecimal price; * } * ! * &lt;!-- Example 1: XML Schema fragment --> ! * &lt;xs:simpleType name="USPrice"> ! * &lt;xs:restriction base="xs:decimal"/> ! * &lt;/xs:simpleType> * * </pre> * * <p><b> Example 2: </b> Map a class to XML Schema complexType with * with simpleContent.</p> --- 86,99 ---- * public class USPrice { * @XmlValue * public java.math.BigDecimal price; * } * ! * &lt;!-- Example 1: XML Schema fragment --&gt; ! * &lt;xs:simpleType name="USPrice"&gt; ! * &lt;xs:restriction base="xs:decimal"/&gt; ! * &lt;/xs:simpleType&gt; * * </pre> * * <p><b> Example 2: </b> Map a class to XML Schema complexType with * with simpleContent.</p>
*** 108,128 **** * * @XmlAttribute * public String currency; * } * ! * &lt;!-- Example 2: XML Schema fragment --> ! * &lt;xs:complexType name="InternationalPrice"> ! * &lt;xs:simpleContent> ! * &lt;xs:extension base="xs:decimal"> ! * &lt;xs:attribute name="currency" type="xs:string"/> ! * &lt;/xs:extension> ! * &lt;/xs:simpleContent> ! * &lt;/xs:complexType> * * </pre> - * </p> * * @author Sekhar Vajjhala, Sun Microsystems, Inc. * @see XmlType * @since 1.6, JAXB 2.0 */ --- 107,126 ---- * * @XmlAttribute * public String currency; * } * ! * &lt;!-- Example 2: XML Schema fragment --&gt; ! * &lt;xs:complexType name="InternationalPrice"&gt; ! * &lt;xs:simpleContent&gt; ! * &lt;xs:extension base="xs:decimal"&gt; ! * &lt;xs:attribute name="currency" type="xs:string"/&gt; ! * &lt;/xs:extension&gt; ! * &lt;/xs:simpleContent&gt; ! * &lt;/xs:complexType&gt; * * </pre> * * @author Sekhar Vajjhala, Sun Microsystems, Inc. * @see XmlType * @since 1.6, JAXB 2.0 */
< prev index next >