Skip to content

Java API

Paul Cuddihy GE Research edited this page Sep 30, 2020 · 21 revisions

Getting SemTK

For the Java API, you'll need sparqlGraphLibrary.

SNAPSHOT versions

The snapshots will have the latest improvements, and may be slightly less stable.

Find snapshots on sonatype Nexus Repo Manager.

Copy the latest snapshot dependency from the Maven tab into your pom.xml.

Your pom.xml will also need this snapshot repository entry:

<repositories>
    <repository>
      <id>oss.sonatype.org-snapshot</id>
      <url>http://oss.sonatype.org/content/repositories/snapshots</url>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>

RELEASE versions

Releases are hosted at Maven Central

Use a standalone Jar

A pre-build version of SemTk including (prebuilt docker containers) will contain standaloneExecutables/target/standaloneExecutables-jar-with-dependencies.jar

This jar can be extracted and added to your new project's CLASS_PATH.

Java API Demo

The module sparqlGraphLibrary contains java clients which perform SemTk operations via REST calls.

The most commonly used features of SemTk are demonstrated in JavaApiDemo.java

This demo can be run with the command:

java -cp PATH_TO_SEMTK/standaloneExecutables/target/standaloneExecutables-jar-with-dependencies.jar: com.ge.research.semtk.demo.JavaApiDemo fuseki http://localhost:3030/DATASET

Java Docs

See the SemTk API javadocs

SPARQLgraph
Clone this wiki locally