The RDA PIT API provides facilities to query and manipulate typed information available from persistent identifiers and shared through type registries.
All documentation of this project is released into the public domain as according to CC0.

Testing

Testing can be done using mvn test.
However, testing requires an accessible Handle Server v8 instance and a Type Registry instance. The configuration for these (IP addresses, credentials) must be provided through a property file. The name of this file must be passed as a Java property using a '-D' switch to mvn test; the name of the property is 'pitapi.testingconfig'. An example file can be found in the source code root (testing.properties.example). Note that the addresses given in there are outdated and will not work anymore.
Alternatively, all properties in the properties file can be passed using '-D' switches.

Deployment

Deploying the API prototype requires access to a Handle System 8 server and a Type Registry instance.

The current API prototype uses the interface to an older version of the type registry under development by CNRI at typeregistry.org. The older version may still be available at http://38.100.130.13:8002/registrar; an adaption to the newer interface may be available from the PIT git repository.
At time of writing, the Handle System 8 has not been publicly released. Some closed beta servers may be available for instance from members of the European Persistent Identifier Consortium.

The API prototype was written using Jersey 2 based on JAX-RS 2.0. The project offers full support for Apache Maven.
The following instructions assume deployment on an Apache Tomcat 8 application server.
  1. Use the following call to generate a web application archive (war) file:
    $ mvn war:war
    
  2. The REST service must be configured properly so it knows which identifier service and type registry to contact.
    An example configuration file in Java's properties file format can be found here. Copy it to /usr/local/rda/pitapi.properties and make sure the application server's user has sufficient permissions to read it. Also update it with the addresses of the Handle System 8 instance and possibly the Type Registry. The config file contains the same properties that are also used for testing.
  3. Deploy the generated war file on your application server.
  4. A simple test to verify that the API is running properly can be made by calling the {@link rdapit.rest.TypingRESTResource#simplePing ping} method:
    $ curl http://your.server/your.application.path/pitapi/ping
    Hello World
    

Usage

Detailed documentation on the REST methods available can be found in the {@link rdapit.rest.TypingRESTResource TypingRESTResource} class.