Previous Topic

Next Topic

JRDF Tutorial

JRDF is a set of APIs that provide a concise implementation of the Resource Description Framework (RDF) using standard Java conventions. JRDF offers a highly modular and type safe interface allowing users to create, store and query RDF statements. It includes a default memory implementation that can be used in conjunction with KowariTM to provide a scalable RDF solution.

The example code provided in this tutorial is from the org.jrdf.mem.JRDFExample class. The JRDFExample class uses an in-memory JRDF graph implementation and can be run by typing at a command line:

java -cp <TKS installation directory>/driver-2.1.jar org.jrdf.mem.JRDFExample

The code for JRDFExample is in the Resources directory of your TKS installation. The JRDF API documentation is in <TKS install>/docs/api/jrdf.

There are four JRDF graph implementations to choose from:

  1. JRDF graph (memory graph)

    The JRDF jar provides a memory implementation under 60Kb and is available for download from http://sourceforge.net/projects/jrdf/. The memory graph is easy to create and is useful for small graphs and caching of results from larger graphs (subgraphs). The classes are in the org.jrdf.graph.mem package of the JRDF jar.

  2. Server-side JRDF Graph (server graph)

    KowariTM provides a server-side JRDF Graph interface for accessing a model. The graph must be created in the same JVM that the Kowari server is running in.

    Server graphs can be used for direct access to the database using a graph API. This is useful for applications that use Kowari as an embedded component. The server graph classes are in the org.kowari.jrdf package of the server jar.

  3. Server backed JRDF graph (client graph)

    Kowari also provides a client-side JRDF graph interface for accessing a model. This provides a scalable RDF solution for remote client applications.

    Client graphs can be used in conjunction with memory graphs. Memory implemented nodes and triples can be inserted into, removed from and used to query client graphs. Other JRDF implementations can also be used, but may not be supported. The client graph classes are in the org.kowari.client.jrdf package of the Driver jar.

  4. Read-only iTQL result JRDF graph (iTQL graph)

    Kowari also allows you to create read-only JRDF graphs from the results of an iTQL query. This provides a powerful mechanism for displaying search results as a subgraph. The classes are in the org.kowari.client.jrdf package of the Driver jar.

Each of these JRDF graph implementations are outlined in the following sections.

In This Section

Prerequisites

Obtaining a Session from a Kowari Server

Comparison of JRDF Graph Implementations

Creating the Graph

Creating Nodes and Triples

Adding Triples to the Graph

Searching the Graph

Reify Triples

Removing Triples from the Graph

See Also

Integration Tutorials

HTTP Resolver and MP3 Content Handler Tutorial

Jena

Perl

JavaServer Pages Tag Library

Latest News

Kowari 1.1.0 Pre-release 1 Released

Kowari 1.0.5 Released

Kowari 1.0.4.1 Released

Kowari 1.0.4 Released

DAWG Evaluates iTQL

Kowari article in XML.com

Kowari mentioned on XML.com

Kowari 1.0.3 Released

Kowari Lite Introduced

Kowari 1.0.2 Released

Kowari 1.0.1 Released

View all news items


Open Source logo Tucana Technologies Logo SourceForge.net Logo

© 2001-2004 Tucana Technologies, Inc. Some rights reserved.