001: /*
002: * LICENSE INFORMATION
003: * Copyright 2005-2007 by FZI (http://www.fzi.de).
004: * Licensed under a BSD license (http://www.opensource.org/licenses/bsd-license.php)
005: * <OWNER> = Max Völkel
006: * <ORGANIZATION> = FZI Forschungszentrum Informatik Karlsruhe, Karlsruhe, Germany
007: * <YEAR> = 2007
008: *
009: * Project information at http://semweb4j.org/rdf2go
010: *
011: * Created on Nov 29, 2004
012: *
013: */
014: package org.ontoware.rdf2go.vocabulary;
015:
016: import org.ontoware.rdf2go.model.node.URI;
017: import org.ontoware.rdf2go.model.node.impl.URIImpl;
018:
019: /**
020: * The XML Schema vocabulary as URIs
021: *
022: * @author mvo
023: *
024: */
025: public class XSD {
026:
027: /**
028: * The XML Schema Namespace
029: */
030: public static final String XSD_NS = "http://www.w3.org/2001/XMLSchema#";
031:
032: protected static final URI toURI(String local) {
033: return new URIImpl(XSD_NS + local, false);
034: }
035:
036: public static final URI _string = toURI("string");
037:
038: public static final URI _boolean = toURI("boolean");
039:
040: public static final URI _float = toURI("float");
041:
042: public static final URI _double = toURI("double");
043:
044: public static final URI _decimal = toURI("decimal");
045:
046: /**
047: * According to <a
048: * href="http://www.w3.org/2001/sw/BestPractices/XSCH/xsch-sw-20050127/#section-duration">this</a>
049: * SHOULD NOT be used: xsd:duration does not have a well-defined value
050: * space.
051: *
052: * Instead use {@link _yearMonthDuration} or {@link _dayTimeDuration}
053: */
054: @Deprecated
055: public static final URI _duration = toURI("duration");
056:
057: /**
058: * As discussed in
059: * http://www.w3.org/2001/sw/BestPractices/XSCH/xsch-sw-20050127/#section-duration
060: * an standardised in http://www.w3.org/TR/xpath-datamodel/#notation
061: *
062: * Note: The XML namespace is 'http://www.w3.org/2001/XMLSchema', but RDF
063: * people seems to have agreed on using '#' atht eh end to create a
064: * URI-prefix
065: */
066: public static final String XS_URIPREFIX = "http://www.w3.org/2001/XMLSchema#";
067:
068: public static final URI _yearMonthDuration = new URIImpl(
069: XS_URIPREFIX + "yearMonthDuration", false);
070:
071: public static final URI _dayTimeDuration = new URIImpl(XS_URIPREFIX
072: + "dayTimeDuration", false);
073:
074: public static final URI _dateTime = toURI("dateTime");
075:
076: public static final URI _time = toURI("time");
077:
078: public static final URI _date = toURI("date");
079:
080: public static final URI _gYearMonth = toURI("gYearMonth");
081:
082: public static final URI _gYear = toURI("gYear");
083:
084: public static final URI _gMonthDay = toURI("gMonthDay");
085:
086: public static final URI _gDay = toURI("gDay");
087:
088: public static final URI _gMonth = toURI("gMonth");
089:
090: public static final URI _hexBinary = toURI("hexBinary");
091:
092: public static final URI _base64Binary = toURI("base64Binary");
093:
094: public static final URI _anyURI = toURI("anyURI");
095:
096: public static final URI _QName = toURI("QName");
097:
098: public static final URI _normalizedString = toURI("normalizedString");
099:
100: public static final URI _token = toURI("token");
101:
102: public static final URI _language = toURI("language");
103:
104: public static final URI _IDREFS = toURI("IDREFS");
105:
106: public static final URI _ENTITIES = toURI("ENTITIES");
107:
108: public static final URI _NMTOKEN = toURI("NMTOKEN");
109:
110: public static final URI _NMTOKENS = toURI("NMTOKENS");
111:
112: public static final URI _Name = toURI("Name");
113:
114: public static final URI _NCName = toURI("NCName");
115:
116: public static final URI _ID = toURI("ID");
117:
118: public static final URI _IDREF = toURI("IDREF");
119:
120: public static final URI _ENTITY = toURI("ENTITY");
121:
122: public static final URI _integer = toURI("integer");
123:
124: public static final URI _nonPositiveInteger = toURI("nonPositiveInteger");
125:
126: public static final URI _negativeInteger = toURI("negativeInteger");
127:
128: public static final URI _long = toURI("long");
129:
130: /**
131: * http://www.w3.org/TR/xmlschema-2/datatypes.html#int
132: *
133: * [Definition:] int is derived from long by setting the value of
134: * maxInclusive to be 2147483647 and minInclusive to be -2147483648. The
135: * base type of int is long.
136: *
137: */
138: public static final URI _int = toURI("int");
139:
140: public static final URI _short = toURI("short");
141:
142: public static final URI _byte = toURI("byte");
143:
144: public static final URI _nonNegativeInteger = toURI("nonNegativeInteger");
145:
146: public static final URI _unsignedLong = toURI("unsignedLong");
147:
148: public static final URI _unsignedInt = toURI("unsignedInt");
149:
150: public static final URI _unsignedShort = toURI("unsignedShort");
151:
152: public static final URI _unsignedByte = toURI("unsignedByte");
153:
154: public static final URI _positiveInteger = toURI("positiveInteger");
155:
156: /**
157: * For convenience: An array of all types in this interface
158: */
159: public static final URI[] ALL = new URI[] { _string, _boolean,
160: _float, _double, _decimal, _duration, _dateTime, _time,
161: _date, _gYearMonth, _gYear, _gMonthDay, _gDay, _gMonth,
162: _hexBinary, _base64Binary, _anyURI, _QName,
163: _normalizedString, _token, _language, _IDREFS, _ENTITIES,
164: _NMTOKEN, _NMTOKENS, _Name, _NCName, _ID, _IDREF, _ENTITY,
165: _integer, _nonPositiveInteger, _negativeInteger, _long,
166: _int, _short, _byte, _nonNegativeInteger, _unsignedLong,
167: _unsignedInt, _unsignedShort, _unsignedByte,
168: _positiveInteger
169:
170: };
171:
172: }
|