jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/xsom/XSSchemaSet.java
author chegar
Sun, 17 Aug 2014 15:52:15 +0100
changeset 25871 b80b84e87032
parent 22678 jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSSchemaSet.java@ac1ea46be942
permissions -rw-r--r--
8054834: Modular Source Code Reviewed-by: alanb, chegar, ihse, mduigou Contributed-by: alan.bateman@oracle.com, alex.buckley@oracle.com, chris.hegarty@oracle.com, erik.joelsson@oracle.com, jonathan.gibbons@oracle.com, karen.kinnear@oracle.com, magnus.ihse.bursie@oracle.com, mandy.chung@oracle.com, mark.reinhold@oracle.com, paul.sandoz@oracle.com
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
/*
22678
ac1ea46be942 8029237: Update copyright year to match last edit in jaxws repository for 2012
mkos
parents: 12009
diff changeset
     2
 * Copyright (c) 1997, 2012, 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 com.sun.xml.internal.xsom;
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 javax.xml.namespace.NamespaceContext;
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    29
import java.util.Iterator;
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    30
import java.util.Collection;
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    31
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    32
/**
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    33
 * Set of {@link XSSchema} objects.
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
 * @author
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    36
 *  Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    37
 */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    38
public interface XSSchemaSet
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    39
{
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    40
    XSSchema getSchema(String targetNamespace);
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    41
    XSSchema getSchema(int idx);
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    42
    int getSchemaSize();
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    43
    Iterator<XSSchema> iterateSchema();
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
    /**
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    46
     * Gets all {@link XSSchema}s in a single collection.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    47
     */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    48
    Collection<XSSchema> getSchemas();
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    49
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    50
    XSType getType(String namespaceURI, String localName);
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    51
    XSSimpleType getSimpleType(String namespaceURI, String localName);
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    52
    XSAttributeDecl getAttributeDecl(String namespaceURI, String localName);
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    53
    XSElementDecl getElementDecl(String namespaceURI, String localName);
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    54
    XSModelGroupDecl getModelGroupDecl(String namespaceURI, String localName);
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    55
    XSAttGroupDecl getAttGroupDecl(String namespaceURI, String localName);
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    56
    XSComplexType getComplexType(String namespaceURI, String localName);
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    57
    XSIdentityConstraint getIdentityConstraint(String namespaceURI, String localName);
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
    /** Iterates all element declarations in all the schemas. */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    60
    Iterator<XSElementDecl> iterateElementDecls();
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    61
    /** Iterates all type definitions in all the schemas. */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    62
    Iterator<XSType> iterateTypes();
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    63
    /** Iterates all atribute declarations in all the schemas. */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    64
    Iterator<XSAttributeDecl> iterateAttributeDecls();
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    65
    /** Iterates all attribute group declarations in all the schemas. */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    66
    Iterator<XSAttGroupDecl> iterateAttGroupDecls();
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    67
    /** Iterates all model group declarations in all the schemas. */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    68
    Iterator<XSModelGroupDecl> iterateModelGroupDecls();
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    69
    /** Iterates all simple type definitions in all the schemas. */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    70
    Iterator<XSSimpleType> iterateSimpleTypes();
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    71
    /** Iterates all complex type definitions in all the schemas. */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    72
    Iterator<XSComplexType> iterateComplexTypes();
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    73
    /** Iterates all notation declarations in all the schemas. */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    74
    Iterator<XSNotation> iterateNotations();
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    75
    /**
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    76
     * Iterates all identity constraints in all the schemas.
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
    Iterator<XSIdentityConstraint> iterateIdentityConstraints();
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    79
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    80
    // conceptually static methods
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    81
    XSComplexType getAnyType();
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    82
    XSSimpleType getAnySimpleType();
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    83
    XSContentType getEmpty();
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    84
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    85
    /**
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    86
     * Evaluates a schema component designator against this schema component
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    87
     * and returns the resulting schema components.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    88
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    89
     * @throws IllegalArgumentException
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    90
     *      if SCD is syntactically incorrect.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    91
     * @param scd
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    92
     *      Schema component designator. See {@link SCD} for more details.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    93
     * @param nsContext
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    94
     *      The namespace context in which SCD is evaluated. Cannot be null.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    95
     * @return
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    96
     *      Can be empty but never null.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    97
     */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    98
    Collection<XSComponent> select(String scd, NamespaceContext nsContext);
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    99
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   100
    /**
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   101
     * Evaluates a schema component designator against this schema component
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   102
     * and returns the first resulting schema component.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   103
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   104
     * @throws IllegalArgumentException
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   105
     *      if SCD is syntactically incorrect.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   106
     * @param scd
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   107
     *      Schema component designator. See {@link SCD} for more details.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   108
     * @param nsContext
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   109
     *      The namespace context in which SCD is evaluated. Cannot be null.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   110
     * @return
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   111
     *      null if the SCD didn't match anything. If the SCD matched more than one node,
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   112
     *      the first one will be returned.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   113
     */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   114
    XSComponent selectSingle(String scd, NamespaceContext nsContext);
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   115
}