1
|
|
/*
|
2
|
|
* JBind
|
3
|
|
*
|
4
|
|
* Copyright (c) by Stefan Wachter. All rights reserved.
|
5
|
|
*
|
6
|
|
* Usage, modification, and redistribution is subject to license terms that are
|
7
|
|
* available at 'http://www.jbind.org'. The JBind license is like the
|
8
|
|
* 'Apache Software License V 1.1'.
|
9
|
|
*/
|
10
|
|
package org.jbind.xml.schema.cmp;
|
11
|
|
|
12
|
|
import java.math.BigDecimal;
|
13
|
|
import java.math.BigInteger;
|
14
|
|
import java.util.Collections;
|
15
|
|
import java.util.Map;
|
16
|
|
|
17
|
|
import org.jbind.base.Console;
|
18
|
|
import org.jbind.xml.base.IAttribute;
|
19
|
|
import org.jbind.xml.base.ILanguage;
|
20
|
|
import org.jbind.xml.base.ILocation;
|
21
|
|
import org.jbind.xml.base.INamespaces;
|
22
|
|
import org.jbind.xml.base.IQName;
|
23
|
|
import org.jbind.xml.base.WhiteSpaceProcessing;
|
24
|
|
import org.jbind.xml.core.cmp.IAnnotation;
|
25
|
|
import org.jbind.xml.core.cmp.ISchema;
|
26
|
|
import org.jbind.xml.core.cmp.ISourceInfo;
|
27
|
|
import org.jbind.xml.core.constraint.ConstraintType;
|
28
|
|
import org.jbind.xml.core.data.IAnyTypeData;
|
29
|
|
import org.jbind.xml.core.data.IBase64Binary;
|
30
|
|
import org.jbind.xml.core.data.IDataCreator;
|
31
|
|
import org.jbind.xml.core.data.IDate;
|
32
|
|
import org.jbind.xml.core.data.IDateTime;
|
33
|
|
import org.jbind.xml.core.data.IDuration;
|
34
|
|
import org.jbind.xml.core.data.IGDay;
|
35
|
|
import org.jbind.xml.core.data.IGMonth;
|
36
|
|
import org.jbind.xml.core.data.IGMonthDay;
|
37
|
|
import org.jbind.xml.core.data.IGYear;
|
38
|
|
import org.jbind.xml.core.data.IGYearMonth;
|
39
|
|
import org.jbind.xml.core.data.IHexBinary;
|
40
|
|
import org.jbind.xml.core.data.ITime;
|
41
|
|
import org.jbind.xml.core.type.IAnySimpleType;
|
42
|
|
import org.jbind.xml.core.type.IAnyType;
|
43
|
|
import org.jbind.xml.instance.data.AnyListTypeData;
|
44
|
|
import org.jbind.xml.instance.data.AnySimpleTypeData;
|
45
|
|
import org.jbind.xml.instance.data.AnyTypeData;
|
46
|
|
import org.jbind.xml.instance.data.AnyURIData;
|
47
|
|
import org.jbind.xml.instance.data.Base64BinaryData;
|
48
|
|
import org.jbind.xml.instance.data.BooleanData;
|
49
|
|
import org.jbind.xml.instance.data.ByteData;
|
50
|
|
import org.jbind.xml.instance.data.DateData;
|
51
|
|
import org.jbind.xml.instance.data.DateTimeData;
|
52
|
|
import org.jbind.xml.instance.data.DecimalData;
|
53
|
|
import org.jbind.xml.instance.data.DoubleData;
|
54
|
|
import org.jbind.xml.instance.data.DurationData;
|
55
|
|
import org.jbind.xml.instance.data.ENTITIESData;
|
56
|
|
import org.jbind.xml.instance.data.ENTITYData;
|
57
|
|
import org.jbind.xml.instance.data.FloatData;
|
58
|
|
import org.jbind.xml.instance.data.GDayData;
|
59
|
|
import org.jbind.xml.instance.data.GMonthData;
|
60
|
|
import org.jbind.xml.instance.data.GMonthDayData;
|
61
|
|
import org.jbind.xml.instance.data.GYearData;
|
62
|
|
import org.jbind.xml.instance.data.GYearMonthData;
|
63
|
|
import org.jbind.xml.instance.data.HexBinaryData;
|
64
|
|
import org.jbind.xml.instance.data.IDData;
|
65
|
|
import org.jbind.xml.instance.data.IDREFData;
|
66
|
|
import org.jbind.xml.instance.data.IDREFSData;
|
67
|
|
import org.jbind.xml.instance.data.IntData;
|
68
|
|
import org.jbind.xml.instance.data.IntegerData;
|
69
|
|
import org.jbind.xml.instance.data.LanguageData;
|
70
|
|
import org.jbind.xml.instance.data.LongData;
|
71
|
|
import org.jbind.xml.instance.data.NCNameData;
|
72
|
|
import org.jbind.xml.instance.data.NMTOKENData;
|
73
|
|
import org.jbind.xml.instance.data.NMTOKENSData;
|
74
|
|
import org.jbind.xml.instance.data.NOTATIONData;
|
75
|
|
import org.jbind.xml.instance.data.NameData;
|
76
|
|
import org.jbind.xml.instance.data.NegativeIntegerData;
|
77
|
|
import org.jbind.xml.instance.data.NonNegativeIntegerData;
|
78
|
|
import org.jbind.xml.instance.data.NonPositiveIntegerData;
|
79
|
|
import org.jbind.xml.instance.data.NormalizedStringData;
|
80
|
|
import org.jbind.xml.instance.data.PositiveIntegerData;
|
81
|
|
import org.jbind.xml.instance.data.QNameData;
|
82
|
|
import org.jbind.xml.instance.data.ShortData;
|
83
|
|
import org.jbind.xml.instance.data.StringData;
|
84
|
|
import org.jbind.xml.instance.data.TimeData;
|
85
|
|
import org.jbind.xml.instance.data.TokenData;
|
86
|
|
import org.jbind.xml.instance.data.UnsignedByteData;
|
87
|
|
import org.jbind.xml.instance.data.UnsignedIntData;
|
88
|
|
import org.jbind.xml.instance.data.UnsignedLongData;
|
89
|
|
import org.jbind.xml.instance.data.UnsignedShortData;
|
90
|
|
import org.jbind.xml.msg.IConstraintViolations;
|
91
|
|
import org.jbind.xml.msg.XmlMessages;
|
92
|
|
|
93
|
|
public class W3CTypes {
|
94
|
|
|
95
|
138
|
private static IAnySimpleType register(IAnySimpleType aType) {
|
96
|
138
|
schema.setComponent(aType, ourViolations);
|
97
|
138
|
return aType;
|
98
|
|
}
|
99
|
|
|
100
|
|
private static final ISourceInfo SOURCE_INFO = new ISourceInfo() {
|
101
|
|
|
102
|
0
|
public boolean isTopLevelComponent() {
|
103
|
0
|
return true;
|
104
|
|
}
|
105
|
0
|
public IAnnotation getAnnotation() {
|
106
|
0
|
return null;
|
107
|
|
}
|
108
|
0
|
public ILocation getLocation() {
|
109
|
0
|
return null;
|
110
|
|
}
|
111
|
1128
|
public IAttribute getBindingAttribute(String aName) {
|
112
|
1128
|
return null;
|
113
|
|
}
|
114
|
0
|
public IAttribute getLocalBindingAttribute(String aName) {
|
115
|
0
|
return null;
|
116
|
|
}
|
117
|
2012
|
public IAttribute getDefaultedLocalBindingAttribute(String aName) {
|
118
|
2012
|
return null;
|
119
|
|
}
|
120
|
0
|
public String getLocalStringBindingAttribute(String aName) {
|
121
|
0
|
return null;
|
122
|
|
}
|
123
|
0
|
public String getDefaultedLocalStringBindingAttribute(String aName) {
|
124
|
0
|
return null;
|
125
|
|
}
|
126
|
0
|
public String getStringBindingAttribute(String aName) {
|
127
|
0
|
return null;
|
128
|
|
}
|
129
|
0
|
public Map getPrefixToNamespaceMapping() {
|
130
|
0
|
return Collections.EMPTY_MAP;
|
131
|
|
}
|
132
|
|
};
|
133
|
|
|
134
|
|
private static final IConstraintViolations ourViolations = XmlMessages.constraintViolations();
|
135
|
|
|
136
|
|
public static final ISchema schema = new Schema(INamespaces.XML_SCHEMA, BuiltInLocation.INSTANCE);
|
137
|
|
|
138
|
|
public static final IAnyType anyType = new AnyType(SOURCE_INFO, new IDataCreator() {
|
139
|
776
|
public IAnyTypeData newData() {
|
140
|
776
|
return new AnyTypeData();
|
141
|
|
}
|
142
|
|
});
|
143
|
|
|
144
|
|
static {
|
145
|
3
|
schema.setComponent(anyType, ourViolations);
|
146
|
|
}
|
147
|
|
|
148
|
|
public static final IAnySimpleType anySimpleType = register(new AnySimpleType(SOURCE_INFO, "anySimpleType", anyType, ConstraintType.CHECKER_WEP, new IDataCreator() {
|
149
|
181
|
public IAnyTypeData newData() {
|
150
|
181
|
return new AnySimpleTypeData();
|
151
|
|
}
|
152
|
|
}));
|
153
|
|
|
154
|
|
public static final IAnySimpleType dateTime = register(new BuiltInAtomicType(SOURCE_INFO, "dateTime", anySimpleType, WhiteSpaceProcessing.COLLAPSE, new BuiltInConstraint.DateTimeConstraint(), ConstraintType.CHECKER_OWEP, new IDataCreator() {
|
155
|
11
|
public IAnyTypeData newData() {
|
156
|
11
|
return new DateTimeData();
|
157
|
|
}
|
158
|
|
}, IDateTime.class));
|
159
|
|
|
160
|
|
public static final IAnySimpleType time = register(new BuiltInAtomicType(SOURCE_INFO, "time", anySimpleType, WhiteSpaceProcessing.COLLAPSE, new BuiltInConstraint.TimeConstraint(), ConstraintType.CHECKER_OWEP, new IDataCreator() {
|
161
|
7
|
public IAnyTypeData newData() {
|
162
|
7
|
return new TimeData();
|
163
|
|
}
|
164
|
|
}, ITime.class));
|
165
|
|
|
166
|
|
public static final IAnySimpleType duration = register(new BuiltInAtomicType(SOURCE_INFO, "duration", anySimpleType, WhiteSpaceProcessing.COLLAPSE, null, ConstraintType.CHECKER_OWEP, new IDataCreator() {
|
167
|
8
|
public IAnyTypeData newData() {
|
168
|
8
|
return new DurationData();
|
169
|
|
}
|
170
|
|
}, IDuration.class));
|
171
|
|
|
172
|
|
public static final IAnySimpleType date = register(new BuiltInAtomicType(SOURCE_INFO, "date", anySimpleType, WhiteSpaceProcessing.COLLAPSE, new BuiltInConstraint.GDateConstraint(), ConstraintType.CHECKER_OWEP, new IDataCreator() {
|
173
|
7
|
public IAnyTypeData newData() {
|
174
|
7
|
return new DateData();
|
175
|
|
}
|
176
|
|
}, IDate.class));
|
177
|
|
|
178
|
|
public static final IAnySimpleType gYearMonth = register(new BuiltInAtomicType(SOURCE_INFO, "gYearMonth", anySimpleType, WhiteSpaceProcessing.COLLAPSE, new BuiltInConstraint.GDateConstraint(), ConstraintType.CHECKER_OWEP, new IDataCreator() {
|
179
|
1
|
public IAnyTypeData newData() {
|
180
|
1
|
return new GYearMonthData();
|
181
|
|
}
|
182
|
|
}, IGYearMonth.class));
|
183
|
|
|
184
|
|
public static final IAnySimpleType gYear = register(new BuiltInAtomicType(SOURCE_INFO, "gYear", anySimpleType, WhiteSpaceProcessing.COLLAPSE, new BuiltInConstraint.GDateConstraint(), ConstraintType.CHECKER_OWEP, new IDataCreator() {
|
185
|
1
|
public IAnyTypeData newData() {
|
186
|
1
|
return new GYearData();
|
187
|
|
}
|
188
|
|
}, IGYear.class));
|
189
|
|
|
190
|
|
public static final IAnySimpleType gMonthDay = register(new BuiltInAtomicType(SOURCE_INFO, "gMonthDay", anySimpleType, WhiteSpaceProcessing.COLLAPSE, new BuiltInConstraint.GDateConstraint(), ConstraintType.CHECKER_OWEP, new IDataCreator() {
|
191
|
1
|
public IAnyTypeData newData() {
|
192
|
1
|
return new GMonthDayData();
|
193
|
|
}
|
194
|
|
}, IGMonthDay.class));
|
195
|
|
|
196
|
|
public static final IAnySimpleType gMonth = register(new BuiltInAtomicType(SOURCE_INFO, "gMonth", anySimpleType, WhiteSpaceProcessing.COLLAPSE, new BuiltInConstraint.GDateConstraint(), ConstraintType.CHECKER_OWEP, new IDataCreator() {
|
197
|
1
|
public IAnyTypeData newData() {
|
198
|
1
|
return new GMonthData();
|
199
|
|
}
|
200
|
|
}, IGMonth.class));
|
201
|
|
|
202
|
|
public static final IAnySimpleType gDay = register(new BuiltInAtomicType(SOURCE_INFO, "gDay", anySimpleType, WhiteSpaceProcessing.COLLAPSE, new BuiltInConstraint.GDateConstraint(), ConstraintType.CHECKER_OWEP, new IDataCreator() {
|
203
|
3
|
public IAnyTypeData newData() {
|
204
|
3
|
return new GDayData();
|
205
|
|
}
|
206
|
|
}, IGDay.class));
|
207
|
|
|
208
|
|
public static final IAnySimpleType string = register(new BuiltInAtomicType(SOURCE_INFO, "string", anySimpleType, WhiteSpaceProcessing.PRESERVE, null, ConstraintType.CHECKER_LWEP, new IDataCreator() {
|
209
|
347
|
public IAnyTypeData newData() {
|
210
|
347
|
return new StringData();
|
211
|
|
}
|
212
|
|
}, String.class));
|
213
|
|
|
214
|
|
public static final IAnySimpleType normalizedString = register(new BuiltInAtomicType(SOURCE_INFO, "normalizedString", string, WhiteSpaceProcessing.REPLACE, null, ConstraintType.CHECKER_LWEP, new IDataCreator() {
|
215
|
1
|
public IAnyTypeData newData() {
|
216
|
1
|
return new NormalizedStringData();
|
217
|
|
}
|
218
|
|
}, String.class));
|
219
|
|
|
220
|
|
public static final IAnySimpleType token = register(new BuiltInAtomicType(SOURCE_INFO, "token", normalizedString, WhiteSpaceProcessing.COLLAPSE, null, ConstraintType.CHECKER_LWEP, new IDataCreator() {
|
221
|
1
|
public IAnyTypeData newData() {
|
222
|
1
|
return new TokenData();
|
223
|
|
}
|
224
|
|
}, String.class));
|
225
|
|
|
226
|
|
public static final IAnySimpleType language = register(new BuiltInAtomicType(SOURCE_INFO, "language", token, WhiteSpaceProcessing.COLLAPSE, new BuiltInConstraint.Language(), ConstraintType.CHECKER_LWEP, new IDataCreator() {
|
227
|
2
|
public IAnyTypeData newData() {
|
228
|
2
|
return new LanguageData();
|
229
|
|
}
|
230
|
|
}, ILanguage.class));
|
231
|
|
|
232
|
|
public static final IAnySimpleType name = register(new BuiltInAtomicType(SOURCE_INFO, "Name", token, WhiteSpaceProcessing.COLLAPSE, new BuiltInConstraint.NameConstraint(), ConstraintType.CHECKER_LWEP, new IDataCreator() {
|
233
|
7
|
public IAnyTypeData newData() {
|
234
|
7
|
return new NameData();
|
235
|
|
}
|
236
|
|
}, String.class));
|
237
|
|
|
238
|
|
public static final IAnySimpleType ncName = register(new BuiltInAtomicType(SOURCE_INFO, "NCName", name, WhiteSpaceProcessing.COLLAPSE, new BuiltInConstraint.NcNameConstraint(), ConstraintType.CHECKER_LWEP, new IDataCreator() {
|
239
|
7
|
public IAnyTypeData newData() {
|
240
|
7
|
return new NCNameData();
|
241
|
|
}
|
242
|
|
}, String.class));
|
243
|
|
|
244
|
|
public static final IAnySimpleType id = register(new BuiltInAtomicType(SOURCE_INFO, "ID", ncName, WhiteSpaceProcessing.COLLAPSE, new BuiltInConstraint.IdConstraint(), ConstraintType.CHECKER_LWEP, new IDataCreator() {
|
245
|
14
|
public IAnyTypeData newData() {
|
246
|
14
|
return new IDData();
|
247
|
|
}
|
248
|
|
}, String.class));
|
249
|
|
|
250
|
|
public static final IAnySimpleType idRef = register(new BuiltInAtomicType(SOURCE_INFO, "IDREF", ncName, WhiteSpaceProcessing.COLLAPSE, new BuiltInConstraint.IdRefConstraint(), ConstraintType.CHECKER_LWEP, new IDataCreator() {
|
251
|
40
|
public IAnyTypeData newData() {
|
252
|
40
|
return new IDREFData();
|
253
|
|
}
|
254
|
|
}, String.class));
|
255
|
|
|
256
|
|
public static final IAnySimpleType entity = register(new BuiltInAtomicType(SOURCE_INFO, "ENTITY", ncName, WhiteSpaceProcessing.COLLAPSE, new BuiltInConstraint.EntityConstraint(), ConstraintType.CHECKER_LWEP, new IDataCreator() {
|
257
|
0
|
public IAnyTypeData newData() {
|
258
|
0
|
return new ENTITYData();
|
259
|
|
}
|
260
|
|
}, String.class));
|
261
|
|
|
262
|
|
public static final IAnySimpleType nmToken = register(new BuiltInAtomicType(SOURCE_INFO, "NMTOKEN", token, WhiteSpaceProcessing.COLLAPSE, new BuiltInConstraint.NmTokenConstraint(), ConstraintType.CHECKER_LWEP, new IDataCreator() {
|
263
|
4
|
public IAnyTypeData newData() {
|
264
|
4
|
return new NMTOKENData();
|
265
|
|
}
|
266
|
|
}, String.class));
|
267
|
|
|
268
|
|
public static final IAnySimpleType bool = register(new BuiltInAtomicType(SOURCE_INFO, "boolean", anySimpleType, WhiteSpaceProcessing.COLLAPSE, null, ConstraintType.CHECKER_WP, new IDataCreator() {
|
269
|
18
|
public IAnyTypeData newData() {
|
270
|
18
|
return new BooleanData();
|
271
|
|
}
|
272
|
|
}, Boolean.TYPE));
|
273
|
|
|
274
|
|
public static final IAnySimpleType base64Binary = register(new BuiltInAtomicType(SOURCE_INFO, "base64Binary", anySimpleType, WhiteSpaceProcessing.COLLAPSE, null, ConstraintType.CHECKER_LWEP, new IDataCreator() {
|
275
|
1
|
public IAnyTypeData newData() {
|
276
|
1
|
return new Base64BinaryData();
|
277
|
|
}
|
278
|
|
}, IBase64Binary.class));
|
279
|
|
|
280
|
|
public static final IAnySimpleType hexBinary = register(new BuiltInAtomicType(SOURCE_INFO, "hexBinary", anySimpleType, WhiteSpaceProcessing.COLLAPSE, null, ConstraintType.CHECKER_LWEP, new IDataCreator() {
|
281
|
1
|
public IAnyTypeData newData() {
|
282
|
1
|
return new HexBinaryData();
|
283
|
|
}
|
284
|
|
}, IHexBinary.class));
|
285
|
|
|
286
|
|
public static final IAnySimpleType flt = register(new BuiltInAtomicType(SOURCE_INFO, "float", anySimpleType, WhiteSpaceProcessing.COLLAPSE, null, ConstraintType.CHECKER_OWEP, new IDataCreator() {
|
287
|
3
|
public IAnyTypeData newData() {
|
288
|
3
|
return new FloatData();
|
289
|
|
}
|
290
|
|
}, Float.TYPE));
|
291
|
|
|
292
|
|
public static final IAnySimpleType dbl = register(new BuiltInAtomicType(SOURCE_INFO, "double", anySimpleType, WhiteSpaceProcessing.COLLAPSE, null, ConstraintType.CHECKER_OWEP, new IDataCreator() {
|
293
|
31
|
public IAnyTypeData newData() {
|
294
|
31
|
return new DoubleData();
|
295
|
|
}
|
296
|
|
}, Double.TYPE));
|
297
|
|
|
298
|
|
public static final IAnySimpleType anyUri = register(new BuiltInAtomicType(SOURCE_INFO, "anyURI", anySimpleType, WhiteSpaceProcessing.COLLAPSE, new BuiltInConstraint.AnyUri(), ConstraintType.CHECKER_LWEP, new IDataCreator() {
|
299
|
7
|
public IAnyTypeData newData() {
|
300
|
7
|
return new AnyURIData();
|
301
|
|
}
|
302
|
|
}, String.class));
|
303
|
|
|
304
|
|
public static final IAnySimpleType qName = register(new BuiltInAtomicType(SOURCE_INFO, "QName", anySimpleType, WhiteSpaceProcessing.COLLAPSE, new BuiltInConstraint.QNameConstraint(), ConstraintType.CHECKER_LWEP, new IDataCreator() {
|
305
|
1
|
public IAnyTypeData newData() {
|
306
|
1
|
return new QNameData();
|
307
|
|
}
|
308
|
|
}, IQName.class));
|
309
|
|
|
310
|
|
public static final IAnySimpleType notation = register(new BuiltInAtomicType(SOURCE_INFO, "NOTATION", anySimpleType, WhiteSpaceProcessing.COLLAPSE, new BuiltInConstraint.NotationConstraint(), ConstraintType.CHECKER_LWEP, new IDataCreator() {
|
311
|
0
|
public IAnyTypeData newData() {
|
312
|
0
|
return new NOTATIONData();
|
313
|
|
}
|
314
|
|
}, IQName.class));
|
315
|
|
|
316
|
|
public static final IAnySimpleType decimal = register(new BuiltInAtomicType(SOURCE_INFO, "decimal", anySimpleType, WhiteSpaceProcessing.COLLAPSE, null, ConstraintType.CHECKER_ODWEP, new IDataCreator() {
|
317
|
35
|
public IAnyTypeData newData() {
|
318
|
35
|
return new DecimalData();
|
319
|
|
}
|
320
|
|
}, BigDecimal.class));
|
321
|
|
|
322
|
|
public static final IAnySimpleType integer = register(new BuiltInAtomicType(SOURCE_INFO, "integer", decimal, WhiteSpaceProcessing.COLLAPSE, null, ConstraintType.CHECKER_ODWEP, new IDataCreator() {
|
323
|
38
|
public IAnyTypeData newData() {
|
324
|
38
|
return new IntegerData();
|
325
|
|
}
|
326
|
|
}, BigInteger.class));
|
327
|
|
|
328
|
|
public static final IAnySimpleType longType = register(new BuiltInAtomicType(SOURCE_INFO, "long", integer, WhiteSpaceProcessing.COLLAPSE, null, ConstraintType.CHECKER_ODWEP, new IDataCreator() {
|
329
|
5
|
public IAnyTypeData newData() {
|
330
|
5
|
return new LongData();
|
331
|
|
}
|
332
|
|
}, Long.TYPE));
|
333
|
|
|
334
|
|
public static final IAnySimpleType intType = register(new BuiltInAtomicType(SOURCE_INFO, "int", longType, WhiteSpaceProcessing.COLLAPSE, null, ConstraintType.CHECKER_ODWEP, new IDataCreator() {
|
335
|
130
|
public IAnyTypeData newData() {
|
336
|
130
|
return new IntData();
|
337
|
|
}
|
338
|
|
}, Integer.TYPE));
|
339
|
|
|
340
|
|
public static final IAnySimpleType shortType = register(new BuiltInAtomicType(SOURCE_INFO, "short", intType, WhiteSpaceProcessing.COLLAPSE, null, ConstraintType.CHECKER_ODWEP, new IDataCreator() {
|
341
|
4
|
public IAnyTypeData newData() {
|
342
|
4
|
return new ShortData();
|
343
|
|
}
|
344
|
|
}, Short.TYPE));
|
345
|
|
|
346
|
|
public static final IAnySimpleType byteType = register(new BuiltInAtomicType(SOURCE_INFO, "byte", shortType, WhiteSpaceProcessing.COLLAPSE, null, ConstraintType.CHECKER_ODWEP, new IDataCreator() {
|
347
|
10
|
public IAnyTypeData newData() {
|
348
|
10
|
return new ByteData();
|
349
|
|
}
|
350
|
|
}, Byte.TYPE));
|
351
|
|
|
352
|
|
public static final IAnySimpleType nonPositiveInteger = register(new BuiltInAtomicType(SOURCE_INFO, "nonPositiveInteger", integer, WhiteSpaceProcessing.COLLAPSE, new BuiltInConstraint.LessThanOrEqualToZero(), ConstraintType.CHECKER_ODWEP, new IDataCreator() {
|
353
|
1
|
public IAnyTypeData newData() {
|
354
|
1
|
return new NonPositiveIntegerData();
|
355
|
|
}
|
356
|
|
}, BigInteger.class));
|
357
|
|
|
358
|
|
public static final IAnySimpleType negativeInteger = register(new BuiltInAtomicType(SOURCE_INFO, "negativeInteger", nonPositiveInteger, WhiteSpaceProcessing.COLLAPSE, new BuiltInConstraint.LessThanZero(), ConstraintType.CHECKER_ODWEP, new IDataCreator() {
|
359
|
1
|
public IAnyTypeData newData() {
|
360
|
1
|
return new NegativeIntegerData();
|
361
|
|
}
|
362
|
|
}, BigInteger.class));
|
363
|
|
|
364
|
|
public static final IAnySimpleType nonNegativeInteger = register(new BuiltInAtomicType(SOURCE_INFO, "nonNegativeInteger", integer, WhiteSpaceProcessing.COLLAPSE, new BuiltInConstraint.GreaterThanOrEqualToZero(), ConstraintType.CHECKER_ODWEP, new IDataCreator() {
|
365
|
1
|
public IAnyTypeData newData() {
|
366
|
1
|
return new NonNegativeIntegerData();
|
367
|
|
}
|
368
|
|
}, BigInteger.class));
|
369
|
|
|
370
|
|
public static final IAnySimpleType positiveInteger = register(new BuiltInAtomicType(SOURCE_INFO, "positiveInteger", nonNegativeInteger, WhiteSpaceProcessing.COLLAPSE, new BuiltInConstraint.GreaterThanZero(), ConstraintType.CHECKER_ODWEP, new IDataCreator() {
|
371
|
3
|
public IAnyTypeData newData() {
|
372
|
3
|
return new PositiveIntegerData();
|
373
|
|
}
|
374
|
|
}, BigInteger.class));
|
375
|
|
|
376
|
|
public static final IAnySimpleType unsignedLong = register(new BuiltInAtomicType(SOURCE_INFO, "unsignedLong", nonNegativeInteger, WhiteSpaceProcessing.COLLAPSE, new BuiltInConstraint.UnsignedInteger(new BigInteger("18446744073709551615")), ConstraintType.CHECKER_ODWEP, new IDataCreator() {
|
377
|
1
|
public IAnyTypeData newData() {
|
378
|
1
|
return new UnsignedLongData();
|
379
|
|
}
|
380
|
|
}, BigInteger.class));
|
381
|
|
|
382
|
|
public static final IAnySimpleType unsignedInt = register(new BuiltInAtomicType(SOURCE_INFO, "unsignedInt", unsignedLong, WhiteSpaceProcessing.COLLAPSE, new BuiltInConstraint.UnsignedIntShortOrByte(4294967295l), ConstraintType.CHECKER_ODWEP, new IDataCreator() {
|
383
|
1
|
public IAnyTypeData newData() {
|
384
|
1
|
return new UnsignedIntData();
|
385
|
|
}
|
386
|
|
}, Long.TYPE));
|
387
|
|
|
388
|
|
public static final IAnySimpleType unsignedShort = register(new BuiltInAtomicType(SOURCE_INFO, "unsignedShort", unsignedInt, WhiteSpaceProcessing.COLLAPSE, new BuiltInConstraint.UnsignedIntShortOrByte(65535), ConstraintType.CHECKER_ODWEP, new IDataCreator() {
|
389
|
1
|
public IAnyTypeData newData() {
|
390
|
1
|
return new UnsignedShortData();
|
391
|
|
}
|
392
|
|
}, Integer.TYPE));
|
393
|
|
|
394
|
|
public static final IAnySimpleType unsignedByte = register(new BuiltInAtomicType(SOURCE_INFO, "unsignedByte", unsignedShort, WhiteSpaceProcessing.COLLAPSE, new BuiltInConstraint.UnsignedIntShortOrByte(255), ConstraintType.CHECKER_ODWEP, new IDataCreator() {
|
395
|
1
|
public IAnyTypeData newData() {
|
396
|
1
|
return new UnsignedByteData();
|
397
|
|
}
|
398
|
|
}, Short.TYPE));
|
399
|
|
|
400
|
|
public static final IAnySimpleType anyListType = register(new BuiltInListType(SOURCE_INFO, "anyListType", anySimpleType, new IDataCreator() {
|
401
|
10
|
public IAnyTypeData newData() {
|
402
|
10
|
return new AnyListTypeData();
|
403
|
|
}
|
404
|
|
}, anySimpleType));
|
405
|
|
|
406
|
|
public static final IAnySimpleType idRefs = register(new BuiltInListType(SOURCE_INFO, "IDREFS", anyListType, new IDataCreator() {
|
407
|
8
|
public IAnyTypeData newData() {
|
408
|
8
|
return new IDREFSData();
|
409
|
|
}
|
410
|
|
}, idRef));
|
411
|
|
|
412
|
|
public static final IAnySimpleType entities = register(new BuiltInListType(SOURCE_INFO, "ENTITIES", anyListType, new IDataCreator() {
|
413
|
0
|
public IAnyTypeData newData() {
|
414
|
0
|
return new ENTITIESData();
|
415
|
|
}
|
416
|
|
}, entity));
|
417
|
|
|
418
|
|
public static final IAnySimpleType nmTokens = register(new BuiltInListType(SOURCE_INFO, "NMTOKENS", anyListType, new IDataCreator() {
|
419
|
1
|
public IAnyTypeData newData() {
|
420
|
1
|
return new NMTOKENSData();
|
421
|
|
}
|
422
|
|
}, nmToken));
|
423
|
|
|
424
|
|
static {
|
425
|
3
|
if (!ourViolations.isEmpty()) {
|
426
|
0
|
Console.err(ourViolations.output(null));
|
427
|
0
|
System.exit(1);
|
428
|
|
}
|
429
|
|
}
|
430
|
|
|
431
|
0
|
private W3CTypes() {}
|
432
|
|
|
433
|
|
}
|
434
|
|
|