KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2     (c) Copyright 2000, 2001, 2002, 2002, 2003, 2004, 2005 Hewlett-Packard Development Company, LP
3     [See end of file]
4     $Id: RDF.java,v 1.10 2005/02/21 12:21:33 andy_seaborne Exp $
5 */

6
7 package com.hp.hpl.jena.vocabulary;
8
9 import com.hp.hpl.jena.graph.*;
10 import com.hp.hpl.jena.rdf.model.*;
11
12 /**
13     The standard RDF vocabulary.
14     @author bwm; updated by kers/daniel/christopher
15     @version $Id: RDF.java,v 1.10 2005/02/21 12:21:33 andy_seaborne Exp $
16 */

17
18 public class RDF{
19
20     protected static final String JavaDoc uri ="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
21
22     /** returns the URI for this schema
23         @return the URI for this schema
24     */

25     public static String JavaDoc getURI()
26         { return uri; }
27
28     protected static final Resource resource( String JavaDoc local )
29         { return ResourceFactory.createResource( uri + local ); }
30
31     protected static final Property property( String JavaDoc local )
32         { return ResourceFactory.createProperty( uri, local ); }
33
34     public static Property li( int i )
35         { return property( "_" + i ); }
36
37     public static final Resource Alt = resource( "Alt" );
38     public static final Resource Bag = resource( "Bag" );
39     public static final Resource Property = resource( "Property" );
40     public static final Resource Seq = resource( "Seq" );
41     public static final Resource Statement = resource( "Statement" );
42     public static final Resource List = resource( "List" );
43     public static final Resource nil = resource( "nil" );
44
45     public static final Property first = property( "first" );
46     public static final Property rest = property( "rest" );
47     public static final Property subject = property( "subject" );
48     public static final Property predicate = property( "predicate" );
49     public static final Property object = property( "object" );
50     public static final Property type = property( "type" );
51     public static final Property value = property( "value" );
52
53     /**
54         The same items of vocabulary, but at the Node level, parked inside a
55         nested class so that there's a simple way to refer to them.
56     */

57     public static final class Nodes
58         {
59         public static final Node Alt = RDF.Alt.getNode();
60         public static final Node Bag = RDF.Bag.getNode();
61         public static final Node Property = RDF.Property.getNode();
62         public static final Node Seq = RDF.Seq.getNode();
63         public static final Node Statement = RDF.Statement.getNode();
64         public static final Node List = RDF.List.getNode();
65         public static final Node nil = RDF.nil.getNode();
66         public static final Node first = RDF.first.getNode();
67         public static final Node rest = RDF.rest.getNode();
68         public static final Node subject = RDF.subject.getNode();
69         public static final Node predicate = RDF.predicate.getNode();
70         public static final Node object = RDF.object.getNode();
71         public static final Node type = RDF.type.getNode();
72         public static final Node value = RDF.value.getNode();
73         }
74
75 }
76
77 /*
78  * (c) Copyright 2000, 2001, 2002, 2002, 2003, 2004, 2005 Hewlett-Packard Development Company, LP
79  * All rights reserved.
80  *
81  * Redistribution and use in source and binary forms, with or without
82  * modification, are permitted provided that the following conditions
83  * are met:
84  * 1. Redistributions of source code must retain the above copyright
85  * notice, this list of conditions and the following disclaimer.
86  * 2. Redistributions in binary form must reproduce the above copyright
87  * notice, this list of conditions and the following disclaimer in the
88  * documentation and/or other materials provided with the distribution.
89  * 3. The name of the author may not be used to endorse or promote products
90  * derived from this software without specific prior written permission.
91
92  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
93  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
94  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
95  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
96  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
97  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
98  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
99  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
100  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
101  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
102  *
103  * RDF.java
104  *
105  * Created on 28 July 2000, 18:12
106  */

107
Popular Tags