The Jena RDF API and experimental implementation.

Introduction

These packages define an API for manipulating the W3C's Resource Description Framework. (RDF) models and provide implementations of that API. It is assumed that readers are already familiar with RDF. If not, then the RDF tutorial provides a good introduction. Also available are the two W3C specifications, the RDF Model and Syntax specification and also the RDF Schema specification.

Recent Changes

Features

The principal aim has been to provide an API which is easier to use.

The main features are:

Implementation

An experimental implementation is available under the terms of a BSD like license. This licensing option was chosen as it was the most open and least encumbering easily available.

The package common provides a set of common implementation classes. These are not a complete implementation in themselves - they lack an implementation of model. These classes are expected to be common to several implementations of model. A specific model implementation may use these classes as is. Alternatively, possibly to improve performance, a model implementation may subclass the common implementation classes or provide its own alternative implementation of them.

A prototype memory based model implementation is available in package mem. Usage is straight forward:

               Model model = new ModelMem();  // construct an empty model
               model.createResource()
                    .addProperty(Rdf.type, Rdf.Class)
                    .addProperty(Rdfs.subClassOf, Rdf.Resource)
                    .write(new PrintWriter(System.out));
      

See also the example programs in the sample package.

Vocabulary classes which define standard RDF classes and properties are defined in classes Rdf and Rdfs in package vocabulary .

Dependencies

The implementation uses David Megginson's RDF Filter on top of sax2 parser for parsing XML serializations of RDF. By default it uses Apache Xerces XML parser, but this can be overridden by setting the org.xml.sax.driver system property.

Known Problems

Licence Terms

(c) Copyright Hewlett-Packard Company 2000, 2001

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Acknowledgements

This API is derived from the SiRPAC API, most recently maintained by Sergey Melnik. It borrows from the subject centric approach of David Megginson's DATAX API and the cascading calls style of JDom.