KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > hp > hpl > jena > vocabulary > XSD


1 /******************************************************************
2  * File: XSD.java
3  * Created by: Dave Reynolds
4  * Created on: 27-Mar-03
5  *
6  * (c) Copyright 2003, 2004, 2005 Hewlett-Packard Development Company, LP
7  * [See end of file]
8  * $Id: XSD.java,v 1.8 2005/02/21 12:21:37 andy_seaborne Exp $
9  *****************************************************************/

10 package com.hp.hpl.jena.vocabulary;
11
12 import com.hp.hpl.jena.rdf.model.Resource;
13 import com.hp.hpl.jena.rdf.model.ResourceFactory;
14 import com.hp.hpl.jena.datatypes.xsd.XSDDatatype;
15
16 /**
17  * Defines Jena resources corresponding to the URIs for
18  * the XSD primitive datatypes which are known to Jena.
19  *
20  * @author <a HREF="mailto:der@hplb.hpl.hp.com">Dave Reynolds</a>
21  * @version $Revision: 1.8 $ on $Date: 2005/02/21 12:21:37 $
22  */

23 public class XSD {
24     /** Resource URI for xsd:float */
25     public static Resource xfloat;
26     
27     /** Resource URI for xsd:double */
28     public static Resource xdouble;
29     
30     /** Resource URI for xsd:int */
31     public static Resource xint;
32     
33     /** Resource URI for xsd:long */
34     public static Resource xlong;
35        
36     /** Resource URI for xsd:short */
37     public static Resource xshort;
38        
39     /** Resource URI for xsd:byte */
40     public static Resource xbyte;
41        
42     /** Resource URI for xsd:boolean */
43     public static Resource xboolean;
44     
45     /** Resource URI for xsd:string */
46     public static Resource xstring;
47     
48     /** Resource URI for xsd:unsignedByte */
49     public static Resource unsignedByte;
50        
51     /** Resource URI for xsd:unsignedShort */
52     public static Resource unsignedShort;
53        
54     /** Resource URI for xsd:unsignedInt */
55     public static Resource unsignedInt;
56        
57     /** Resource URI for xsd:unsignedLong */
58     public static Resource unsignedLong;
59        
60     /** Resource URI for xsd:decimal */
61     public static Resource decimal;
62        
63     /** Resource URI for xsd:integer */
64     public static Resource integer;
65        
66     /** Resource URI for xsd:nonPositiveInteger */
67     public static Resource nonPositiveInteger;
68        
69     /** Resource URI for xsd:nonNegativeInteger */
70     public static Resource nonNegativeInteger;
71        
72     /** Resource URI for xsd:positiveInteger */
73     public static Resource positiveInteger;
74        
75     /** Resource URI for xsd:negativeInteger */
76     public static Resource negativeInteger;
77        
78     /** Resource URI for xsd:normalizedString */
79     public static Resource normalizedString;
80     
81     /** Resource URI for xsd:anyURI */
82     public static Resource anyURI;
83     
84     /** Resource URI for xsd:token */
85     public static Resource token;
86
87     /** Resource URI for xsd:Name */
88     public static Resource Name;
89
90     /** Resource URI for xsd:QName */
91     public static Resource QName;
92
93     /** Resource URI for xsd:language */
94     public static Resource language;
95
96     /** Resource URI for xsd:NMTOKEN */
97     public static Resource NMTOKEN;
98
99     /** Resource URI for xsd:ENTITIES */
100     public static Resource ENTITIES;
101
102     /** Resource URI for xsd:NMTOKENS */
103     public static Resource NMTOKENS;
104
105     /** Resource URI for xsd:ENTITY */
106     public static Resource ENTITY;
107
108     /** Resource URI for xsd:ID */
109     public static Resource ID;
110
111     /** Resource URI for xsd:NCName */
112     public static Resource NCName;
113
114     /** Resource URI for xsd:IDREF */
115     public static Resource IDREF;
116
117     /** Resource URI for xsd:IDREFS */
118     public static Resource IDREFS;
119
120     /** Resource URI for xsd:NOTATION */
121     public static Resource NOTATION;
122
123     /** Resource URI for xsd:hexBinary */
124     public static Resource hexBinary;
125
126     /** Resource URI for xsd:base64Binary */
127     public static Resource base64Binary;
128
129     /** Resource URI for xsd:date */
130     public static Resource date;
131
132     /** Resource URI for xsd:time */
133     public static Resource time;
134
135     /** Resource URI for xsd:dateTime */
136     public static Resource dateTime;
137
138     /** Resource URI for xsd:duration */
139     public static Resource duration;
140
141     /** Resource URI for xsd:gDay */
142     public static Resource gDay;
143
144     /** Resource URI for xsd:gMonth */
145     public static Resource gMonth;
146
147     /** Resource URI for xsd:gYear */
148     public static Resource gYear;
149
150     /** Resource URI for xsd:gYearMonth */
151     public static Resource gYearMonth;
152
153     /** Resource URI for xsd:gMonthDay */
154     public static Resource gMonthDay;
155
156     // Initializer
157
static {
158         xfloat = ResourceFactory.createResource(XSDDatatype.XSDfloat.getURI());
159         xdouble = ResourceFactory.createResource(XSDDatatype.XSDdouble.getURI());
160         xint = ResourceFactory.createResource(XSDDatatype.XSDint.getURI());
161         xlong = ResourceFactory.createResource(XSDDatatype.XSDlong.getURI());
162         xshort = ResourceFactory.createResource(XSDDatatype.XSDshort.getURI());
163         xbyte = ResourceFactory.createResource(XSDDatatype.XSDbyte.getURI());
164         unsignedByte = ResourceFactory.createResource(XSDDatatype.XSDunsignedByte.getURI());
165         unsignedShort = ResourceFactory.createResource(XSDDatatype.XSDunsignedShort.getURI());
166         unsignedInt = ResourceFactory.createResource(XSDDatatype.XSDunsignedInt.getURI());
167         unsignedLong = ResourceFactory.createResource(XSDDatatype.XSDunsignedLong.getURI());
168         decimal = ResourceFactory.createResource(XSDDatatype.XSDdecimal.getURI());
169         integer = ResourceFactory.createResource(XSDDatatype.XSDinteger.getURI());
170         nonPositiveInteger = ResourceFactory.createResource(XSDDatatype.XSDnonPositiveInteger.getURI());
171         nonNegativeInteger = ResourceFactory.createResource(XSDDatatype.XSDnonNegativeInteger.getURI());
172         positiveInteger = ResourceFactory.createResource(XSDDatatype.XSDpositiveInteger.getURI());
173         negativeInteger = ResourceFactory.createResource(XSDDatatype.XSDnegativeInteger.getURI());
174         xboolean = ResourceFactory.createResource(XSDDatatype.XSDboolean.getURI());
175         xstring = ResourceFactory.createResource(XSDDatatype.XSDstring.getURI());
176         normalizedString = ResourceFactory.createResource(XSDDatatype.XSDnormalizedString.getURI());
177         anyURI = ResourceFactory.createResource(XSDDatatype.XSDanyURI.getURI());
178         token = ResourceFactory.createResource(XSDDatatype.XSDtoken.getURI());
179         Name = ResourceFactory.createResource(XSDDatatype.XSDName.getURI());
180         QName = ResourceFactory.createResource(XSDDatatype.XSDQName.getURI());
181         language = ResourceFactory.createResource(XSDDatatype.XSDlanguage.getURI());
182         NMTOKEN = ResourceFactory.createResource(XSDDatatype.XSDNMTOKEN.getURI());
183         ENTITY = ResourceFactory.createResource(XSDDatatype.XSDENTITY.getURI());
184         ID = ResourceFactory.createResource(XSDDatatype.XSDID.getURI());
185         NCName = ResourceFactory.createResource(XSDDatatype.XSDNCName.getURI());
186         IDREF = ResourceFactory.createResource(XSDDatatype.XSDIDREF.getURI());
187         NOTATION = ResourceFactory.createResource(XSDDatatype.XSDNOTATION.getURI());
188         hexBinary = ResourceFactory.createResource(XSDDatatype.XSDhexBinary.getURI());
189         base64Binary = ResourceFactory.createResource(XSDDatatype.XSDbase64Binary.getURI());
190         date = ResourceFactory.createResource(XSDDatatype.XSDdate.getURI());
191         time = ResourceFactory.createResource(XSDDatatype.XSDtime.getURI());
192         dateTime = ResourceFactory.createResource(XSDDatatype.XSDdateTime.getURI());
193         duration = ResourceFactory.createResource(XSDDatatype.XSDduration.getURI());
194         gDay = ResourceFactory.createResource(XSDDatatype.XSDgDay.getURI());
195         gMonth = ResourceFactory.createResource(XSDDatatype.XSDgMonth.getURI());
196         gYear = ResourceFactory.createResource(XSDDatatype.XSDgYear.getURI());
197         gYearMonth = ResourceFactory.createResource(XSDDatatype.XSDgYearMonth.getURI());
198         gMonthDay = ResourceFactory.createResource(XSDDatatype.XSDgMonthDay.getURI());
199 // ENTITIES = ResourceFactory.createResource(XSDDatatype.XSDENTITIES.getURI());
200
// NMTOKENS = ResourceFactory.createResource(XSDDatatype.XSDNMTOKENS.getURI());
201
// IDREFS = ResourceFactory.createResource(XSDDatatype.XSDIDREFS.getURI());
202
}
203 }
204
205 /*
206     (c) Copyright 2003, 2004, 2005 Hewlett-Packard Development Company, LP
207     All rights reserved.
208
209     Redistribution and use in source and binary forms, with or without
210     modification, are permitted provided that the following conditions
211     are met:
212
213     1. Redistributions of source code must retain the above copyright
214        notice, this list of conditions and the following disclaimer.
215
216     2. Redistributions in binary form must reproduce the above copyright
217        notice, this list of conditions and the following disclaimer in the
218        documentation and/or other materials provided with the distribution.
219
220     3. The name of the author may not be used to endorse or promote products
221        derived from this software without specific prior written permission.
222
223     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
224     IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
225     OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
226     IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
227     INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
228     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
229     DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
230     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
231     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
232     THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
233 */

234
Popular Tags