View Javadoc
1   /*
2    * reserved comment block
3    * DO NOT REMOVE OR ALTER!
4    */
5   /*
6    * Copyright 2003,2004 The Apache Software Foundation.
7    *
8    * Licensed under the Apache License, Version 2.0 (the "License");
9    * you may not use this file except in compliance with the License.
10   * You may obtain a copy of the License at
11   *
12   *      http://www.apache.org/licenses/LICENSE-2.0
13   *
14   * Unless required by applicable law or agreed to in writing, software
15   * distributed under the License is distributed on an "AS IS" BASIS,
16   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17   * See the License for the specific language governing permissions and
18   * limitations under the License.
19   */
20  
21  package com.sun.org.apache.xerces.internal.xs;
22  
23  /**
24   * The interface represents the namespace schema information information item.
25   * Each namespace schema information information item corresponds to an XML
26   * Schema with a unique namespace name.
27   */
28  public interface XSNamespaceItem {
29      /**
30       * [schema namespace]: A namespace name or <code>null</code> if absent.
31       */
32      public String getSchemaNamespace();
33  
34      /**
35       * [schema components]: a list of top-level components, i.e. element
36       * declarations, attribute declarations, etc.
37       * @param objectType The type of the declaration, i.e.
38       *   <code>ELEMENT_DECLARATION</code>. Note that
39       *   <code>XSTypeDefinition.SIMPLE_TYPE</code> and
40       *   <code>XSTypeDefinition.COMPLEX_TYPE</code> can also be used as the
41       *   <code>objectType</code> to retrieve only complex types or simple
42       *   types, instead of all types.
43       * @return  A list of top-level definition of the specified type in
44       *   <code>objectType</code> or an empty <code>XSNamedMap</code> if no
45       *   such definitions exist.
46       */
47      public XSNamedMap getComponents(short objectType);
48  
49      /**
50       *  [annotations]: a set of annotations if it exists, otherwise an empty
51       * <code>XSObjectList</code>.
52       */
53      public XSObjectList getAnnotations();
54  
55      /**
56       * Convenience method. Returns a top-level element declaration.
57       * @param name The name of the declaration.
58       * @return A top-level element declaration or <code>null</code> if such a
59       *   declaration does not exist.
60       */
61      public XSElementDeclaration getElementDeclaration(String name);
62  
63      /**
64       * Convenience method. Returns a top-level attribute declaration.
65       * @param name The name of the declaration.
66       * @return A top-level attribute declaration or <code>null</code> if such
67       *   a declaration does not exist.
68       */
69      public XSAttributeDeclaration getAttributeDeclaration(String name);
70  
71      /**
72       * Convenience method. Returns a top-level simple or complex type
73       * definition.
74       * @param name The name of the definition.
75       * @return An <code>XSTypeDefinition</code> or <code>null</code> if such
76       *   a definition does not exist.
77       */
78      public XSTypeDefinition getTypeDefinition(String name);
79  
80      /**
81       * Convenience method. Returns a top-level attribute group definition.
82       * @param name The name of the definition.
83       * @return A top-level attribute group definition or <code>null</code> if
84       *   such a definition does not exist.
85       */
86      public XSAttributeGroupDefinition getAttributeGroup(String name);
87  
88      /**
89       * Convenience method. Returns a top-level model group definition.
90       * @param name The name of the definition.
91       * @return A top-level model group definition definition or
92       *   <code>null</code> if such a definition does not exist.
93       */
94      public XSModelGroupDefinition getModelGroupDefinition(String name);
95  
96      /**
97       * Convenience method. Returns a top-level notation declaration.
98       * @param name The name of the declaration.
99       * @return A top-level notation declaration or <code>null</code> if such
100      *   a declaration does not exist.
101      */
102     public XSNotationDeclaration getNotationDeclaration(String name);
103 
104     /**
105      * [document location] - a list of location URIs for the documents that
106      * contributed to the <code>XSModel</code>.
107      */
108     public StringList getDocumentLocations();
109 
110 }