The AllegroGraph client interface
Switch branches/tags
release404401_rc1 release40440_rc1 release4401test_t1 release4401_t1 release4401_release_point release4401_rc4 release4401_rc3 release4401_rc2 release4401_rc1 release4044_t7 release451_t1 release433_release_point release433_rc1 release432_release_point release432_rc1 release431_release_point release431_rc3 release431_rc2 release431_rc1 release421_t3 release421_t2 release421_t1 release421_release_point release421_rc4 release421_rc3 release421_rc2 release421_rc1 release421c_release_point release421c_rc2 release421c_rc1 release421b_rc1 release421a_release_point release421a_rc2 release421a_rc1 release411_release_point release411_rc2 release411_rc1 release411a_rc1 release406_rc1 release406_pre2 release406_pre2_release_point release406_pre1 release406_pre1_release_point release406a_t5 release406a_t4 release406a_t3 release406a_t2 release406a_t1 release406a_release_point release406a_rc3 release406a_rc2 release405_release_point release405_rc1 release405d_release_point release405d_rc1 release405c_release_point release405c_rc2 release405c_rc1 release405b_release_point release405b_rc3 release405b_rc2 release405b_rc1 release405a_release_point release405a_rc1 release404_t1 release404_rc5 release404_rc4 release404_rc3 release404_rc2 release404_rc1 release403_t3 release403_t2 release403_t1 release403_release_point release403_rc9 release403_rc8 release403_rc7 release403_rc6 release403_rc5 release403_rc4 release403_rc3 release403_rc2 release403_rc1 release403presi_rc3 release403presi_rc2 release403presi_rc1 release402_rc4 release402_rc3 release402_rc2 release402_rc1 release401_rc2 release401_rc1 release401d_rc1 release401c_rc1 release401b_rc1 release401a_rc1 release45_t4 release45_t3 release45_t2 release45_t1
Nothing to show
Clone or download
Thomas Hintz Ahmon Dancy
Thomas Hintz and Ahmon Dancy rfe15921: add Java client support for ND geospatial automation
The Java client now supports enabling, disabling, and getting the
status of nD Geospatial Automation.

Tests added for:       AGRepositoryConnectionTests.java
make test-suite run?   AGRepositoryConnectionTests
Documentation changes? yes

Change-Id: I9a7c3a1093e245513f8f76e7e3f116c419f6719b
Reviewed-on: https://gerrit.franz.com:9080/12155
Reviewed-by: Thomas Hintz <thintz@franz.com>
Tested-by: Hudson <hudson@franz.com>
Reviewed-by: Tadeusz Sznuk <ts@franz.com>
PTEST: Hudson <hudson@franz.com>
Reviewed-by: Ahmon Dancy <dancy@franz.com>
Latest commit 25c29ca Nov 6, 2018
Permalink
Failed to load latest commit information.
.settings Updated .settings/org.eclipse.core.resources.prefs Apr 30, 2018
lib rfe14994: Move to Jena 3 Sep 7, 2017
src rfe15921: add Java client support for ND geospatial automation Nov 7, 2018
test-release Run tests after deploying the Java client Feb 6, 2017
tutorials Initial commit for v2.2.2-SNAPSHOT Aug 7, 2018
version-rewriter Fix README version rewriting Jul 13, 2018
.gitignore Ignore all /tutorials/2pc/tmlog*.log Sep 26, 2018
LICENSE Move copyrights to LICENSE file Apr 18, 2017
README.adoc Initial commit for v2.2.2-SNAPSHOT Aug 7, 2018
RELEASE-HISTORY.md rfe15921: add Java client support for ND geospatial automation Nov 7, 2018
checkstyle-required.xml The great untabification Dec 8, 2017
checkstyle-tests.xml The great untabification Dec 8, 2017
checkstyle.xml The great untabification Dec 8, 2017
deploy Initial commit for v2.0.4-SNAPSHOT May 3, 2018
deploy.sh
events.sh rfe14388: Better build system for Java Nov 9, 2016
increment-version.sh Updated release process Feb 25, 2017
makefile Added test-xa target and include in test-bigger Oct 26, 2018
pom.xml
release-process.md Added executive summary at top of release-process.md Jun 6, 2018
unsnapshot.sh Don't automatically push at end of unsnapshot.sh Jul 19, 2017
version.sh Maven deployment scripts Nov 9, 2016

README.adoc

Java client for Franz AllegroGraph

This is the Java client for the Franz AllegroGraph triple store. It contains Sesame/RDF4J- and Jena-compatible APIs.

Client prerequisites

Java version 8 or higher, and any operating system should work with these jars.

Usage

Maven

The recommended way of using the client API is to create a dependency on its Maven artifact. To do this in a Maven project, add the following to your dependencies:

<dependency>
  <groupId>com.franz</groupId>
  <artifactId>agraph-java-client</artifactId>
  <version>2.2.2-SNAPSHOT</version>
  <scope>compile</scope>
</dependency>

For Gradle, use this

compile group: 'com.franz', name: 'agraph-java-client', version: '2.2.2-SNAPSHOT'

Apache Ivy syntax:

<dependency org="com.franz" name="agraph-java-client" rev="2.2.2-SNAPSHOT"/>

SBT (Scala):

libraryDependencies += "com.franz" % "agraph-java-client" % "2.2.2-SNAPSHOT"

Leiningen (Clojure):

[com.franz/agraph-java-client "2.2.2-SNAPSHOT"]

Distribution archive

Tar distributions of the AllegroGraph Java client are available from ftp://ftp.franz.com/pub/agraph/java-client/. A tar distribution includes jar files for agraph-java-client and jars on which it depends.

Programs that use the API should include all JAR files from the lib/ directory of the distribution on their classpath.

To use that local JAR file through Maven install it into your local repository:

mvn install:install-file -Dfile=lib/agraph-java-client-2.2.2-SNAPSHOT.jar -DpomFile=pom.xml

Note that when using the API through Maven all dependencies are downloaded from the central repository - JARs included in the distribution are not used.

Development

Testing

Use this command to run the default testsuite. This assumes that AllegroGraph is listening on the local machine on the default port (10035).

mvn test

To include long running tests, do

mvn test -Dtests.include=test.TestSuites\$Prepush,test.TestSuites\$Stress

Distribution

To build a distribution archive, do

mvn package

Tutorials

There are three tutorials located in tutorials/ that can be compiled and run. They are:

sesame/

Example usage of the AG Sesame/RDF4J interface

jena/

Example usage of the AG Jena interface

attributes/

Example usage of AG Triple Attributes

Prerequisites

An AllegroGraph server must be up and running in order to run the tutorials.

The class for each tutorial declares a number of variables near the top of its respective class definition, which provide the information necessary to communicate with AllegroGraph. If necessary, modify these variables to match the settings for your server before compiling each tutorial.

By default, each tutorial looks for AllegroGraph on localhost at port 10035. Each will create a repository named after the respective tutorial in the "java-catalog" catalog.

In order for the tutorial to run successfully, you must ensure that the "java-catalog" catalog has been defined in your agraph.cfg prior to starting AG, or change the value of CATALOG_ID to name a catalog that exists on your server. Use the empty string ("") or null to indicate the root catalog. All other variables must be updated to correspond to your server configuration as well.

Compiling Tutorials

Each tutorial is a separate Maven project. To compile the tutorials first install the AllegroGraph Java client into your local repository. This process is described in the 'Usage' section. Then run the following command in the directory containing the tutorial:

mvn compile

Running Tutorials

To run one of the tutorials, use the following command line:

mvn exec:java

in the directory containing the tutorial you wish to run.

Sesame and Jena tutorials contain multiple, numbered examples. It is possible to run just the specified examples by passing their numbers as arguments in the following way:

mvn exec:java -Dexec.args="1 2 3 5 8 13 21"

The argument 'all' indicates that all examples should be run.

License

Copyright (c) 2008-2017 Franz Inc. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html