jaxws/src/java.xml.bind/share/classes/javax/xml/bind/annotation/XmlSchema.java
author aefimov
Sun, 18 Jun 2017 23:07:25 +0100
changeset 45678 65fdff10664d
parent 32795 5a5710ee05a0
permissions -rw-r--r--
8176508: Update JAX-WS RI integration to latest version Reviewed-by: lancea, mchung, alanb, iris
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
     1
/*
28887
88470f768658 8071585: Update JAX-WS RI integration to latest version (2.2.11-b150127.1410)
aefimov
parents: 25871
diff changeset
     2
 * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
     4
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    10
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    15
 * accompanied this code).
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    16
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    20
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    23
 * questions.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    24
 */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    25
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    26
package javax.xml.bind.annotation;
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    27
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    28
import java.lang.annotation.Retention;
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    29
import java.lang.annotation.Target;
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    30
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    31
import static java.lang.annotation.ElementType.*;
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    32
import static java.lang.annotation.RetentionPolicy.*;
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    33
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    34
/**
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    35
 * <p> Maps a package name to a XML namespace. </p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    36
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    37
 * <h3>Usage</h3>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    38
 * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    39
 * The XmlSchema annotation can be used with the following program
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    40
 * elements:
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    41
 * <ul>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    42
 *   <li>package</li>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    43
 * </ul>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    44
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    45
 * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    46
 * This is a package level annotation and follows the recommendations
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    47
 * and restrictions contained in JSR 175, section III, "Annotations".
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    48
 * Thus the usage is subject to the following constraints and
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    49
 * recommendations.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    50
 * <ul>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    51
 *   <li> There can only be one package declaration as noted in JSR
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    52
 *        175, section III, "Annotations". </li>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    53
 *   <li> JSR 175 recommends package-info.java for package level
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    54
 *        annotations. JAXB Providers that follow this recommendation
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    55
 *        will allow the package level annotations to be defined in
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    56
 *        package-info.java.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    57
 * </ul>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    58
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    59
 * <p><b>Example 1:</b> Customize name of XML namespace to which
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    60
 * package is mapped.</p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    61
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    62
 * <pre>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    63
 *    &#64;javax.xml.bind.annotation.XmlSchema (
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    64
 *      namespace = "http://www.example.com/MYPO1"
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    65
 *    )
29839
6d5d546e953b 8076549: Update JAX-WS RI integration to latest version (2.2.11-b150402.1412)
aefimov
parents: 28887
diff changeset
    66
 * {@code
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    67
 *
29839
6d5d546e953b 8076549: Update JAX-WS RI integration to latest version (2.2.11-b150402.1412)
aefimov
parents: 28887
diff changeset
    68
 *    <!-- XML Schema fragment -->
6d5d546e953b 8076549: Update JAX-WS RI integration to latest version (2.2.11-b150402.1412)
aefimov
parents: 28887
diff changeset
    69
 *    <schema
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    70
 *      xmlns=...
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    71
 *      xmlns:po=....
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    72
 *      targetNamespace="http://www.example.com/MYPO1"
29839
6d5d546e953b 8076549: Update JAX-WS RI integration to latest version (2.2.11-b150402.1412)
aefimov
parents: 28887
diff changeset
    73
 *    >
6d5d546e953b 8076549: Update JAX-WS RI integration to latest version (2.2.11-b150402.1412)
aefimov
parents: 28887
diff changeset
    74
 *    <!-- prefixes generated by default are implementation
6d5d546e953b 8076549: Update JAX-WS RI integration to latest version (2.2.11-b150402.1412)
aefimov
parents: 28887
diff changeset
    75
 *            depedenent -->
6d5d546e953b 8076549: Update JAX-WS RI integration to latest version (2.2.11-b150402.1412)
aefimov
parents: 28887
diff changeset
    76
 * }</pre>
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    77
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    78
 * <p><b>Example 2:</b> Customize namespace prefix, namespace URI
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    79
 * mapping</p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    80
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    81
 * <pre>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    82
 *    // Package level annotation
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    83
 *    &#64;javax.xml.bind.annotation.XmlSchema (
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    84
 *      xmlns = {
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    85
 *        &#64;javax.xml.bind.annotation.XmlNs(prefix = "po",
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    86
 *                   namespaceURI="http://www.example.com/myPO1"),
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    87
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    88
 *        &#64;javax.xml.bind.annotation.XmlNs(prefix="xs",
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    89
 *                   namespaceURI="http://www.w3.org/2001/XMLSchema")
29839
6d5d546e953b 8076549: Update JAX-WS RI integration to latest version (2.2.11-b150402.1412)
aefimov
parents: 28887
diff changeset
    90
 *      }
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    91
 *    )
29839
6d5d546e953b 8076549: Update JAX-WS RI integration to latest version (2.2.11-b150402.1412)
aefimov
parents: 28887
diff changeset
    92
 * {@code
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    93
 *
29839
6d5d546e953b 8076549: Update JAX-WS RI integration to latest version (2.2.11-b150402.1412)
aefimov
parents: 28887
diff changeset
    94
 *    <!-- XML Schema fragment -->
6d5d546e953b 8076549: Update JAX-WS RI integration to latest version (2.2.11-b150402.1412)
aefimov
parents: 28887
diff changeset
    95
 *    <schema
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    96
 *        xmlns:xs="http://www.w3.org/2001/XMLSchema"
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    97
 *        xmlns:po="http://www.example.com/PO1"
29839
6d5d546e953b 8076549: Update JAX-WS RI integration to latest version (2.2.11-b150402.1412)
aefimov
parents: 28887
diff changeset
    98
 *        targetNamespace="http://www.example.com/PO1">
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    99
 *
29839
6d5d546e953b 8076549: Update JAX-WS RI integration to latest version (2.2.11-b150402.1412)
aefimov
parents: 28887
diff changeset
   100
 * }</pre>
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   101
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   102
 * <p><b>Example 3:</b> Customize elementFormDefault</p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   103
 * <pre>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   104
 *    &#64;javax.xml.bind.annotation.XmlSchema (
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   105
 *      elementFormDefault=XmlNsForm.UNQUALIFIED
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   106
 *      ...
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   107
 *    )
29839
6d5d546e953b 8076549: Update JAX-WS RI integration to latest version (2.2.11-b150402.1412)
aefimov
parents: 28887
diff changeset
   108
 * {@code
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   109
 *
29839
6d5d546e953b 8076549: Update JAX-WS RI integration to latest version (2.2.11-b150402.1412)
aefimov
parents: 28887
diff changeset
   110
 *    <!-- XML Schema fragment -->
6d5d546e953b 8076549: Update JAX-WS RI integration to latest version (2.2.11-b150402.1412)
aefimov
parents: 28887
diff changeset
   111
 *    <schema
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   112
 *        xmlns="http://www.w3.org/2001/XMLSchema"
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   113
 *        xmlns:po="http://www.example.com/PO1"
29839
6d5d546e953b 8076549: Update JAX-WS RI integration to latest version (2.2.11-b150402.1412)
aefimov
parents: 28887
diff changeset
   114
 *        elementFormDefault="unqualified">
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   115
 *
29839
6d5d546e953b 8076549: Update JAX-WS RI integration to latest version (2.2.11-b150402.1412)
aefimov
parents: 28887
diff changeset
   116
 * }</pre>
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   117
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   118
 * @author Sekhar Vajjhala, Sun Microsystems, Inc.
25840
c2002453eec3 8047724: @since tag cleanup in jaxws
henryjen
parents: 19645
diff changeset
   119
 * @since 1.6, JAXB 2.0
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   120
 */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   121
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   122
@Retention(RUNTIME) @Target(PACKAGE)
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   123
public @interface XmlSchema {
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   124
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   125
    /**
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   126
     * Customize the namespace URI, prefix associations. By default,
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   127
     * the namespace prefixes for a XML namespace are generated by a
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   128
     * JAXB Provider in an implementation dependent way.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   129
     */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   130
    XmlNs[]  xmlns() default {};
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   131
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   132
    /**
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   133
     * Name of the XML namespace.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   134
     */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   135
    String namespace() default "";
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   136
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   137
    /**
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   138
     * Namespace qualification for elements. By default, element
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   139
     * default attribute will be absent from the XML Schema fragment.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   140
     */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   141
    XmlNsForm elementFormDefault() default XmlNsForm.UNSET;
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   142
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   143
    /**
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   144
     * Namespace qualification for attributes. By default,
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   145
     * attributesFormDefault will be absent from the XML Schema fragment.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   146
     */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   147
    XmlNsForm attributeFormDefault() default XmlNsForm.UNSET;
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   148
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   149
    /**
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   150
     * Indicates that this namespace (specified by {@link #namespace()})
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   151
     * has a schema already available exeternally, available at this location.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   152
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   153
     * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   154
     * This instructs the JAXB schema generators to simply refer to
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   155
     * the pointed schema, as opposed to generating components into the schema.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   156
     * This schema is assumed to match what would be otherwise produced
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   157
     * by the schema generator (same element names, same type names...)
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   158
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   159
     * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   160
     * This feature is intended to be used when a set of the Java classes
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   161
     * is originally generated from an existing schema, hand-written to
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   162
     * match externally defined schema, or the generated schema is modified
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   163
     * manually.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   164
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   165
     * <p>
32795
5a5710ee05a0 8133651: replace some <tt> tags (obsolete in html5) in core-libs docs
avstepan
parents: 29839
diff changeset
   166
     * Value could be any absolute URI, like {@code http://example.org/some.xsd}.
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   167
     * It is also possible to specify the empty string, to indicate
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   168
     * that the schema is externally available but the location is
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   169
     * unspecified (and thus it's the responsibility of the reader of the generate
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   170
     * schema to locate it.) Finally, the default value of this property
32795
5a5710ee05a0 8133651: replace some <tt> tags (obsolete in html5) in core-libs docs
avstepan
parents: 29839
diff changeset
   171
     * {@code "##generate"} indicates that the schema generator is going
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   172
     * to generate components for this namespace (as it did in JAXB 2.0.)
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   173
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   174
     * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   175
     * Multiple {@link XmlSchema} annotations on multiple packages are allowed
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   176
     * to govern the same {@link #namespace()}. In such case, all of them
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   177
     * must have the same {@link #location()} values.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   178
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   179
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   180
     * <h3>Note to implementor</h3>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   181
     * <p>
32795
5a5710ee05a0 8133651: replace some <tt> tags (obsolete in html5) in core-libs docs
avstepan
parents: 29839
diff changeset
   182
     * More precisely, the value must be either {@code ""}, {@code "##generate"}, or
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   183
     * <a href="http://www.w3.org/TR/xmlschema-2/#anyURI">
32795
5a5710ee05a0 8133651: replace some <tt> tags (obsolete in html5) in core-libs docs
avstepan
parents: 29839
diff changeset
   184
     * a valid lexical representation of {@code xs:anyURI}</a> that begins
5a5710ee05a0 8133651: replace some <tt> tags (obsolete in html5) in core-libs docs
avstepan
parents: 29839
diff changeset
   185
     * with {@code <scheme>:}.
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   186
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   187
     * <p>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   188
     * A schema generator is expected to generate a corresponding
32795
5a5710ee05a0 8133651: replace some <tt> tags (obsolete in html5) in core-libs docs
avstepan
parents: 29839
diff changeset
   189
     * {@code <xs:import namespace="..." schemaLocation="..."/>} (or
5a5710ee05a0 8133651: replace some <tt> tags (obsolete in html5) in core-libs docs
avstepan
parents: 29839
diff changeset
   190
     * no {@code schemaLocation} attribute at all if the empty string is specified.)
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   191
     * However, the schema generator is allowed to use a different value in
32795
5a5710ee05a0 8133651: replace some <tt> tags (obsolete in html5) in core-libs docs
avstepan
parents: 29839
diff changeset
   192
     * the {@code schemaLocation} attribute (including not generating
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   193
     * such attribute), for example so that the user can specify a local
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   194
     * copy of the resource through the command line interface.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   195
     *
25840
c2002453eec3 8047724: @since tag cleanup in jaxws
henryjen
parents: 19645
diff changeset
   196
     * @since 1.6, JAXB 2.1
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   197
     */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   198
    String location() default NO_LOCATION;
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   199
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   200
    /**
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   201
     * The default value of the {@link #location()} attribute,
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   202
     * which indicates that the schema generator will generate
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   203
     * components in this namespace.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   204
     */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   205
    // the actual value is chosen because ## is not a valid
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   206
    // sequence in xs:anyURI.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   207
    static final String NO_LOCATION = "##generate";
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   208
}