Hewlett Packard Laboratories, Bristol
Jena is a java API for manipulating RDF graphs. Its features include:
This jena toolkit includes a number of components:
This version of the Jena toolkit is a preview release of Jena 2. It has considerably less functionality than the current Jena 1 release (no DAML support, no persistenence support, no reification support). It is newer and thus less well tested in the field. However, it does have fully compliant support for datatyped literals, parsers and writers that are fully conformant with the RDFCore WG last call drafts and a preview of the proposed support for RDFS inference. The Jena team intend to complete the functionality missing from Jena 1 as soon as possible.
The Jena team do not recommend migrating from Jena 1 to Jena 2 at this time. However, we do encourage folks to try out Jena 2 and provide feedback on ease of migrating existing code and experience, especially with the new features such as datatypes and the preliminary inference SPI.
Whilst 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 web site - http://www.hpl.hp.com/semweb.
JENAROOT/lib/jena.jar JENAROOT/lib/xercesImpl.jar JENAROOT/lib/xmlParserAPIs.jar JENAROOT/lib/icu4j.jar JENAROOT/lib/concurrent-1.3.0.jar JENAROOT/lib/jakarta-oro-2.0.5.jar // if using RDQL query support // Not yet in Jena2 : JENAROOT/lib/db3-3-11.jar // if using Berkeley DB interface JENAROOT/lib/antlr.debug.jar JENAROOT/lib/sesame-client.jar // if using Jena-Sesame query engine JENAROOT/lib/junit.jar JENAROOT/lib/rdf-api-2001-01-19.jar
ant test // if you have ant configured to run junit test.bat // on windows . test.sh // on unix
You may see some warnings about some tests being suppressed, but the remaining 1000+ tests should run successfully.
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 and generates the 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>
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
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.
Jena is built on top of other sub-systems which we gratefully acknowledge: