001: /*
002: (c) Copyright 2000, 2001, 2002, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP
003: [See end of file]
004: $Id: RDF.java,v 1.14 2008/01/02 12:07:29 andy_seaborne Exp $
005: */
006:
007: package com.hp.hpl.jena.vocabulary;
008:
009: import com.hp.hpl.jena.graph.*;
010: import com.hp.hpl.jena.rdf.model.*;
011:
012: /**
013: The standard RDF vocabulary.
014: @author bwm; updated by kers/daniel/christopher
015: @version $Id: RDF.java,v 1.14 2008/01/02 12:07:29 andy_seaborne Exp $
016: */
017:
018: public class RDF {
019:
020: protected static final String uri = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
021:
022: /** returns the URI for this schema
023: @return the URI for this schema
024: */
025: public static String getURI() {
026: return uri;
027: }
028:
029: protected static final Resource resource(String local) {
030: return ResourceFactory.createResource(uri + local);
031: }
032:
033: protected static final Property property(String local) {
034: return ResourceFactory.createProperty(uri, local);
035: }
036:
037: public static Property li(int i) {
038: return property("_" + i);
039: }
040:
041: public static final Resource Alt = resource("Alt");
042: public static final Resource Bag = resource("Bag");
043: public static final Resource Property = resource("Property");
044: public static final Resource Seq = resource("Seq");
045: public static final Resource Statement = resource("Statement");
046: public static final Resource List = resource("List");
047: public static final Resource nil = resource("nil");
048:
049: public static final Property first = property("first");
050: public static final Property rest = property("rest");
051: public static final Property subject = property("subject");
052: public static final Property predicate = property("predicate");
053: public static final Property object = property("object");
054: public static final Property type = property("type");
055: public static final Property value = property("value");
056:
057: /**
058: The same items of vocabulary, but at the Node level, parked inside a
059: nested class so that there's a simple way to refer to them.
060: */
061: public static final class Nodes {
062: public static final Node Alt = RDF.Alt.asNode();
063: public static final Node Bag = RDF.Bag.asNode();
064: public static final Node Property = RDF.Property.asNode();
065: public static final Node Seq = RDF.Seq.asNode();
066: public static final Node Statement = RDF.Statement.asNode();
067: public static final Node List = RDF.List.asNode();
068: public static final Node nil = RDF.nil.asNode();
069: public static final Node first = RDF.first.asNode();
070: public static final Node rest = RDF.rest.asNode();
071: public static final Node subject = RDF.subject.asNode();
072: public static final Node predicate = RDF.predicate.asNode();
073: public static final Node object = RDF.object.asNode();
074: public static final Node type = RDF.type.asNode();
075: public static final Node value = RDF.value.asNode();
076: }
077:
078: }
079:
080: /*
081: * (c) Copyright 2000, 2001, 2002, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP
082: * All rights reserved.
083: *
084: * Redistribution and use in source and binary forms, with or without
085: * modification, are permitted provided that the following conditions
086: * are met:
087: * 1. Redistributions of source code must retain the above copyright
088: * notice, this list of conditions and the following disclaimer.
089: * 2. Redistributions in binary form must reproduce the above copyright
090: * notice, this list of conditions and the following disclaimer in the
091: * documentation and/or other materials provided with the distribution.
092: * 3. The name of the author may not be used to endorse or promote products
093: * derived from this software without specific prior written permission.
094:
095: * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
096: * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
097: * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
098: * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
099: * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
100: * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
101: * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
102: * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
103: * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
104: * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
105: *
106: * RDF.java
107: *
108: * Created on 28 July 2000, 18:12
109: */
|