| API Docs for SAX and DOM |

Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

# XSNamespaceItem.hpp

Go to the documentation of this file.

    00001 /*
    00002  * Copyright 2003,2004 The Apache Software Foundation.
    00003  *
    00004  * Licensed under the Apache License, Version 2.0 (the "License");
    00005  * you may not use this file except in compliance with the License.
    00006  * You may obtain a copy of the License at
    00007  *
    00008  *      http://www.apache.org/licenses/LICENSE-2.0
    00009  *
    00010  * Unless required by applicable law or agreed to in writing, software
    00011  * distributed under the License is distributed on an "AS IS" BASIS,
    00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    00013  * See the License for the specific language governing permissions and
    00014  * limitations under the License.
    00015  */
    00016
    00017 /*
    00018  * $Id: XSNamespaceItem.hpp 191054 2005-06-17 02:56:35Z jberry $
    00019  */
    00020
    00021 #if !defined(XSNAMESPACEITEM_HPP)
    00022 #define XSNAMESPACEITEM_HPP
    00023
    00024 #include <xercesc/util/PlatformUtils.hpp>
    00025 #include <xercesc/framework/psvi/XSObject.hpp>
    00026 #include <xercesc/framework/psvi/XSNamedMap.hpp>
    00027
    00028 XERCES_CPP_NAMESPACE_BEGIN
    00029
    00041 // forward declarations
    00042 class XSAnnotation;
    00043 class XSAttributeDeclaration;
    00044 class XSAttributeGroupDefinition;
    00045 class XSElementDeclaration;
    00046 class XSModelGroupDefinition;
    00047 class XSNotationDeclaration;
    00048 class XSTypeDefinition;
    00049 class SchemaGrammar;
    00050 class XSModel;
    00051
    00052 class  XSNamespaceItem : public XMemory
    00053 {
    00054 public:
    00055
    00056     //  Constructors and Destructor
    00057     // -----------------------------------------------------------------------
    00060
    00068     XSNamespaceItem
    00069     (
    00070         XSModel* const         xsModel
    00071         , SchemaGrammar* const grammar
    00072         , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
    00073     );
    00074
    00075     XSNamespaceItem
    00076     (
    00077         XSModel* const         xsModel
    00078         , const XMLCh* const   schemaNamespace
    00079         , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
    00080     );
    00081
    00083
    00086     ~XSNamespaceItem();
    00088
    00089     //---------------------
    00093
    00098     const XMLCh *getSchemaNamespace();
    00099
    00110     XSNamedMap<XSObject> *getComponents(XSConstants::COMPONENT_TYPE objectType);
    00111
    00115     XSAnnotationList *getAnnotations();
    00116
    00123     XSElementDeclaration *getElementDeclaration(const XMLCh *name);
    00124
    00131     XSAttributeDeclaration *getAttributeDeclaration(const XMLCh *name);
    00132
    00140     XSTypeDefinition *getTypeDefinition(const XMLCh *name);
    00141
    00148     XSAttributeGroupDefinition *getAttributeGroup(const XMLCh *name);
    00149
    00156     XSModelGroupDefinition *getModelGroupDefinition(const XMLCh *name);
    00157
    00164     XSNotationDeclaration *getNotationDeclaration(const XMLCh *name);
    00165
    00170     StringList *getDocumentLocations();
    00171
    00173
    00174     //----------------------------------
    00178
    00179
    00181 private:
    00182
    00183     // -----------------------------------------------------------------------
    00184     //  Unimplemented constructors and operators
    00185     // -----------------------------------------------------------------------
    00186     XSNamespaceItem(const XSNamespaceItem&);
    00187     XSNamespaceItem & operator=(const XSNamespaceItem &);
    00188
    00189 protected:
    00190     friend class XSModel;
    00191     friend class XSObjectFactory;
    00192     // -----------------------------------------------------------------------
    00193     //  data members
    00194     // -----------------------------------------------------------------------
    00195     // fMemoryManager:
    00196     //  used for any memory allocations
    00197     MemoryManager* const    fMemoryManager;
    00198     SchemaGrammar*          fGrammar;
    00199     XSModel*                fXSModel;
    00200
    00201     /* Need a XSNamedMap for each component    top-level?
    00202        that is top level.
    00203           ATTRIBUTE_DECLARATION     = 1,
    00204           ELEMENT_DECLARATION       = 2,
    00205           TYPE_DEFINITION           = 3,
    00206           ATTRIBUTE_USE             = 4,       no
    00207           ATTRIBUTE_GROUP_DEFINITION= 5,
    00208           MODEL_GROUP_DEFINITION    = 6,
    00209           MODEL_GROUP               = 7,       no
    00210           PARTICLE                  = 8,       no
    00211           WILDCARD                  = 9,       no
    00212           IDENTITY_CONSTRAINT       = 10,      no
    00213           NOTATION_DECLARATION      = 11,
    00214           ANNOTATION                = 12,      no
    00215           FACET                     = 13,      no
    00216           MULTIVALUE_FACET          = 14       no
    00217     */
    00218     XSNamedMap<XSObject>*                   fComponentMap[XSConstants::MULTIVALUE_FACET];
    00219     XSAnnotationList*                       fXSAnnotationList;
    00220     RefHashTableOf<XSObject>*               fHashMap[XSConstants::MULTIVALUE_FACET];
    00221     const XMLCh*                            fSchemaNamespace;
    00222 };
    00223
    00224 inline XSAnnotationList* XSNamespaceItem::getAnnotations()
    00225 {
    00226     return fXSAnnotationList;
    00227 }
    00228
    00229 inline const XMLCh *XSNamespaceItem::getSchemaNamespace()
    00230 {
    00231     return fSchemaNamespace;
    00232 }
    00233
    00234
    00235
    00236 XERCES_CPP_NAMESPACE_END
    00237
    00238 #endif

Copyright © 1994-2004 The Apache Software Foundation. All Rights Reserved.