# AllegroGraph 3.3 Java Tutorial

# Table of Contents

## Introduction

## Tutorial and Examples

## AllegroGraph, Jena, and Sesame 2.x

## AllegroGraph Java libraries

## AllegroGraph Java sources

## Introduction

This document introduces AllegroGraph. It assumes that you are somewhat familiar with RDF (Resource Description Framework), RDFS (RDF Schema), and OWL (Web Ontology Language). If you want to learn more about RDF, RDFS and OWL, see Suggested Reading for recommended introductory texts.

## Tutorial and Examples

The AllegroGraph Learning Center (on our website) is the best place to find examples and tutorials of AllegroGraph in action. You may also browse a local copy of the Learning Center. We do update the version of our website frequently after a release. If you are using a pre-release of AllegroGraph, then the local copy of the Learning Center will be specific to the pre-release version you are using; the website version will be specific to the most recently released product, one that is older than the pre-release.

## AllegroGraph, Jena, and Sesame 2.x

This release of AllegroGraph presents a new revised API that is not compatible with previous versions. The new API is more Java-like with more iterators and query classes. Existing application can continue to run using a compatibility jar file.

This release of AllegroGraph includes interfaces that allow applications to access and manipulate data in AllegroGraph triple stores with Jena or Sesame 2.0 API calls. These interfaces are early releases that may be incomplete and only partly documented. There are likely to be frequent updates to these components on the AllegroGraph update site.

The Sesame interface implements the Repository, RepositoryConnection, Sail and SailConnection interfaces for AllegroGraph. In most cases, the Repository implementation will have much better performance than the Sail implementation because the Repository implementation uses the features of the AllegroGraph server more effectively.

The sample programs and APIs are described in the source files distributed in agraph-3-3.jar.

An application using the Jena or Sesame APIs can also access native AllegroGraph functionality by using the classes and methods in the com.franz.agbase package documented in the Javadocs for AllegroGraph with Jena and Sesame Extensions.

## AllegroGraph Java libraries

These jar files are distributed with AllegroGraph:

- An application using the published API documented in Javadocs must use the file agraph-3-3.jar.

- An application using the Jena or Sesame 2.x libraries must use the file agraph-3-3.jar in addition to the other jar files required by these interfaces.

- An application using the AllegroGraph Java API in earlier releases (3.1.1 or older) must use the file agraph-3-1-1.jar instead of agraph-3-3.jar.

- The file agtbc-3-1-1.jar is normally included in the TopBraidComposer distribution, but may need to be copied from an AllegroGraph installation to a TopBraidComposer installation if TopBraidComposer needs to be updated.

- An application using the Sesame 1.2 libraries must use the file agraph-3-1-1.jar in addition to the other jar files required by Sesame 1.2. The AllegroGraph jar file must later than
  the Sesame jars in the classpath.

## AllegroGraph Java sources

The Java code for the AllegroGraph Java API is open source under the terms of the Mozilla Public License Version 1.1. The source code is distributed with AllegroGraph and is installed with the other AllegroGraph files. The source files are in agsrc-3-3.jar.

The source code for the AllegroGraph 3.1.1 compatibility API is in file agsrc-3-1-1.jar.

The source code files contain many classes that are not documented in the published AllegroGraph javadoc pages. These undocumented classes of AllegroGraph are subject to change without notice. Application code should not use any methods that are not documented in the published javadoc pages; any such use is not supported by normal Franz customer support contracts.

The test cases in these source file do not represent application code examples.