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 * $Log: XSIDCDefinition.hpp,v $ 00019 * Revision 1.7 2004/09/08 13:56:08 peiyongz 00020 * Apache License Version 2.0 00021 * 00022 * Revision 1.6 2003/12/01 23:23:26 neilg 00023 * fix for bug 25118; thanks to Jeroen Witmond 00024 * 00025 * Revision 1.5 2003/11/21 17:29:53 knoaman 00026 * PSVI update 00027 * 00028 * Revision 1.4 2003/11/14 22:47:53 neilg 00029 * fix bogus log message from previous commit... 00030 * 00031 * Revision 1.3 2003/11/14 22:33:30 neilg 00032 * Second phase of schema component model implementation. 00033 * Implement XSModel, XSNamespaceItem, and the plumbing necessary 00034 * to connect them to the other components. 00035 * Thanks to David Cargill. 00036 * 00037 * Revision 1.2 2003/11/06 15:30:04 neilg 00038 * first part of PSVI/schema component model implementation, thanks to David Cargill. This covers setting the PSVIHandler on parser objects, as well as implementing XSNotation, XSSimpleTypeDefinition, XSIDCDefinition, and most of XSWildcard, XSComplexTypeDefinition, XSElementDeclaration, XSAttributeDeclaration and XSAttributeUse. 00039 * 00040 * Revision 1.1 2003/09/16 14:33:36 neilg 00041 * PSVI/schema component model classes, with Makefile/configuration changes necessary to build them 00042 * 00043 */ 00044 00045 #if !defined(XSIDCDEFINITION_HPP) 00046 #define XSIDCDEFINITION_HPP 00047 00048 #include <xercesc/framework/psvi/XSObject.hpp> 00049 00050 XERCES_CPP_NAMESPACE_BEGIN 00051 00059 // forward declarations 00060 class XSAnnotation; 00061 class IdentityConstraint; 00062 00063 class XSIDCDefinition : public XSObject 00064 { 00065 public: 00066 00067 // Identity Constraints 00068 enum IC_CATEGORY { 00072 IC_KEY = 1, 00076 IC_KEYREF = 2, 00080 IC_UNIQUE = 3 00081 }; 00082 00083 // Constructors and Destructor 00084 // ----------------------------------------------------------------------- 00087 00098 XSIDCDefinition 00099 ( 00100 IdentityConstraint* const identityConstraint 00101 , XSIDCDefinition* const keyIC 00102 , XSAnnotation* const headAnnot 00103 , StringList* const stringList 00104 , XSModel* const xsModel 00105 , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager 00106 ); 00107 00109 00112 ~XSIDCDefinition(); 00114 00115 //--------------------- 00119 00124 const XMLCh* getName(); 00125 00130 const XMLCh* getNamespace(); 00131 00137 XSNamespaceItem *getNamespaceItem(); 00138 00140 00141 //--------------------- 00145 00149 IC_CATEGORY getCategory() const; 00150 00154 const XMLCh *getSelectorStr(); 00155 00159 StringList *getFieldStrs(); 00160 00166 XSIDCDefinition *getRefKey() const; 00167 00171 XSAnnotationList *getAnnotations(); 00172 00174 00175 //---------------------------------- 00179 00181 private: 00182 00183 // ----------------------------------------------------------------------- 00184 // Unimplemented constructors and operators 00185 // ----------------------------------------------------------------------- 00186 XSIDCDefinition(const XSIDCDefinition&); 00187 XSIDCDefinition & operator=(const XSIDCDefinition &); 00188 00189 protected: 00190 00191 // ----------------------------------------------------------------------- 00192 // data members 00193 // ----------------------------------------------------------------------- 00194 IdentityConstraint* fIdentityConstraint; 00195 XSIDCDefinition* fKey; 00196 StringList* fStringList; 00197 XSAnnotationList* fXSAnnotationList; 00198 }; 00199 00200 00201 inline StringList* XSIDCDefinition::getFieldStrs() 00202 { 00203 return fStringList; 00204 } 00205 00206 inline XSIDCDefinition* XSIDCDefinition::getRefKey() const 00207 { 00208 return fKey; 00209 } 00210 00211 XERCES_CPP_NAMESPACE_END 00212 00213 #endif