KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > xerces > xs > XSNamespaceItem


1 /*
2  * Copyright 2003,2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 package org.apache.xerces.xs;
18
19 /**
20  * The interface represents the namespace schema information information item.
21  * Each namespace schema information information item corresponds to an XML
22  * Schema with a unique namespace name.
23  */

24 public interface XSNamespaceItem {
25     /**
26      * [schema namespace]: A namespace name or <code>null</code> if absent.
27      */

28     public String JavaDoc getSchemaNamespace();
29
30     /**
31      * [schema components]: a list of top-level components, i.e. element
32      * declarations, attribute declarations, etc.
33      * @param objectType The type of the declaration, i.e.
34      * <code>ELEMENT_DECLARATION</code>. Note that
35      * <code>XSTypeDefinition.SIMPLE_TYPE</code> and
36      * <code>XSTypeDefinition.COMPLEX_TYPE</code> can also be used as the
37      * <code>objectType</code> to retrieve only complex types or simple
38      * types, instead of all types.
39      * @return A list of top-level definition of the specified type in
40      * <code>objectType</code> or an empty <code>XSNamedMap</code> if no
41      * such definitions exist.
42      */

43     public XSNamedMap getComponents(short objectType);
44
45     /**
46      * [annotations]: a set of annotations if it exists, otherwise an empty
47      * <code>XSObjectList</code>.
48      */

49     public XSObjectList getAnnotations();
50
51     /**
52      * Convenience method. Returns a top-level element declaration.
53      * @param name The name of the declaration.
54      * @return A top-level element declaration or <code>null</code> if such a
55      * declaration does not exist.
56      */

57     public XSElementDeclaration getElementDeclaration(String JavaDoc name);
58
59     /**
60      * Convenience method. Returns a top-level attribute declaration.
61      * @param name The name of the declaration.
62      * @return A top-level attribute declaration or <code>null</code> if such
63      * a declaration does not exist.
64      */

65     public XSAttributeDeclaration getAttributeDeclaration(String JavaDoc name);
66
67     /**
68      * Convenience method. Returns a top-level simple or complex type
69      * definition.
70      * @param name The name of the definition.
71      * @return An <code>XSTypeDefinition</code> or <code>null</code> if such
72      * a definition does not exist.
73      */

74     public XSTypeDefinition getTypeDefinition(String JavaDoc name);
75
76     /**
77      * Convenience method. Returns a top-level attribute group definition.
78      * @param name The name of the definition.
79      * @return A top-level attribute group definition or <code>null</code> if
80      * such a definition does not exist.
81      */

82     public XSAttributeGroupDefinition getAttributeGroup(String JavaDoc name);
83
84     /**
85      * Convenience method. Returns a top-level model group definition.
86      * @param name The name of the definition.
87      * @return A top-level model group definition definition or
88      * <code>null</code> if such a definition does not exist.
89      */

90     public XSModelGroupDefinition getModelGroupDefinition(String JavaDoc name);
91
92     /**
93      * Convenience method. Returns a top-level notation declaration.
94      * @param name The name of the declaration.
95      * @return A top-level notation declaration or <code>null</code> if such
96      * a declaration does not exist.
97      */

98     public XSNotationDeclaration getNotationDeclaration(String JavaDoc name);
99
100     /**
101      * [document location] - a list of location URIs for the documents that
102      * contributed to the <code>XSModel</code>.
103      */

104     public StringList getDocumentLocations();
105
106 }
107
Popular Tags