1. /*
  2. * The Apache Software License, Version 1.1
  3. *
  4. *
  5. * Copyright (c) 2003 The Apache Software Foundation. All rights
  6. * reserved.
  7. *
  8. * Redistribution and use in source and binary forms, with or without
  9. * modification, are permitted provided that the following conditions
  10. * are met:
  11. *
  12. * 1. Redistributions of source code must retain the above copyright
  13. * notice, this list of conditions and the following disclaimer.
  14. *
  15. * 2. Redistributions in binary form must reproduce the above copyright
  16. * notice, this list of conditions and the following disclaimer in
  17. * the documentation and/or other materials provided with the
  18. * distribution.
  19. *
  20. * 3. The end-user documentation included with the redistribution,
  21. * if any, must include the following acknowledgment:
  22. * "This product includes software developed by the
  23. * Apache Software Foundation (http://www.apache.org/)."
  24. * Alternately, this acknowledgment may appear in the software itself,
  25. * if and wherever such third-party acknowledgments normally appear.
  26. *
  27. * 4. The names "Xerces" and "Apache Software Foundation" must
  28. * not be used to endorse or promote products derived from this
  29. * software without prior written permission. For written
  30. * permission, please contact apache@apache.org.
  31. *
  32. * 5. Products derived from this software may not be called "Apache",
  33. * nor may "Apache" appear in their name, without prior written
  34. * permission of the Apache Software Foundation.
  35. *
  36. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  37. * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  38. * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  39. * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  40. * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  41. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  42. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  43. * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  44. * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  45. * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  46. * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  47. * SUCH DAMAGE.
  48. * ====================================================================
  49. *
  50. * This software consists of voluntary contributions made by many
  51. * individuals on behalf of the Apache Software Foundation and was
  52. * originally based on software copyright (c) 2003, International
  53. * Business Machines, Inc., http://www.apache.org. For more
  54. * information on the Apache Software Foundation, please see
  55. * <http://www.apache.org/>.
  56. */
  57. package com.sun.org.apache.xerces.internal.xs;
  58. /**
  59. * This interface defines constants used by this specification.
  60. */
  61. public interface XSConstants {
  62. // XML Schema Components
  63. /**
  64. * The object describes an attribute declaration.
  65. */
  66. public static final short ATTRIBUTE_DECLARATION = 1;
  67. /**
  68. * The object describes an element declaration.
  69. */
  70. public static final short ELEMENT_DECLARATION = 2;
  71. /**
  72. * The object describes a complex type or simple type definition.
  73. */
  74. public static final short TYPE_DEFINITION = 3;
  75. /**
  76. * The object describes an attribute use definition.
  77. */
  78. public static final short ATTRIBUTE_USE = 4;
  79. /**
  80. * The object describes an attribute group definition.
  81. */
  82. public static final short ATTRIBUTE_GROUP = 5;
  83. /**
  84. * The object describes a model group definition.
  85. */
  86. public static final short MODEL_GROUP_DEFINITION = 6;
  87. /**
  88. * A model group.
  89. */
  90. public static final short MODEL_GROUP = 7;
  91. /**
  92. * The object describes a particle.
  93. */
  94. public static final short PARTICLE = 8;
  95. /**
  96. * The object describes a wildcard.
  97. */
  98. public static final short WILDCARD = 9;
  99. /**
  100. * The object describes an identity constraint definition.
  101. */
  102. public static final short IDENTITY_CONSTRAINT = 10;
  103. /**
  104. * The object describes a notation declaration.
  105. */
  106. public static final short NOTATION_DECLARATION = 11;
  107. /**
  108. * The object describes an annotation.
  109. */
  110. public static final short ANNOTATION = 12;
  111. /**
  112. * The object describes a constraining facet. Note: this object does not
  113. * describe pattern and enumeration facets.
  114. */
  115. public static final short FACET = 13;
  116. /**
  117. * The object describes enumeration and pattern facets.
  118. */
  119. public static final short MULTIVALUE_FACET = 14;
  120. // Derivation constants
  121. /**
  122. * No constraint is available.
  123. */
  124. public static final short DERIVATION_NONE = 0;
  125. /**
  126. * <code>XSTypeDefinition</code> final set or
  127. * <code>XSElementDeclaration</code> disallowed substitution group.
  128. */
  129. public static final short DERIVATION_EXTENSION = 1;
  130. /**
  131. * <code>XSTypeDefinition</code> final set or
  132. * <code>XSElementDeclaration</code> disallowed substitution group.
  133. */
  134. public static final short DERIVATION_RESTRICTION = 2;
  135. /**
  136. * <code>XSTypeDefinition</code> final set.
  137. */
  138. public static final short DERIVATION_SUBSTITUTION = 4;
  139. /**
  140. * <code>XSTypeDefinition</code> final set.
  141. */
  142. public static final short DERIVATION_UNION = 8;
  143. /**
  144. * <code>XSTypeDefinition</code> final set.
  145. */
  146. public static final short DERIVATION_LIST = 16;
  147. // Scope
  148. /**
  149. * The scope of a declaration within named model groups or attribute
  150. * groups is <code>absent</code>. The scope of such a declaration is
  151. * determined when it is used in the construction of complex type
  152. * definitions.
  153. */
  154. public static final short SCOPE_ABSENT = 0;
  155. /**
  156. * A scope of <code>global</code> identifies top-level declarations.
  157. */
  158. public static final short SCOPE_GLOBAL = 1;
  159. /**
  160. * <code>Locally scoped</code> declarations are available for use only
  161. * within the complex type.
  162. */
  163. public static final short SCOPE_LOCAL = 2;
  164. // Value Constraint
  165. /**
  166. * Indicates that the component does not have any value constraint.
  167. */
  168. public static final short VC_NONE = 0;
  169. /**
  170. * Indicates that there is a default value constraint.
  171. */
  172. public static final short VC_DEFAULT = 1;
  173. /**
  174. * Indicates that there is a fixed value constraint for this attribute.
  175. */
  176. public static final short VC_FIXED = 2;
  177. // Build-in types: primitive and derived
  178. /**
  179. * anySimpleType
  180. */
  181. public static final short ANYSIMPLETYPE_DT = 1;
  182. /**
  183. * string
  184. */
  185. public static final short STRING_DT = 2;
  186. /**
  187. * boolean
  188. */
  189. public static final short BOOLEAN_DT = 3;
  190. /**
  191. * decimal
  192. */
  193. public static final short DECIMAL_DT = 4;
  194. /**
  195. * float
  196. */
  197. public static final short FLOAT_DT = 5;
  198. /**
  199. * double
  200. */
  201. public static final short DOUBLE_DT = 6;
  202. /**
  203. * duration
  204. */
  205. public static final short DURATION_DT = 7;
  206. /**
  207. * dateTime
  208. */
  209. public static final short DATETIME_DT = 8;
  210. /**
  211. * time
  212. */
  213. public static final short TIME_DT = 9;
  214. /**
  215. * date
  216. */
  217. public static final short DATE_DT = 10;
  218. /**
  219. * gYearMonth
  220. */
  221. public static final short GYEARMONTH_DT = 11;
  222. /**
  223. * gYear
  224. */
  225. public static final short GYEAR_DT = 12;
  226. /**
  227. * gMonthDay
  228. */
  229. public static final short GMONTHDAY_DT = 13;
  230. /**
  231. * gDay
  232. */
  233. public static final short GDAY_DT = 14;
  234. /**
  235. * gMonth
  236. */
  237. public static final short GMONTH_DT = 15;
  238. /**
  239. * hexBinary
  240. */
  241. public static final short HEXBINARY_DT = 16;
  242. /**
  243. * base64Binary
  244. */
  245. public static final short BASE64BINARY_DT = 17;
  246. /**
  247. * anyURI
  248. */
  249. public static final short ANYURI_DT = 18;
  250. /**
  251. * QName
  252. */
  253. public static final short QNAME_DT = 19;
  254. /**
  255. * NOTATION
  256. */
  257. public static final short NOTATION_DT = 20;
  258. /**
  259. * normalizedString
  260. */
  261. public static final short NORMALIZEDSTRING_DT = 21;
  262. /**
  263. * token
  264. */
  265. public static final short TOKEN_DT = 22;
  266. /**
  267. * language
  268. */
  269. public static final short LANGUAGE_DT = 23;
  270. /**
  271. * NMTOKEN
  272. */
  273. public static final short NMTOKEN_DT = 24;
  274. /**
  275. * Name
  276. */
  277. public static final short NAME_DT = 25;
  278. /**
  279. * NCName
  280. */
  281. public static final short NCNAME_DT = 26;
  282. /**
  283. * ID
  284. */
  285. public static final short ID_DT = 27;
  286. /**
  287. * IDREF
  288. */
  289. public static final short IDREF_DT = 28;
  290. /**
  291. * ENTITY
  292. */
  293. public static final short ENTITY_DT = 29;
  294. /**
  295. * integer
  296. */
  297. public static final short INTEGER_DT = 30;
  298. /**
  299. * nonPositiveInteger
  300. */
  301. public static final short NONPOSITIVEINTEGER_DT = 31;
  302. /**
  303. * negativeInteger
  304. */
  305. public static final short NEGATIVEINTEGER_DT = 32;
  306. /**
  307. * long
  308. */
  309. public static final short LONG_DT = 33;
  310. /**
  311. * int
  312. */
  313. public static final short INT_DT = 34;
  314. /**
  315. * short
  316. */
  317. public static final short SHORT_DT = 35;
  318. /**
  319. * byte
  320. */
  321. public static final short BYTE_DT = 36;
  322. /**
  323. * nonNegativeInteger
  324. */
  325. public static final short NONNEGATIVEINTEGER_DT = 37;
  326. /**
  327. * unsignedLong
  328. */
  329. public static final short UNSIGNEDLONG_DT = 38;
  330. /**
  331. * unsignedInt
  332. */
  333. public static final short UNSIGNEDINT_DT = 39;
  334. /**
  335. * unsignedShort
  336. */
  337. public static final short UNSIGNEDSHORT_DT = 40;
  338. /**
  339. * unsignedByte
  340. */
  341. public static final short UNSIGNEDBYTE_DT = 41;
  342. /**
  343. * positiveInteger
  344. */
  345. public static final short POSITIVEINTEGER_DT = 42;
  346. /**
  347. * The type represents a list type definition whose item type (itemType)
  348. * is a union type definition
  349. */
  350. public static final short LISTOFUNION_DT = 43;
  351. /**
  352. * The type represents a list type definition.
  353. */
  354. public static final short LIST_DT = 44;
  355. /**
  356. * The built-in type category is not available.
  357. */
  358. public static final short UNAVAILABLE_DT = 45;
  359. }