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