001: /*
002: * Copyright Aduna (http://www.aduna-software.com/) (c) 1997-2007.
003: *
004: * Licensed under the Aduna BSD-style license.
005: */
006: package org.openrdf.model.vocabulary;
007:
008: import org.openrdf.model.URI;
009: import org.openrdf.model.ValueFactory;
010: import org.openrdf.model.impl.ValueFactoryImpl;
011:
012: /**
013: * Defines constants for the standard XML Schema datatypes.
014: */
015: public class XMLSchema {
016:
017: /*
018: * The XML Schema namespace
019: */
020:
021: /** The XML Schema namespace (<tt>http://www.w3.org/2001/XMLSchema#</tt>). */
022: public static final String NAMESPACE = "http://www.w3.org/2001/XMLSchema#";
023:
024: /*
025: * Primitive datatypes
026: */
027:
028: /** <tt>http://www.w3.org/2001/XMLSchema#duration</tt> */
029: public final static URI DURATION;
030:
031: /** <tt>http://www.w3.org/2001/XMLSchema#dateTime</tt> */
032: public final static URI DATETIME;
033:
034: /** <tt>http://www.w3.org/2001/XMLSchema#time</tt> */
035: public final static URI TIME;
036:
037: /** <tt>http://www.w3.org/2001/XMLSchema#date</tt> */
038: public final static URI DATE;
039:
040: /** <tt>http://www.w3.org/2001/XMLSchema#gYearMonth</tt> */
041: public final static URI GYEARMONTH;
042:
043: /** <tt>http://www.w3.org/2001/XMLSchema#gYear</tt> */
044: public final static URI GYEAR;
045:
046: /** <tt>http://www.w3.org/2001/XMLSchema#gMonthDay</tt> */
047: public final static URI GMONTHDAY;
048:
049: /** <tt>http://www.w3.org/2001/XMLSchema#gDay</tt> */
050: public final static URI GDAY;
051:
052: /** <tt>http://www.w3.org/2001/XMLSchema#gMonth</tt> */
053: public final static URI GMONTH;
054:
055: /** <tt>http://www.w3.org/2001/XMLSchema#string</tt> */
056: public final static URI STRING;
057:
058: /** <tt>http://www.w3.org/2001/XMLSchema#boolean</tt> */
059: public final static URI BOOLEAN;
060:
061: /** <tt>http://www.w3.org/2001/XMLSchema#base64Binary</tt> */
062: public final static URI BASE64BINARY;
063:
064: /** <tt>http://www.w3.org/2001/XMLSchema#hexBinary</tt> */
065: public final static URI HEXBINARY;
066:
067: /** <tt>http://www.w3.org/2001/XMLSchema#float</tt> */
068: public final static URI FLOAT;
069:
070: /** <tt>http://www.w3.org/2001/XMLSchema#decimal</tt> */
071: public final static URI DECIMAL;
072:
073: /** <tt>http://www.w3.org/2001/XMLSchema#double</tt> */
074: public final static URI DOUBLE;
075:
076: /** <tt>http://www.w3.org/2001/XMLSchema#anyURI</tt> */
077: public final static URI ANYURI;
078:
079: /** <tt>http://www.w3.org/2001/XMLSchema#QName</tt> */
080: public final static URI QNAME;
081:
082: /** <tt>http://www.w3.org/2001/XMLSchema#NOTATION</tt> */
083: public final static URI NOTATION;
084:
085: /*
086: * Derived datatypes
087: */
088:
089: /** <tt>http://www.w3.org/2001/XMLSchema#normalizedString</tt> */
090: public final static URI NORMALIZEDSTRING;
091:
092: /** <tt>http://www.w3.org/2001/XMLSchema#token</tt> */
093: public final static URI TOKEN;
094:
095: /** <tt>http://www.w3.org/2001/XMLSchema#language</tt> */
096: public final static URI LANGUAGE;
097:
098: /** <tt>http://www.w3.org/2001/XMLSchema#NMTOKEN</tt> */
099: public final static URI NMTOKEN;
100:
101: /** <tt>http://www.w3.org/2001/XMLSchema#NMTOKENS</tt> */
102: public final static URI NMTOKENS;
103:
104: /** <tt>http://www.w3.org/2001/XMLSchema#Name</tt> */
105: public final static URI NAME;
106:
107: /** <tt>http://www.w3.org/2001/XMLSchema#NCName</tt> */
108: public final static URI NCNAME;
109:
110: /** <tt>http://www.w3.org/2001/XMLSchema#ID</tt> */
111: public final static URI ID;
112:
113: /** <tt>http://www.w3.org/2001/XMLSchema#IDREF</tt> */
114: public final static URI IDREF;
115:
116: /** <tt>http://www.w3.org/2001/XMLSchema#IDREFS</tt> */
117: public final static URI IDREFS;
118:
119: /** <tt>http://www.w3.org/2001/XMLSchema#ENTITY</tt> */
120: public final static URI ENTITY;
121:
122: /** <tt>http://www.w3.org/2001/XMLSchema#ENTITIES</tt> */
123: public final static URI ENTITIES;
124:
125: /** <tt>http://www.w3.org/2001/XMLSchema#integer</tt> */
126: public final static URI INTEGER;
127:
128: /** <tt>http://www.w3.org/2001/XMLSchema#long</tt> */
129: public final static URI LONG;
130:
131: /** <tt>http://www.w3.org/2001/XMLSchema#int</tt> */
132: public final static URI INT;
133:
134: /** <tt>http://www.w3.org/2001/XMLSchema#short</tt> */
135: public final static URI SHORT;
136:
137: /** <tt>http://www.w3.org/2001/XMLSchema#byte</tt> */
138: public final static URI BYTE;
139:
140: /** <tt>http://www.w3.org/2001/XMLSchema#nonPositiveInteger</tt> */
141: public final static URI NON_POSITIVE_INTEGER;
142:
143: /** <tt>http://www.w3.org/2001/XMLSchema#negativeInteger</tt> */
144: public final static URI NEGATIVE_INTEGER;
145:
146: /** <tt>http://www.w3.org/2001/XMLSchema#nonNegativeInteger</tt> */
147: public final static URI NON_NEGATIVE_INTEGER;
148:
149: /** <tt>http://www.w3.org/2001/XMLSchema#positiveInteger</tt> */
150: public final static URI POSITIVE_INTEGER;
151:
152: /** <tt>http://www.w3.org/2001/XMLSchema#unsignedLong</tt> */
153: public final static URI UNSIGNED_LONG;
154:
155: /** <tt>http://www.w3.org/2001/XMLSchema#unsignedInt</tt> */
156: public final static URI UNSIGNED_INT;
157:
158: /** <tt>http://www.w3.org/2001/XMLSchema#unsignedShort</tt> */
159: public final static URI UNSIGNED_SHORT;
160:
161: /** <tt>http://www.w3.org/2001/XMLSchema#unsignedByte</tt> */
162: public final static URI UNSIGNED_BYTE;
163:
164: static {
165: ValueFactory factory = new ValueFactoryImpl();
166:
167: DURATION = factory.createURI(XMLSchema.NAMESPACE, "duration");
168:
169: DATETIME = factory.createURI(XMLSchema.NAMESPACE, "dateTime");
170:
171: TIME = factory.createURI(XMLSchema.NAMESPACE, "time");
172:
173: DATE = factory.createURI(XMLSchema.NAMESPACE, "date");
174:
175: GYEARMONTH = factory.createURI(XMLSchema.NAMESPACE,
176: "gYearMonth");
177:
178: GYEAR = factory.createURI(XMLSchema.NAMESPACE, "gYear");
179:
180: GMONTHDAY = factory.createURI(XMLSchema.NAMESPACE, "gMonthDay");
181:
182: GDAY = factory.createURI(XMLSchema.NAMESPACE, "gDay");
183:
184: GMONTH = factory.createURI(XMLSchema.NAMESPACE, "gMonth");
185:
186: STRING = factory.createURI(XMLSchema.NAMESPACE, "string");
187:
188: BOOLEAN = factory.createURI(XMLSchema.NAMESPACE, "boolean");
189:
190: BASE64BINARY = factory.createURI(XMLSchema.NAMESPACE,
191: "base64Binary");
192:
193: HEXBINARY = factory.createURI(XMLSchema.NAMESPACE, "hexBinary");
194:
195: FLOAT = factory.createURI(XMLSchema.NAMESPACE, "float");
196:
197: DECIMAL = factory.createURI(XMLSchema.NAMESPACE, "decimal");
198:
199: DOUBLE = factory.createURI(XMLSchema.NAMESPACE, "double");
200:
201: ANYURI = factory.createURI(XMLSchema.NAMESPACE, "anyURI");
202:
203: QNAME = factory.createURI(XMLSchema.NAMESPACE, "QName");
204:
205: NOTATION = factory.createURI(XMLSchema.NAMESPACE, "NOTATION");
206:
207: NORMALIZEDSTRING = factory.createURI(XMLSchema.NAMESPACE,
208: "normalizedString");
209:
210: TOKEN = factory.createURI(XMLSchema.NAMESPACE, "token");
211:
212: LANGUAGE = factory.createURI(XMLSchema.NAMESPACE, "language");
213:
214: NMTOKEN = factory.createURI(XMLSchema.NAMESPACE, "NMTOKEN");
215:
216: NMTOKENS = factory.createURI(XMLSchema.NAMESPACE, "NMTOKENS");
217:
218: NAME = factory.createURI(XMLSchema.NAMESPACE, "Name");
219:
220: NCNAME = factory.createURI(XMLSchema.NAMESPACE, "NCName");
221:
222: ID = factory.createURI(XMLSchema.NAMESPACE, "ID");
223:
224: IDREF = factory.createURI(XMLSchema.NAMESPACE, "IDREF");
225:
226: IDREFS = factory.createURI(XMLSchema.NAMESPACE, "IDREFS");
227:
228: ENTITY = factory.createURI(XMLSchema.NAMESPACE, "ENTITY");
229:
230: ENTITIES = factory.createURI(XMLSchema.NAMESPACE, "ENTITIES");
231:
232: INTEGER = factory.createURI(XMLSchema.NAMESPACE, "integer");
233:
234: LONG = factory.createURI(XMLSchema.NAMESPACE, "long");
235:
236: INT = factory.createURI(XMLSchema.NAMESPACE, "int");
237:
238: SHORT = factory.createURI(XMLSchema.NAMESPACE, "short");
239:
240: BYTE = factory.createURI(XMLSchema.NAMESPACE, "byte");
241:
242: NON_POSITIVE_INTEGER = factory.createURI(XMLSchema.NAMESPACE,
243: "nonPositiveInteger");
244:
245: NEGATIVE_INTEGER = factory.createURI(XMLSchema.NAMESPACE,
246: "negativeInteger");
247:
248: NON_NEGATIVE_INTEGER = factory.createURI(XMLSchema.NAMESPACE,
249: "nonNegativeInteger");
250:
251: POSITIVE_INTEGER = factory.createURI(XMLSchema.NAMESPACE,
252: "positiveInteger");
253:
254: UNSIGNED_LONG = factory.createURI(XMLSchema.NAMESPACE,
255: "unsignedLong");
256:
257: UNSIGNED_INT = factory.createURI(XMLSchema.NAMESPACE,
258: "unsignedInt");
259:
260: UNSIGNED_SHORT = factory.createURI(XMLSchema.NAMESPACE,
261: "unsignedShort");
262:
263: UNSIGNED_BYTE = factory.createURI(XMLSchema.NAMESPACE,
264: "unsignedByte");
265: }
266: }
|