Jena 2 Preview Release

Jena: A Java API for Semantic Web Applications

Hewlett Packard Laboratories, Bristol

Overview

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

This jena toolkit includes a number of components:

While the intention is maintain the present API through the migration from Jena 1 to Jena 2, we are taking the opportunity to make some minor changes that folks have requested. These are described in the document Migrating from Jena 1 to Jena2. You may notice the javadoc is a lot smaller. This is largely because we are trying to not include classes which are internal to the operation of Jena.

A key feature of the new architecture is making a clear distinction between the Application Programming Interface (API), the System Programming Interface (SPI) and the implementation. The API is intended for use in building applications that use Jena; this is where Model, Resource, etc live. The SPI is entended for use in extending Jena, eg integrating new persistent stores and reasoners: this is where the new Graph interface lives. This release contains preliminary versions of SPI interfaces for integrating new reasoners, and for "fast path" query which will allow us to pass complex queries on to database engines.

Earlier and more recent versions may be available from the Jena SourceForge web site - http://sourceforge.net/projects/jena.

Installation

Applications

The Jena distribution includes some convenience applications.

jena.rdfcopy will read an RDF file in either RDF/XML, N3 or n-triple format and write it to standard out in either RDF/XML, N3 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, N3 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.

jena.rdfparse is command line interface to the ARP RDF/XML parser.

jena.n3 is a command line interfacec to Jena's N3 parser.

jena.schemagen takes and RDF Schema or OWL ontologies and generates Java source code for a constant class containing constants for all the classes and properties defined in that schema.

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>

Getting started with jena

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

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. It can also be run standalone. For more information on ARP see the documentation in doc/ARP.
RDQL query language
RDQL is a query engine for Jena. It provides the SquishQL language (see the grammar file for exact details). See README_RDQL, RDQL_Usage.html, RDQL_Examples.html and rdql_grammar.html, for condensed documentation.
Reasoning Subsystem
The Jena2 reasoner subsystem is designed to allow a range of inference engines to be plugged into Jena. Such reasoners are primarily used to derive additional RDF assertions which are entailed from some base RDF together with any optional ontology information and the axioms and rule. See the reasoner documentation for more details.
Ontology Subsystem
The Jena2 ontology API is intended to support programmers who are working with ontology data based on RDF. Specifically, this means support for OWL, DAML+OIL and RDFS. A set of Java abstractions extend the generic RDF Resource and Property classes to model more directly the class and property expressions found in ontologies using the above languages, and the relationships between these classes and properties. The ontology API works closely with the reasoning subsystem derive additional information that can be inferred from a particular ontology source. Given that ontologists typically modularise ontologies into individual, re-usable components, and pulish these on the web, the Jena2 ontology subsystem also includes a document manager that assists with process of managing imported ontology documents. See the reasoner documentation for more details.

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: