Jena: A Java API for RDF

Readme for version 1.4

Hewlett Packard Laboratories, Bristol

Overview

Jena is a java API for manipulating RDF models. Its features include:

The jena toolkit includes a number of components:

The current release, 1.4 adds a tutorial but leaves the code largely unchanged from the previous version.  In the future, we would like to make various changes, such as cleaning up some features of the API and shortening the package names, which will require changes to existing code. Ideally, we'd to make all such changes in one go to minimise the number of times people have to tweak their client code.

More recent versions may be available from the Jena web site - http://www.hpl.hp.com/semweb.

Installation

Getting started with jena

For the core java API the key package to look at is com.hp.hpl.mesa.rdf.jena.model. This package defines all of the key interfaces which the different implementations (jena.mem, jena.bdb, jena.common) conform to.

The easiest way to get started is to work through the tutorial. Start at JenaTutorial.html. Semantic Web expertise is not assumed.

The jena subsystems

ARP parser
ARP is a new RDF parser designed to be compliant with the latest working group recommendations. ARP is the default parser for jena. For more information on ARP see the documentation in doc/ARP.

Note that it is possible to switch to other RDF parsers by setting a java property. For example to use Dave Megginson's RDFFilter parser (included in this distribution) use the java command line switch:

        -Dcom.hp.hpl.mesa.rdf.jena.reader.RDF/XML=com.hp.hpl.mesa.rdf.jena.common.RDFXMLReader
RDQL query language
RDQL is a query engine for Jena. It provides the SquishQL language (see the grammar file for exact details). To get started using RDQL see the RDQL section of the tutorial. Or see README_RDQL, RDQL_Usage.html, RDQL_Examples.html and rdql_grammar.html, for condensed documentation.
DAML API
DAML+OIL is an emerging standard for encoding ontologies for use by web and other online services, agents, digital libraries or meta-data repositories. DAML+OIL defines a conceptualisation for the terms used in, say, an RDF document. Jena now provides an API for accessing and manipulating DAML ontologies. It supports ontology loading, traversal of property and class hierarchies and mapping to XSD concrete datatypes. It does not include reasoning capabilities at this stage. For more information on how to get started with the DAML API see the DAML section of the tutorial and/or doc/DAML+OIL.
Berkeley DB persistent storage
This jena release also includes an experimental persistent storage mechanism based on SleepyCat BerkeleyDB. See the SleepyCat site http://www.sleepycat.com/download.html for access to Berkeley DB implementations suitable for your platform. This jena release includes the necessary java adapter file (lib\db3-3-11.jar), see the javadoc for package com.hp.hpl.mesa.rdf.jena.bdb for more information on using the BDB support.
RDB
The RDB module provides for  persistent storage of jena models in relational databases. The module is  designed to support different data layouts and different databases  fairly flexibly. Porting to a new database often involves just editing  of separate sql and configuration files without the need for rewriting  the java drivers. Out of the box, we have support for postgresql, mysql  and Interbase. See doc/rdb/rdb-intro.html for more information on  getting starting. See the companion documents in the same directory for  information on porting and some performance data.

License

Jena is distributed under a BSD style open source license.

It includes software developed by the Apache Software Foundation (http://www.apache.org/), both in the form of jar files and source code.

Acknowledgements

Jena is built on top of other sub-systems which we gratefully acknowledge:

Applications

The Jena distribution includes three convenience applications.

jena.rdfcopy will read an RDF file in either RDF/XML or n-triple format and write it to standard out in either RDF/XML or n-triple format. It can be used to translate between different RDF serialization formats.

jena.rdfcompare will read two RDF files, in either RDF/XML or n-triple format and test whether they are equal.

jena.rdfquery will execute an RDQL query on an RDF data file, in either RDF/XML or n-triple format and print the table of results in text or HTML. It can also be used to query a Jena model held in a BerkeleyDB persistent store.

These programs can be set use use a proxy to traverse a firewall by setting system properties. To use a socks proxy include the following in the command line:

   -DsocksProxyHost=<your-proxy-domain-name-or-ip-address>

To use an http proxy include the following on the command line:

   -DproxySet=true -DproxyHost=<your-proxy> -DproxyPort=<your-proxy-port-number>