Skip to content
Bert Frees edited this page Apr 24, 2020 · 16 revisions

API Documentation

Web Service API

If you want to use DAISY Pipeline 2 as a web server and implement your own client, you need to know about the web service API.

Java Client Library

We provide a Java HTTP client library for communicating with a Pipeline server. To use it in your Maven project include the following dependencies:

<dependency>
  <groupId>org.daisy.pipeline</groupId>
  <artifactId>clientlib-java</artifactId>
  <version>4.8.2</version>
</dependency>
<dependency>
  <groupId>org.daisy.pipeline</groupId>
  <artifactId>clientlib-java-httpclient</artifactId>
  <version>2.0.3</version>
</dependency>

The entry point of the library is the class org.daisy.pipeline.client.http.WS.

Go Client Library

We also provide a HTTP client library for the Go language. Run the following command to download and install the "pipeline" package:

go get github.com/daisy/pipeline-clientlib-go

Java API

DAISY Pipeline 2 may also be used directly as a Java library instead of via client-server communication.

These are the most important classes in the Java API:

org.daisy.pipeline.script.ScriptRegistry : List available scripts.

org.daisy.pipeline.script.XProcScript : List available inputs, options and outputs of a script.

org.daisy.pipeline.datatypes.DatatypeRegistry : Get data types of script options.

org.daisy.pipeline.script.BoundXProcScript org.daisy.common.xproc.XProcInput : Specify job inputs/options.

org.daisy.pipeline.job.JobManagerFactory org.daisy.pipeline.job.JobManager : Create, delete and queue jobs.

org.daisy.pipeline.job.Job : Run and monitor jobs and access job results.

org.daisy.common.messaging.MessageAccessor : Access job messages.

The ScriptRegistry, DatatypeRegistry and JobManagerFactory objects are OSGi services that can be injected as follows:

import org.daisy.pipeline.script.ScriptRegistry;

import org.osgi.service.component.annotations.Reference;
import org.osgi.service.component.annotations.ReferenceCardinality;
import org.osgi.service.component.annotations.ReferencePolicy;

...

@Reference(
    name = "ScriptRegistry",
    service = ScriptRegistry.class,
    cardinality = ReferenceCardinality.MANDATORY,
    policy = ReferencePolicy.STATIC
)
public void setScriptRegistry(ScriptRegistry registry) {
    ...
}

Complete Javadocs

XProc Utility Libraries

APIs of Individual Modules

Clone this wiki locally