001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017:
018: package org.apache.xerces.xs;
019:
020: /**
021: * The interface represents the namespace schema information information item.
022: * Each namespace schema information information item corresponds to an XML
023: * Schema with a unique namespace name.
024: */
025: public interface XSNamespaceItem {
026: /**
027: * [schema namespace]: A namespace name or <code>null</code> if absent.
028: */
029: public String getSchemaNamespace();
030:
031: /**
032: * [schema components]: a list of top-level components, i.e. element
033: * declarations, attribute declarations, etc.
034: * @param objectType The type of the declaration, i.e.
035: * <code>ELEMENT_DECLARATION</code>. Note that
036: * <code>XSTypeDefinition.SIMPLE_TYPE</code> and
037: * <code>XSTypeDefinition.COMPLEX_TYPE</code> can also be used as the
038: * <code>objectType</code> to retrieve only complex types or simple
039: * types, instead of all types.
040: * @return A list of top-level definition of the specified type in
041: * <code>objectType</code> or an empty <code>XSNamedMap</code> if no
042: * such definitions exist.
043: */
044: public XSNamedMap getComponents(short objectType);
045:
046: /**
047: * [annotations]: a set of annotations if it exists, otherwise an empty
048: * <code>XSObjectList</code>.
049: */
050: public XSObjectList getAnnotations();
051:
052: /**
053: * Convenience method. Returns a top-level element declaration.
054: * @param name The name of the declaration.
055: * @return A top-level element declaration or <code>null</code> if such a
056: * declaration does not exist.
057: */
058: public XSElementDeclaration getElementDeclaration(String name);
059:
060: /**
061: * Convenience method. Returns a top-level attribute declaration.
062: * @param name The name of the declaration.
063: * @return A top-level attribute declaration or <code>null</code> if such
064: * a declaration does not exist.
065: */
066: public XSAttributeDeclaration getAttributeDeclaration(String name);
067:
068: /**
069: * Convenience method. Returns a top-level simple or complex type
070: * definition.
071: * @param name The name of the definition.
072: * @return An <code>XSTypeDefinition</code> or <code>null</code> if such
073: * a definition does not exist.
074: */
075: public XSTypeDefinition getTypeDefinition(String name);
076:
077: /**
078: * Convenience method. Returns a top-level attribute group definition.
079: * @param name The name of the definition.
080: * @return A top-level attribute group definition or <code>null</code> if
081: * such a definition does not exist.
082: */
083: public XSAttributeGroupDefinition getAttributeGroup(String name);
084:
085: /**
086: * Convenience method. Returns a top-level model group definition.
087: * @param name The name of the definition.
088: * @return A top-level model group definition definition or
089: * <code>null</code> if such a definition does not exist.
090: */
091: public XSModelGroupDefinition getModelGroupDefinition(String name);
092:
093: /**
094: * Convenience method. Returns a top-level notation declaration.
095: * @param name The name of the declaration.
096: * @return A top-level notation declaration or <code>null</code> if such
097: * a declaration does not exist.
098: */
099: public XSNotationDeclaration getNotationDeclaration(String name);
100:
101: /**
102: * [document location] - a list of location URIs for the documents that
103: * contributed to the <code>XSModel</code>.
104: */
105: public StringList getDocumentLocations();
106:
107: }
|