OAI module

From Dryad wiki
Jump to: navigation, search
Status: Being implemented.

This page documents configuration and maintenance of the XOAI module, which provides Dryad's OAI-PMH interface.


As of 2016/05, Dryad uses the Lyncode XOAI module (https://github.com/lyncode/XOAI-DSpace-Addon-1.8.2) to provide OAI-PMH access to the Dryad repository for harvesting. This module replaced the existing dspace-oai module, which had become challenging to extend. The XOAI module proivdes a pipeline-based approach to presenting multiple metadata formats, which greatly facilitates customization.


dspace.cfg / xoai.cfg

Configuration for Java language components of the XOAI module -- including request handling, Solr querying, file cache management, and response serialization -- is handled through the properties files:

dspace/config/dspace.cfg dspace/config/modules/xoai.cfg



This file specifies the metadata formats provided by the OAI-PMH interface, as well as the transformers (xsl stylesheets) used in the pipeline. The Dryad implementation uses the transformer "dryadTransformer", which provides minimal customization to suppress Handle identifiers in favor of DOIs.

This file also specifies the stylesheet to be used for styled display of OAI-PMH query results in a browser:

<Configuration xmlns="http://www.lyncode.com/XOAIConfiguration" identation="false" maxListIdentifiersSize="100" maxListRecordsSize="100" maxListSetsSize="100" stylesheet="static/style.xsl">

If @stylesheet is set to an empty string, no <?xml-stylesheet?> processing instruction will be added to the XML query respose, disabling styled (HTML/CSS) output.


The following entry is required in the Maven settings.xml file:



When deployed, the XOAI module adds request caching and query indexing to the DSpace application. Maintenance of these resources is handled via the ./bin/dspace interface, with the following options:

Syntax: /opt/dryad/bin/dspace xoai <action> [parameters]

import - To import DSpace items into XOAI index and cache system
clean-cache - Cleans the XOAI cached responses

-o Optimize index after indexing (import only)
-c Clear index (import only)
-v Verbose output
-h Shows this text

Solr index

As configured for Dryad, the XOAI module uses a custom Solr core for storage, which must be kept up to date with the application database using an import command. E.g., the following cron job updates the XOAI core daily:

0 3 * * * [dspace]/bin/dspace xoai import

File cache

As configured in the properties file, the XOAI maintains a file cache of query responses at [dspace]/xoai. This cache may be invalidated using the command:

[dspace]/bin/dspace xoai clean-cache