# Jena 2
A Semantic Web Framework

http://jena.sourceforge.net/

Hewlett Packard Laboratories, Bristol

## Overview

Jena is a Java framework for writing Semantic Web applications. It features:

An RDF API
  - statement centric methods for manipulating an RDF model as a set of RDF triples
  - resource centric methods for manipulating an RDF model as a set of resources with properties
  - cascading method calls for more convenient programming
  - built in support for RDF containers - bag, alt and seq
  - enhanced resources - the application can extend the behaviour of resources
  - integrated parsers and writers for RDF/XML (ARP), N3 and N-TRIPLES
  - support for typed literals
ARP - Jena's RDF/XML Parser
  ARP aims to be fully compliant with the latest decisions of the RDF Core WG. The Jena2 version is compliant with the RDF Core recommendations. ARP is typically invoked using Jena's read operations, but can also be used standalone.
Persistence
  The Jena2 persistence subsystem implements an extension to the Jena Model class that provides persistence for models through use of a back-end database engine. Jena2 also supports a Fastpath capability for SPARQL queries that dynamically generates SQL queries to perform as much of the SPARQL query as possible within an SQL database engine. See the persistence documentation for more details.
Reasoning Subsystem
  The Jena2 reasoner subsystem includes a generic rule based inference engine together with configured rule sets for RDFS and for the OWL/Lite subset of OWL Full. These reasoners can be used to construct inference models which show the RDF statements entailed by the data being reasoned over. The subsystem is designed to be extensible so that it should be possible to plug a range of external reasoners into Jena, though worked examples of doing so are left to a future release. See the reasoner documentation for more details.
  Of these components, the underlying rule engine and the RDFS configuration should be reasonably stable. The OWL configuration is preliminary and still under development.
Ontology Subsystem
  The Jena2 ontology API is intended to support programmers 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 these languages, and the relationships between these classes and properties, and the individuals created from them. The ontology API works closely with the reasoning subsystem to derive additional information that can be inferred from a particular ontology source. Given that ontologists typically modularise ontologies into individual, re-usable components, and publish these on the web, the Jena2 ontology subsystem also includes a document manager that assists with process of managing imported ontology documents. See the ontology documentation for more details.
SPARQL query language
  SPARQL is an RDF query language and protocol developed within W3C. Jena provides the ARQ query engine which implements both the SPARQL query language. The implementation in Jena is coupled to relational database storage so that optimized query is performed over data held in a Jena relational persistence store.
  See SPARQL Tutorial and the ARQ documentation.

## Documentation

Documentation is to be found in the doc/ directory of the Jena download.

The latest documentation is available at http://jena.sourceforge.net/.

## Installation

- unzip the distribution file into a convenient directory, JENAROOT.
- set the Java classpath to include all the JAR files in the JENAROOT/lib/ directory

        JENAROOT/lib/jena.jar
        JENAROOT/lib/jenatest.jar
        JENAROOT/lib/iri.jar
        JENAROOT/lib/arq.jar
        JENAROOT/lib/arq-extra.jar
        JENAROOT/lib/commons-logging-1.1.1.jar
        JENAROOT/lib/xercesImpl.jar
        JENAROOT/lib/xml-apis.jar
        JENAROOT/lib/icu4j_3_4.jar
        JENAROOT/lib/json.jar
        JENAROOT/lib/concurrent.jar
        JENAROOT/lib/antlr-2.7.5.jar
        JENAROOT/lib/junit.jar
        JENAROOT/lib/log4j-1.2.12.jar
        JENAROOT/lib/wstx-asl-3.0.0.jar
        JENAROOT/lib/stax-api-1.0.jar

- Test the distribution by running the regression tests, either:

      	ant test          // if you have ant configured to run junit
      	test.bat          // on windows
      	sh test.sh        // on unix

  The tests should all pass. If you are behind a firewall, you may have to configure a proxy for some of the tests - see below for the appropriate properties.

## Applications

The Jena distribution includes some convenience applications. These are described in the tools documentation.

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>

## License

Jena is distributed under a BSD-style open source license.

Details of other licenses, together with version number information, are available.

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:

- Xerces
- JUnit
- Jakarta ORO
- ICU4J
- util.concurrent from Doug Lea
- Jakarta Commons Logging
- log4j
- ant
- WoodSToX
- JSON

Some of the developers use Eclipse.

Details of sub-system versions