001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017:
018: package org.apache.xerces.xs;
019:
020: /**
021: * This interface defines constants used by this specification.
022: */
023: public interface XSConstants {
024: // XML Schema Components
025: /**
026: * The object describes an attribute declaration.
027: */
028: public static final short ATTRIBUTE_DECLARATION = 1;
029: /**
030: * The object describes an element declaration.
031: */
032: public static final short ELEMENT_DECLARATION = 2;
033: /**
034: * The object describes a complex type or simple type definition.
035: */
036: public static final short TYPE_DEFINITION = 3;
037: /**
038: * The object describes an attribute use definition.
039: */
040: public static final short ATTRIBUTE_USE = 4;
041: /**
042: * The object describes an attribute group definition.
043: */
044: public static final short ATTRIBUTE_GROUP = 5;
045: /**
046: * The object describes a model group definition.
047: */
048: public static final short MODEL_GROUP_DEFINITION = 6;
049: /**
050: * A model group.
051: */
052: public static final short MODEL_GROUP = 7;
053: /**
054: * The object describes a particle.
055: */
056: public static final short PARTICLE = 8;
057: /**
058: * The object describes a wildcard.
059: */
060: public static final short WILDCARD = 9;
061: /**
062: * The object describes an identity constraint definition.
063: */
064: public static final short IDENTITY_CONSTRAINT = 10;
065: /**
066: * The object describes a notation declaration.
067: */
068: public static final short NOTATION_DECLARATION = 11;
069: /**
070: * The object describes an annotation.
071: */
072: public static final short ANNOTATION = 12;
073: /**
074: * The object describes a constraining facet. Note: this object does not
075: * describe pattern and enumeration facets.
076: */
077: public static final short FACET = 13;
078: /**
079: * The object describes enumeration and pattern facets.
080: */
081: public static final short MULTIVALUE_FACET = 14;
082:
083: // Derivation constants
084: /**
085: * No constraint is available.
086: */
087: public static final short DERIVATION_NONE = 0;
088: /**
089: * <code>XSTypeDefinition</code> final set or
090: * <code>XSElementDeclaration</code> disallowed substitution group.
091: */
092: public static final short DERIVATION_EXTENSION = 1;
093: /**
094: * <code>XSTypeDefinition</code> final set or
095: * <code>XSElementDeclaration</code> disallowed substitution group.
096: */
097: public static final short DERIVATION_RESTRICTION = 2;
098: /**
099: * <code>XSTypeDefinition</code> final set.
100: */
101: public static final short DERIVATION_SUBSTITUTION = 4;
102: /**
103: * <code>XSTypeDefinition</code> final set.
104: */
105: public static final short DERIVATION_UNION = 8;
106: /**
107: * <code>XSTypeDefinition</code> final set.
108: */
109: public static final short DERIVATION_LIST = 16;
110:
111: // Scope
112: /**
113: * The scope of a declaration within named model groups or attribute
114: * groups is <code>absent</code>. The scope of such a declaration is
115: * determined when it is used in the construction of complex type
116: * definitions.
117: */
118: public static final short SCOPE_ABSENT = 0;
119: /**
120: * A scope of <code>global</code> identifies top-level declarations.
121: */
122: public static final short SCOPE_GLOBAL = 1;
123: /**
124: * <code>Locally scoped</code> declarations are available for use only
125: * within the complex type.
126: */
127: public static final short SCOPE_LOCAL = 2;
128:
129: // Value Constraint
130: /**
131: * Indicates that the component does not have any value constraint.
132: */
133: public static final short VC_NONE = 0;
134: /**
135: * Indicates that there is a default value constraint.
136: */
137: public static final short VC_DEFAULT = 1;
138: /**
139: * Indicates that there is a fixed value constraint for this attribute.
140: */
141: public static final short VC_FIXED = 2;
142:
143: // Built-in types: primitive and derived
144: /**
145: * anySimpleType
146: */
147: public static final short ANYSIMPLETYPE_DT = 1;
148: /**
149: * string
150: */
151: public static final short STRING_DT = 2;
152: /**
153: * boolean
154: */
155: public static final short BOOLEAN_DT = 3;
156: /**
157: * decimal
158: */
159: public static final short DECIMAL_DT = 4;
160: /**
161: * float
162: */
163: public static final short FLOAT_DT = 5;
164: /**
165: * double
166: */
167: public static final short DOUBLE_DT = 6;
168: /**
169: * duration
170: */
171: public static final short DURATION_DT = 7;
172: /**
173: * dateTime
174: */
175: public static final short DATETIME_DT = 8;
176: /**
177: * time
178: */
179: public static final short TIME_DT = 9;
180: /**
181: * date
182: */
183: public static final short DATE_DT = 10;
184: /**
185: * gYearMonth
186: */
187: public static final short GYEARMONTH_DT = 11;
188: /**
189: * gYear
190: */
191: public static final short GYEAR_DT = 12;
192: /**
193: * gMonthDay
194: */
195: public static final short GMONTHDAY_DT = 13;
196: /**
197: * gDay
198: */
199: public static final short GDAY_DT = 14;
200: /**
201: * gMonth
202: */
203: public static final short GMONTH_DT = 15;
204: /**
205: * hexBinary
206: */
207: public static final short HEXBINARY_DT = 16;
208: /**
209: * base64Binary
210: */
211: public static final short BASE64BINARY_DT = 17;
212: /**
213: * anyURI
214: */
215: public static final short ANYURI_DT = 18;
216: /**
217: * QName
218: */
219: public static final short QNAME_DT = 19;
220: /**
221: * NOTATION
222: */
223: public static final short NOTATION_DT = 20;
224: /**
225: * normalizedString
226: */
227: public static final short NORMALIZEDSTRING_DT = 21;
228: /**
229: * token
230: */
231: public static final short TOKEN_DT = 22;
232: /**
233: * language
234: */
235: public static final short LANGUAGE_DT = 23;
236: /**
237: * NMTOKEN
238: */
239: public static final short NMTOKEN_DT = 24;
240: /**
241: * Name
242: */
243: public static final short NAME_DT = 25;
244: /**
245: * NCName
246: */
247: public static final short NCNAME_DT = 26;
248: /**
249: * ID
250: */
251: public static final short ID_DT = 27;
252: /**
253: * IDREF
254: */
255: public static final short IDREF_DT = 28;
256: /**
257: * ENTITY
258: */
259: public static final short ENTITY_DT = 29;
260: /**
261: * integer
262: */
263: public static final short INTEGER_DT = 30;
264: /**
265: * nonPositiveInteger
266: */
267: public static final short NONPOSITIVEINTEGER_DT = 31;
268: /**
269: * negativeInteger
270: */
271: public static final short NEGATIVEINTEGER_DT = 32;
272: /**
273: * long
274: */
275: public static final short LONG_DT = 33;
276: /**
277: * int
278: */
279: public static final short INT_DT = 34;
280: /**
281: * short
282: */
283: public static final short SHORT_DT = 35;
284: /**
285: * byte
286: */
287: public static final short BYTE_DT = 36;
288: /**
289: * nonNegativeInteger
290: */
291: public static final short NONNEGATIVEINTEGER_DT = 37;
292: /**
293: * unsignedLong
294: */
295: public static final short UNSIGNEDLONG_DT = 38;
296: /**
297: * unsignedInt
298: */
299: public static final short UNSIGNEDINT_DT = 39;
300: /**
301: * unsignedShort
302: */
303: public static final short UNSIGNEDSHORT_DT = 40;
304: /**
305: * unsignedByte
306: */
307: public static final short UNSIGNEDBYTE_DT = 41;
308: /**
309: * positiveInteger
310: */
311: public static final short POSITIVEINTEGER_DT = 42;
312: /**
313: * The type represents a list type definition whose item type (itemType)
314: * is a union type definition
315: */
316: public static final short LISTOFUNION_DT = 43;
317: /**
318: * The type represents a list type definition.
319: */
320: public static final short LIST_DT = 44;
321: /**
322: * The built-in type category is not available.
323: */
324: public static final short UNAVAILABLE_DT = 45;
325:
326: }
|