1 /* 2 * reserved comment block 3 * DO NOT REMOVE OR ALTER! 4 */ 5 /* 6 * Copyright 2003-2005 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 * This interface defines constants used by this specification. 25 */ 26 public interface XSConstants { 27 // XML Schema Components 28 /** 29 * The object describes an attribute declaration. 30 */ 31 public static final short ATTRIBUTE_DECLARATION = 1; 32 /** 33 * The object describes an element declaration. 34 */ 35 public static final short ELEMENT_DECLARATION = 2; 36 /** 37 * The object describes a complex type or simple type definition. 38 */ 39 public static final short TYPE_DEFINITION = 3; 40 /** 41 * The object describes an attribute use definition. 42 */ 43 public static final short ATTRIBUTE_USE = 4; 44 /** 45 * The object describes an attribute group definition. 46 */ 47 public static final short ATTRIBUTE_GROUP = 5; 48 /** 49 * The object describes a model group definition. 50 */ 51 public static final short MODEL_GROUP_DEFINITION = 6; 52 /** 53 * A model group. 54 */ 55 public static final short MODEL_GROUP = 7; 56 /** 57 * The object describes a particle. 58 */ 59 public static final short PARTICLE = 8; 60 /** 61 * The object describes a wildcard. 62 */ 63 public static final short WILDCARD = 9; 64 /** 65 * The object describes an identity constraint definition. 66 */ 67 public static final short IDENTITY_CONSTRAINT = 10; 68 /** 69 * The object describes a notation declaration. 70 */ 71 public static final short NOTATION_DECLARATION = 11; 72 /** 73 * The object describes an annotation. 74 */ 75 public static final short ANNOTATION = 12; 76 /** 77 * The object describes a constraining facet. Note: this object does not 78 * describe pattern and enumeration facets. 79 */ 80 public static final short FACET = 13; 81 /** 82 * The object describes enumeration and pattern facets. 83 */ 84 public static final short MULTIVALUE_FACET = 14; 85 86 // Derivation constants 87 /** 88 * No constraint is available. 89 */ 90 public static final short DERIVATION_NONE = 0; 91 /** 92 * <code>XSTypeDefinition</code> final set or 93 * <code>XSElementDeclaration</code> disallowed substitution group. 94 */ 95 public static final short DERIVATION_EXTENSION = 1; 96 /** 97 * <code>XSTypeDefinition</code> final set or 98 * <code>XSElementDeclaration</code> disallowed substitution group. 99 */ 100 public static final short DERIVATION_RESTRICTION = 2; 101 /** 102 * <code>XSTypeDefinition</code> final set. 103 */ 104 public static final short DERIVATION_SUBSTITUTION = 4; 105 /** 106 * <code>XSTypeDefinition</code> final set. 107 */ 108 public static final short DERIVATION_UNION = 8; 109 /** 110 * <code>XSTypeDefinition</code> final set. 111 */ 112 public static final short DERIVATION_LIST = 16; 113 /** 114 * <code>XSTypeDefinition</code> final set. 115 */ 116 public static final short DERIVATION_EXTENSION_RESTRICTION_SUBSTITION = 117 XSConstants.DERIVATION_EXTENSION 118 | XSConstants.DERIVATION_RESTRICTION 119 | XSConstants.DERIVATION_SUBSTITUTION; 120 /** 121 * <code>XSTypeDefinition</code> final set. 122 */ 123 public static final short DERIVATION_ALL = 124 XSConstants.DERIVATION_SUBSTITUTION 125 | XSConstants.DERIVATION_EXTENSION 126 | XSConstants.DERIVATION_RESTRICTION 127 | XSConstants.DERIVATION_LIST 128 | XSConstants.DERIVATION_UNION; 129 130 // Scope 131 /** 132 * The scope of a declaration within named model groups or attribute 133 * groups is <code>absent</code>. The scope of such a declaration is 134 * determined when it is used in the construction of complex type 135 * definitions. 136 */ 137 public static final short SCOPE_ABSENT = 0; 138 /** 139 * A scope of <code>global</code> identifies top-level declarations. 140 */ 141 public static final short SCOPE_GLOBAL = 1; 142 /** 143 * <code>Locally scoped</code> declarations are available for use only 144 * within the complex type. 145 */ 146 public static final short SCOPE_LOCAL = 2; 147 148 // Value Constraint 149 /** 150 * Indicates that the component does not have any value constraint. 151 */ 152 public static final short VC_NONE = 0; 153 /** 154 * Indicates that there is a default value constraint. 155 */ 156 public static final short VC_DEFAULT = 1; 157 /** 158 * Indicates that there is a fixed value constraint for this attribute. 159 */ 160 public static final short VC_FIXED = 2; 161 162 // Built-in types: primitive and derived 163 /** 164 * anySimpleType 165 */ 166 public static final short ANYSIMPLETYPE_DT = 1; 167 /** 168 * string 169 */ 170 public static final short STRING_DT = 2; 171 /** 172 * boolean 173 */ 174 public static final short BOOLEAN_DT = 3; 175 /** 176 * decimal 177 */ 178 public static final short DECIMAL_DT = 4; 179 /** 180 * float 181 */ 182 public static final short FLOAT_DT = 5; 183 /** 184 * double 185 */ 186 public static final short DOUBLE_DT = 6; 187 /** 188 * duration 189 */ 190 public static final short DURATION_DT = 7; 191 /** 192 * dateTime 193 */ 194 public static final short DATETIME_DT = 8; 195 /** 196 * time 197 */ 198 public static final short TIME_DT = 9; 199 /** 200 * date 201 */ 202 public static final short DATE_DT = 10; 203 /** 204 * gYearMonth 205 */ 206 public static final short GYEARMONTH_DT = 11; 207 /** 208 * gYear 209 */ 210 public static final short GYEAR_DT = 12; 211 /** 212 * gMonthDay 213 */ 214 public static final short GMONTHDAY_DT = 13; 215 /** 216 * gDay 217 */ 218 public static final short GDAY_DT = 14; 219 /** 220 * gMonth 221 */ 222 public static final short GMONTH_DT = 15; 223 /** 224 * hexBinary 225 */ 226 public static final short HEXBINARY_DT = 16; 227 /** 228 * base64Binary 229 */ 230 public static final short BASE64BINARY_DT = 17; 231 /** 232 * anyURI 233 */ 234 public static final short ANYURI_DT = 18; 235 /** 236 * QName 237 */ 238 public static final short QNAME_DT = 19; 239 /** 240 * NOTATION 241 */ 242 public static final short NOTATION_DT = 20; 243 /** 244 * normalizedString 245 */ 246 public static final short NORMALIZEDSTRING_DT = 21; 247 /** 248 * token 249 */ 250 public static final short TOKEN_DT = 22; 251 /** 252 * language 253 */ 254 public static final short LANGUAGE_DT = 23; 255 /** 256 * NMTOKEN 257 */ 258 public static final short NMTOKEN_DT = 24; 259 /** 260 * Name 261 */ 262 public static final short NAME_DT = 25; 263 /** 264 * NCName 265 */ 266 public static final short NCNAME_DT = 26; 267 /** 268 * ID 269 */ 270 public static final short ID_DT = 27; 271 /** 272 * IDREF 273 */ 274 public static final short IDREF_DT = 28; 275 /** 276 * ENTITY 277 */ 278 public static final short ENTITY_DT = 29; 279 /** 280 * integer 281 */ 282 public static final short INTEGER_DT = 30; 283 /** 284 * nonPositiveInteger 285 */ 286 public static final short NONPOSITIVEINTEGER_DT = 31; 287 /** 288 * negativeInteger 289 */ 290 public static final short NEGATIVEINTEGER_DT = 32; 291 /** 292 * long 293 */ 294 public static final short LONG_DT = 33; 295 /** 296 * int 297 */ 298 public static final short INT_DT = 34; 299 /** 300 * short 301 */ 302 public static final short SHORT_DT = 35; 303 /** 304 * byte 305 */ 306 public static final short BYTE_DT = 36; 307 /** 308 * nonNegativeInteger 309 */ 310 public static final short NONNEGATIVEINTEGER_DT = 37; 311 /** 312 * unsignedLong 313 */ 314 public static final short UNSIGNEDLONG_DT = 38; 315 /** 316 * unsignedInt 317 */ 318 public static final short UNSIGNEDINT_DT = 39; 319 /** 320 * unsignedShort 321 */ 322 public static final short UNSIGNEDSHORT_DT = 40; 323 /** 324 * unsignedByte 325 */ 326 public static final short UNSIGNEDBYTE_DT = 41; 327 /** 328 * positiveInteger 329 */ 330 public static final short POSITIVEINTEGER_DT = 42; 331 /** 332 * The type represents a list type definition whose item type (itemType) 333 * is a union type definition 334 */ 335 public static final short LISTOFUNION_DT = 43; 336 /** 337 * The type represents a list type definition. 338 */ 339 public static final short LIST_DT = 44; 340 /** 341 * The built-in type category is not available. 342 */ 343 public static final short UNAVAILABLE_DT = 45; 344 345 } 346