KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*****************************************************************************
2  * Source code information
3  * -----------------------
4  * Original author Ian Dickinson, HP Labs Bristol
5  * Author email Ian.Dickinson@hp.com
6  * Package Jena
7  * Created 16 Jan 2001
8  * Filename $RCSfile: DAML_OIL.java,v $
9  * Revision $Revision: 1.10 $
10  * Release status Preview-release $State: Exp $
11  *
12  * Last modified on $Date: 2005/02/21 12:21:27 $
13  * by $Author: andy_seaborne $
14  *
15  * (c) Copyright 2001, 2002, 2003, 2004, 2005 Hewlett-Packard Development Company, LP
16  * (see footer for full conditions)
17  *****************************************************************************/

18
19 // Package
20
///////////////
21
package com.hp.hpl.jena.vocabulary;
22
23
24 // Imports
25
///////////////
26
import com.hp.hpl.jena.rdf.model.*;
27
28 /**
29  * <p>
30  * Defines a vocabulary of RDF constants used by the latest release of DAML+oil
31  * for class and property names. The contract maintained by the DAML_OIL class
32  * is that it will be periodically updated to reflect the latest release of DAML+OIL.
33  * Currently this is the March 2001 release. Older versions of the DAML+OIL
34  * vocabulary, for compatability with older ontology documents, are maintained in
35  * classes named <code>DAML_OIL_YYYY_MM</code>, for example DAML_OIL_2000_12.
36  * </p>
37  * <p>
38  * <b>Note</b> that rudimentary support for multiple versions of DAML namespaces is
39  * included in this release, by the mechanism of providing methods with the same
40  * names as the static constants in the {@link DAMLVocabulary} interface. This mechanism
41  * is still under design review, and may change in future versions of Jena.
42  * </p>
43  * <p>
44  * Note also that the capitalisation of
45  * the constants herein is designed to follow normal practice in the RDF community, rather
46  * than normal practice in the Java community. This is consistent with the capitalisation
47  * of constants in Jena.
48  * </p>
49  *
50  * @author Ian Dickinson, HP Labs (<a HREF="mailto:Ian.Dickinson@hp.com">email</a>)
51  * @version CVS info: $Id: DAML_OIL.java,v 1.10 2005/02/21 12:21:27 andy_seaborne Exp $
52  */

53 public class DAML_OIL
54     implements DAMLVocabulary
55 {
56     // Constants
57
//////////////////////////////////
58

59     /** Singleton instance reference */
60     private static DAML_OIL s_instance = new DAML_OIL();
61
62     /** Model to hold the vocab resoures */
63     private static Model s_model = ModelFactory.createDefaultModel();
64     
65     /* Resources */
66
67     /** DAML namespace resource for the current release */
68     public static final Resource NAMESPACE_DAML = s_model.createResource( NAMESPACE_DAML_2001_03_URI );
69
70     /** DAML namespace resource for daml:collection. Note: strictly
71      * daml:collection is only a string, not a resource in the DAML namespace. */

72     public static final Resource collection = s_model.createResource( NAMESPACE_DAML_2001_03_URI+"collection" );
73
74     /** RDF resource for DAML List class. */
75     public static final Resource List = s_model.createResource( NAMESPACE_DAML_2001_03_URI + "List" );
76
77     /** RDF resource for DAML UniqueProperty class */
78     public static final Resource UniqueProperty = s_model.createResource( NAMESPACE_DAML_2001_03_URI + "UniqueProperty" );
79
80     /** RDF resource for DAML TransitiveProperty class */
81     public static final Resource TransitiveProperty = s_model.createResource( NAMESPACE_DAML_2001_03_URI + "TransitiveProperty" );
82
83     /** RDF resource for DAML UnambiguousProperty class */
84     public static final Resource UnambiguousProperty = s_model.createResource( NAMESPACE_DAML_2001_03_URI + "UnambiguousProperty" );
85
86     /** RDF resource for DAML Restriction class */
87     public static final Resource Restriction = s_model.createResource( NAMESPACE_DAML_2001_03_URI + "Restriction" );
88
89     /** RDF resource for DAML Ontology class */
90     public static final Resource Ontology = s_model.createResource( NAMESPACE_DAML_2001_03_URI + "Ontology" );
91
92     /** RDF resource for the nil (empty) list. */
93     public static final Resource nil = s_model.createResource( NAMESPACE_DAML_2001_03_URI + "nil" );
94
95     /** RDF resource for the top type (i.e. the super-type of all types). */
96     public static final Resource Thing = s_model.createResource( NAMESPACE_DAML_2001_03_URI + "Thing" );
97
98     /** RDF resource for the bottom type (i.e. the super-type of no types). */
99     public static final Resource Nothing = s_model.createResource( NAMESPACE_DAML_2001_03_URI + "Nothing" );
100
101     /** Alias for rdfs:Literal in the daml namespace. */
102     public static final Resource Literal = s_model.createResource( NAMESPACE_DAML_2001_03_URI + "Literal" );
103
104     /** RDF resource for DAML Class class (a DAML sub-class of rdfs:Class). */
105     public static final Resource Class = s_model.createResource( NAMESPACE_DAML_2001_03_URI + "Class" );
106
107     /** RDF resource for DAML Datatype class (a DAML sub-class of rdfs:Class). */
108     public static final Resource Datatype = s_model.createResource( NAMESPACE_DAML_2001_03_URI + "Datatype" );
109
110     /** RDF resource for DAML DatatypeProperty class (a DAML sub-class of rdf:Property). */
111     public static final Resource DatatypeProperty = s_model.createResource( NAMESPACE_DAML_2001_03_URI + "DatatypeProperty" );
112
113     /** RDF resource for DAML ObjectProperty class (a DAML sub-class of rdf:Property). */
114     public static final Resource ObjectProperty = s_model.createResource( NAMESPACE_DAML_2001_03_URI + "ObjectProperty" );
115
116     /** Alias for rdfs:Property in the daml namespace. From 2001/03 onwards, use of ObjectProperty or DatatypeProperty is suggested. */
117     public static final Resource Property = s_model.createResource( NAMESPACE_DAML_2001_03_URI + "Property" );
118
119
120     /* Properties */
121
122     /** RDF Property for the DAML versionInfo property */
123     public static Property versionInfo = null;
124
125     /** RDF Property for the DAML imports property on Ontologies */
126     public static Property imports = null;
127
128     /** RDF Property for the DAML disjointWith property on Classes */
129     public static Property disjointWith = null;
130
131     /** RDF Property for the DAML disjointUnionOf property on Classes */
132     public static Property disjointUnionOf = null;
133
134     /** RDF Property for the DAML sameClassAs property on Classes */
135     public static Property sameClassAs = null;
136
137     /** RDF Property for the DAML samePropertyAs property on Properties */
138     public static Property samePropertyAs = null;
139
140     /** RDF Property for the oneOf property on DAML class expressions */
141     public static Property oneOf = null;
142
143     /** RDF Property for the intersectionOf property on class expressions */
144     public static Property intersectionOf = null;
145
146     /** RDF Property for the unionOf property on class expressions */
147     public static Property unionOf = null;
148
149     /** RDF Property for the complementOf property on class expressions */
150     public static Property complementOf = null;
151
152     /** RDF Property for the equivalentTo property on DAML values */
153     public static Property equivalentTo = null;
154
155     /** RDF Property for the DAML onProperty property on Restrictions */
156     public static Property onProperty = null;
157
158     /** RDF Property for the DAML toClass property on Restrictions */
159     public static Property toClass = null;
160
161     /** RDF Property for the DAML hasValue property on Restrictions */
162     public static Property hasValue = null;
163
164     /** RDF Property for the DAML hasClass property on Restrictions */
165     public static Property hasClass = null;
166
167     /** RDF Property for the DAML hasClassQ property on Restrictions */
168     public static Property hasClassQ = null;
169
170     /** RDF Property for the DAML cardinality property on Restrictions */
171     public static Property cardinality = null;
172
173     /** RDF Property for the DAML minCardinality property on Restrictions */
174     public static Property minCardinality = null;
175
176     /** RDF Property for the DAML maxCardinality property on Restrictions */
177     public static Property maxCardinality = null;
178
179     /** RDF Property for the DAML cardinalityQ property on Restrictions */
180     public static Property cardinalityQ = null;
181
182     /** RDF Property for the DAML minCardinalityQ property on Restrictions */
183     public static Property minCardinalityQ = null;
184
185     /** RDF Property for the DAML maxCardinalityQ property on Restrictions */
186     public static Property maxCardinalityQ = null;
187
188     /** RDF Property for the DAML inverseOf property on Properties */
189     public static Property inverseOf = null;
190
191     /** RDF Property for the DAML first property on Lists */
192     public static Property first = null;
193
194     /** RDF Property for the DAML rest property on Lists */
195     public static Property rest = null;
196
197     /** RDF Property for the DAML item property on Lists */
198     public static Property item = null;
199
200     /** Alias for rdfs:subPropertyOf in daml namespace */
201     public static Property subPropertyOf = null;
202
203     /** Alias for rdf:type in daml namespace */
204     public static Property type = null;
205
206     /** Alias for rdf:value in daml namespace */
207     public static Property value = null;
208
209     /** Alias for rdfs:subClassOf in daml namespace */
210     public static Property subClassOf = null;
211
212     /** Alias for rdfs:domain in daml namespace */
213     public static Property domain = null;
214
215     /** Alias for rdfs:range in daml namespace */
216     public static Property range = null;
217
218     /** Alias for rdfs:label in daml namespace */
219     public static Property label = null;
220
221     /** Alias for rdfs:comment in daml namespace */
222     public static Property comment = null;
223
224     /** Alias for rdfs:seeAlso in daml namespace */
225     public static Property seeAlso = null;
226
227     /** Alias for rdfs:isDefinedBy in daml namespace */
228     public static Property isDefinedBy = null;
229
230     /** RDF Property for the DAML sameIndividualAs property on instances */
231     public static Property sameIndividualAs = null;
232
233     /** RDF Property for the DAML differentIndvidualFrom property on instances */
234     public static Property differentIndividualFrom = null;
235
236
237     // Static variables
238
//////////////////////////////////
239

240     static {
241             // properties:
242
versionInfo = s_model.createProperty( NAMESPACE_DAML_2001_03_URI, "versionInfo" );
243             imports = s_model.createProperty( NAMESPACE_DAML_2001_03_URI, "imports" );
244             disjointWith = s_model.createProperty( NAMESPACE_DAML_2001_03_URI, "disjointWith" );
245             disjointUnionOf = s_model.createProperty( NAMESPACE_DAML_2001_03_URI, "disjointUnionOf" );
246             sameClassAs = s_model.createProperty( NAMESPACE_DAML_2001_03_URI, "sameClassAs" );
247             samePropertyAs = s_model.createProperty( NAMESPACE_DAML_2001_03_URI, "samePropertyAs" );
248             equivalentTo = s_model.createProperty( NAMESPACE_DAML_2001_03_URI, "equivalentTo" );
249             oneOf = s_model.createProperty( NAMESPACE_DAML_2001_03_URI, "oneOf" );
250             intersectionOf = s_model.createProperty( NAMESPACE_DAML_2001_03_URI, "intersectionOf" );
251             unionOf = s_model.createProperty( NAMESPACE_DAML_2001_03_URI, "unionOf" );
252             complementOf = s_model.createProperty( NAMESPACE_DAML_2001_03_URI, "complementOf" );
253             onProperty = s_model.createProperty( NAMESPACE_DAML_2001_03_URI, "onProperty" );
254             toClass = s_model.createProperty( NAMESPACE_DAML_2001_03_URI, "toClass" );
255             hasValue = s_model.createProperty( NAMESPACE_DAML_2001_03_URI, "hasValue" );
256             hasClass = s_model.createProperty( NAMESPACE_DAML_2001_03_URI, "hasClass" );
257             hasClassQ = s_model.createProperty( NAMESPACE_DAML_2001_03_URI, "hasClassQ" );
258             cardinality = s_model.createProperty( NAMESPACE_DAML_2001_03_URI, "cardinality" );
259             cardinalityQ = s_model.createProperty( NAMESPACE_DAML_2001_03_URI, "cardinalityQ" );
260             minCardinality = s_model.createProperty( NAMESPACE_DAML_2001_03_URI, "minCardinality" );
261             minCardinalityQ = s_model.createProperty( NAMESPACE_DAML_2001_03_URI, "minCardinalityQ" );
262             maxCardinality = s_model.createProperty( NAMESPACE_DAML_2001_03_URI, "maxCardinality" );
263             maxCardinalityQ = s_model.createProperty( NAMESPACE_DAML_2001_03_URI, "maxCardinalityQ" );
264             inverseOf = s_model.createProperty( NAMESPACE_DAML_2001_03_URI, "inverseOf" );
265             first = s_model.createProperty( NAMESPACE_DAML_2001_03_URI, "first" );
266             rest = s_model.createProperty( NAMESPACE_DAML_2001_03_URI, "rest" );
267             item = s_model.createProperty( NAMESPACE_DAML_2001_03_URI, "item" );
268             subPropertyOf = s_model.createProperty( NAMESPACE_DAML_2001_03_URI, "subPropertyOf" );
269             type = s_model.createProperty( NAMESPACE_DAML_2001_03_URI, "type" );
270             value = s_model.createProperty( NAMESPACE_DAML_2001_03_URI, "value" );
271             subClassOf = s_model.createProperty( NAMESPACE_DAML_2001_03_URI, "subClassOf" );
272             domain = s_model.createProperty( NAMESPACE_DAML_2001_03_URI, "domain" );
273             range = s_model.createProperty( NAMESPACE_DAML_2001_03_URI, "range" );
274             label = s_model.createProperty( NAMESPACE_DAML_2001_03_URI, "label" );
275             comment = s_model.createProperty( NAMESPACE_DAML_2001_03_URI, "comment" );
276             seeAlso = s_model.createProperty( NAMESPACE_DAML_2001_03_URI, "seeAlso" );
277             isDefinedBy = s_model.createProperty( NAMESPACE_DAML_2001_03_URI, "isDefinedBy" );
278
279             sameIndividualAs = s_model.createProperty( NAMESPACE_DAML_2001_03_URI, "sameIndividualAs" );
280             differentIndividualFrom = s_model.createProperty( NAMESPACE_DAML_2001_03_URI, "differentIndividualFrom" );
281     }
282
283
284     // Instance variables
285
//////////////////////////////////
286

287
288     // Constructors
289
//////////////////////////////////
290

291     /**
292      * Constructor is private to ensure that only a single instance is available.
293      */

294     private DAML_OIL() {
295     }
296
297
298     // External signature methods
299
//////////////////////////////////
300

301     /**
302      * Answer the namespace URI for a the current vocabulary. Note that this value is used to
303      * construct the constants in the vocabulary, assuring that they are in the correct namespace
304      * for this release.
305      *
306      * @return the namespace URI as a string.
307      */

308     public String JavaDoc getNamespace() {
309         return NAMESPACE_DAML_2001_03_URI;
310     }
311
312
313     /**
314      * Answer the singleton instance of this vocabulary
315      *
316      * @return The singleton instance
317      */

318     public static DAMLVocabulary getInstance() {
319         return s_instance;
320     }
321
322
323     // The following methods provide the implementations for the DAMLVocabulary interface
324

325
326     /** Answer the DAML namespace resource for the current release */
327     public Resource NAMESPACE_DAML() { return NAMESPACE_DAML; }
328
329     /** Answer the RDF resource for DAML List class. */
330     public Resource List() { return List; }
331
332     /** Answer the RDF resource for DAML UniqueProperty class */
333     public Resource UniqueProperty() { return UniqueProperty; }
334
335     /** Answer the RDF resource for DAML TransitiveProperty class */
336     public Resource TransitiveProperty() { return TransitiveProperty; }
337
338     /** Answer the RDF resource for DAML UnambiguousProperty class */
339     public Resource UnambiguousProperty() { return UnambiguousProperty; }
340
341     /** Answer the RDF resource for DAML Restriction class */
342     public Resource Restriction() { return Restriction; }
343
344     /** Answer the RDF resource for DAML Ontology class */
345     public Resource Ontology() { return Ontology; }
346
347     /** Answer the RDF resource for the nil (empty) list. */
348     public Resource nil() { return nil; }
349
350     /** Answer the RDF resource for the top type (i.e. the super-type of all types). */
351     public Resource Thing() { return Thing; }
352
353     /** Answer the RDF resource for the bottom type (i.e. the super-type of no types). */
354     public Resource Nothing() { return Nothing; }
355
356     /** Answer the Alias for rdfs:Literal in the daml namespace. */
357     public Resource Literal() { return Literal; }
358
359     /** Answer the RDF resource for DAML Class class (a DAML sub-class of rdfs:Class). */
360     public Resource Class() { return Class; }
361
362     /** Answer the RDF resource for DAML Datatype class (a DAML sub-class of rdfs:Class). */
363     public Resource Datatype() { return Datatype; }
364
365     /** Answer the RDF resource for DAML DatatypeProperty class (a DAML sub-class of rdf:Property). */
366     public Resource DatatypeProperty() { return DatatypeProperty; }
367
368     /** Answer the RDF resource for DAML ObjectProperty class (a DAML sub-class of rdf:Property). */
369     public Resource ObjectProperty() { return ObjectProperty; }
370
371
372     /* Properties */
373
374     /** Answer the RDF Property for the DAML versionInfo property */
375     public Property versionInfo() { return versionInfo; }
376
377     /** Answer the RDF Property for the DAML imports property on Ontologies */
378     public Property imports() { return imports; }
379
380     /** Answer the RDF Property for the DAML disjointWith property on Classes */
381     public Property disjointWith() { return disjointWith; }
382
383     /** Answer the RDF Property for the DAML disjointUnionOf property on Classes */
384     public Property disjointUnionOf() { return disjointUnionOf; }
385
386     /** Answer the RDF Property for the DAML sameClassAs property on Classes */
387     public Property sameClassAs() { return sameClassAs; }
388
389     /** Answer the RDF Property for the DAML samePropertyAs property on Properties */
390     public Property samePropertyAs() { return samePropertyAs; }
391
392     /** Answer the RDF Property for the oneOf property on DAML class expressions */
393     public Property oneOf() { return oneOf; }
394
395     /** Answer the RDF Property for the intersectionOf property on class expressions */
396     public Property intersectionOf() { return intersectionOf; }
397
398     /** Answer the RDF Property for the unionOf property on class expressions */
399     public Property unionOf() { return unionOf; }
400
401     /** Answer the RDF Property for the complementOf property on class expressions */
402     public Property complementOf() { return complementOf; }
403
404     /** Answer the RDF Property for the equivalentTo property on DAML values */
405     public Property equivalentTo() { return equivalentTo; }
406
407     /** Answer the RDF Property for the DAML onProperty property on Restrictions */
408     public Property onProperty() { return onProperty; }
409
410     /** Answer the RDF Property for the DAML toClass property on Restrictions */
411     public Property toClass() { return toClass; }
412
413     /** Answer the RDF Property for the DAML hasValue property on Restrictions */
414     public Property hasValue() { return hasValue; }
415
416     /** Answer the RDF Property for the DAML hasClass property on Restrictions */
417     public Property hasClass() { return hasClass; }
418
419     /** Answer the RDF Property for the DAML hasClassQ property on Restrictions */
420     public Property hasClassQ() { return hasClassQ; }
421
422     /** Answer the RDF Property for the DAML cardinality property on Restrictions */
423     public Property cardinality() { return cardinality; }
424
425     /** Answer the RDF Property for the DAML minCardinality property on Restrictions */
426     public Property minCardinality() { return minCardinality; }
427
428     /** Answer the RDF Property for the DAML maxCardinality property on Restrictions */
429     public Property maxCardinality() { return maxCardinality; }
430
431     /** Answer the RDF Property for the DAML cardinalityQ property on Restrictions */
432     public Property cardinalityQ() { return cardinalityQ; }
433
434     /** Answer the RDF Property for the DAML minCardinalityQ property on Restrictions */
435     public Property minCardinalityQ() { return minCardinalityQ; }
436
437     /** Answer the RDF Property for the DAML maxCardinalityQ property on Restrictions */
438     public Property maxCardinalityQ() { return maxCardinalityQ; }
439
440     /** Answer the RDF Property for the DAML inverseOf property on Properties */
441     public Property inverseOf() { return inverseOf; }
442
443     /** Answer the RDF Property for the DAML first property on Lists */
444     public Property first() { return first; }
445
446     /** Answer the RDF Property for the DAML rest property on Lists */
447     public Property rest() { return rest; }
448
449     /** Answer the RDF Property for the DAML item property on Lists */
450     public Property item() { return item; }
451
452     /** Answer the alias for rdfs:subPropertyOf in daml namespace */
453     public Property subPropertyOf() { return subPropertyOf; }
454
455     /** Answer the alias for rdf:type in daml namespace */
456     public Property type() { return type; }
457
458     /** Answer the alias for rdf:value in daml namespace */
459     public Property value() { return value; }
460
461     /** Answer the alias for rdfs:subClassOf in daml namespace */
462     public Property subClassOf() { return subClassOf; }
463
464     /** Answer the alias for rdfs:domain in daml namespace */
465     public Property domain() { return domain; }
466
467     /** Answer the alias for rdfs:range in daml namespace */
468     public Property range() { return range; }
469
470     /** Answer the alias for rdfs:label in daml namespace */
471     public Property label() { return label; }
472
473     /** Answer the alias for rdfs:comment in daml namespace */
474     public Property comment() { return comment; }
475
476     /** Answer the alias for rdfs:seeAlso in daml namespace */
477     public Property seeAlso() { return seeAlso; }
478
479     /** Answer the alias for rdfs:isDefinedBy in daml namespace */
480     public Property isDefinedBy() { return isDefinedBy; }
481
482     /** Answer the RDF Property for the DAML sameIndividualAs property on instances */
483     public Property sameIndividualAs() { return sameIndividualAs; }
484
485     /** Answer the RDF Property for the DAML differentIndvidualFrom property on instances */
486     public Property differentIndividualFrom() { return differentIndividualFrom; }
487
488     /** Answer the alias for rdfs:Property in the daml namespace. From 2001/03 onwards, it is preferable to use either DatatypeProperty or ObjectProperty. */
489     public Resource Property() { return Property; }
490
491
492
493 }
494
495
496
497 /*
498     (c) Copyright 2001, 2002, 2003, 2004, 2005 Hewlett-Packard Development Company, LP
499     All rights reserved.
500
501     Redistribution and use in source and binary forms, with or without
502     modification, are permitted provided that the following conditions
503     are met:
504
505     1. Redistributions of source code must retain the above copyright
506        notice, this list of conditions and the following disclaimer.
507
508     2. Redistributions in binary form must reproduce the above copyright
509        notice, this list of conditions and the following disclaimer in the
510        documentation and/or other materials provided with the distribution.
511
512     3. The name of the author may not be used to endorse or promote products
513        derived from this software without specific prior written permission.
514
515     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
516     IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
517     OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
518     IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
519     INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
520     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
521     DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
522     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
523     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
524     THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
525 */

526
527
Popular Tags