Client Library Usage Guide - GateNLP/cloud-client GitHub Wiki
GATE provides a Java client library to simplify access to the GATE Cloud APIs. The library handles all the authentication and marshalling/unmarshalling of requests and responses, and presents an object-oriented view of the API for Java programmers.
See the JavaDoc documentation for full details.
From version 1.1 and later, the client library is published to the Central Repository and can be referenced from there with Maven, Gradle, Ivy, etc. Earlier versions are in the GATE Team public Maven repository at http://repo.gate.ac.uk/content/groups/public/
<dependency>
<groupId>uk.ac.gate</groupId>
<artifactId>gate-cloud-client</artifactId>
<version>1.2</version>
</dependency>
To download the source and build the library yourself, either clone it using git
or you can download a source bundle of the latest release in TAR or ZIP format.
There are five main entry points to the GATE Cloud API:
-
Shop
for browsing the available pipelines and/or reserving a cloud machine or an instance of a specific pipeline to run as a batch annotation job -
JobManager
for access to jobs that have already been reserved -
DataManager
for access to persistent data bundles -
MachineManager
to control cloud machines you have previously reserved -
OnlineApiManager
for access to the online documnent-at-a-time processing endpoints
Whichever entry point you use, you will need to provide your GATE Cloud API key ID and password as parameters:
Shop shop = new Shop("GCNxxxxxxxxxx", "<password goes here>");
When creating your API key you must ensure that you enable the relevant permissions for the APIs that you want to use.