Java client API for Open PHACTS.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

A Java client for Open PHACTS

This Java client is an incomplete client to the Open PHACTS API. The goal is a small client with few dependencies and no Scala in particular. Dependencies are JUnit and Apache's HttpClient and Commons IO.

  • License: LGPL v2.1 or later
  • Authors: Egon Willighagen

This version is compatible with the 2.1 and 2.2 APIs.

Compiling and Testing

To compile and test this client, you need an Open PHACTS account and API key which you can get at

Compile and test with:

mvn -Dserver=... -DappID=... -DappKey=... clean test install

The current beta test server can be tested against using:


The documentation for this Open PHACTS API server can be found at


Mapping client = Mapping.getInstance(server, appID, appKey);
String turtle = client.mapUri("");

Methods return a String with the content in Turtle format. If you want another format, use the ResponseFormat class:

Mapping client = Mapping.getInstance(server, appID, appKey);
String json = client.mapUri(

Other formats include HTML, RDF, RDFJSON, and TSV.

Adding other filtration parameters to API-calls is handled by the Parameter and ParameterValue classes:

Targets client = Targets.getInstance(server, appID, appKey);
String json = client.classPharmacologyList(
  "", 1, 1, 
  new ParameterValue(new Parameter("activity_type"), "IC50"),
  new ParameterValue(new Parameter("activity_relation"), "=")