logo lanl prototype teamOAI Static Repository & OAI Static Repository Gateway

OAI Static Repository

A file based approach to expose metadata using the OAI-PMH protocol. As written in the OAI FAQ "[t]he Open Archives Initiative develops and promotes interoperability standards that aim to facilitate the efficient dissemination of content". The OAI defines two parties in the exchange of content: 1) the Data Provider who exposes metadata to the world using the OAI-PMH protocol, 2) the Service Provider who uses the metadata harvested via the OAI-PMH as a basis for building value-added services. The OAI community members implemented several tools for both Data Providers and Service Providers to exchange metadata using OAI-PMH.
The OAI Static Repository and OAI Static Repository Gateway is a low barrier solution for Data Providers to make metadata collections available to the world. The Data Provider writes an XML file with a specific format - an OAI Static Repository - which is made OAI-PMH harvestable through intermediation of software - an OAI Static Repository Gateway - operated by a third party.



Experimental OAI Static Repository Gateway at LANL

Register your OAI Static Repository at our experimental OAI Static Repository Gateway

OAI Static Repository Gateway demo

The base URL of the experimental Static Repository Gateway is http://purl.lanl.gov/NET/srepod.

Some sample - pre-registered - OAI Static Repositories are available at:

Following the guidelines of the OAI Static Repository specification, the Gateway with base URL http://purl.lanl.gov/NET/srepod makes the above OAI Static Repositories harvestable respectively at the following OAI base URLs:

Here are some sample OAI-PMH requests made through the Gateway to the the above OAI Static Repositories:

Run Your Own OAI Static Repository Gateway

We release the experimental LANL Gateway software used as a proof of concept to the OAI community. This software is Open Source. You are free to download it, install it on your server and make changes to it. As this is experimental beta code we encourage to use this software package as inspiration to build your own OAI Static Repository Gateways.


  1. Download the srepod-2-X-Xa.tar.gz package from SourceForge.
  2. Unpack the distribution:
    gunzip -c srepod-2-X-Xa.tar.gz | tar xvf -
  3. Change directory to 'srepod':
    cd srepod
  4. Edit the file 'src/Makefile' change the INSTDIR variable to an appropiate installation directory for this package. [Note: the INSTDIR should *not* be the same as the directory where you unpacked the sources]
  5. Compile and install:
    	make clean
    	make install
  6. Change directory to your installation directory:
    	cd /lanl/srepod
  7. Edit the file cgi-bin/environ edit the variables:

    • GWADMIN - email address of the gateway administrator,
    • GWBASEURL - base URL of the gateway OAI-PMH interface,
    • GWREGISTRY - URL of the gateway registration interface,
    • GWTERMINATOR - URL of the gateway termination interface,
    • GWHOME - installation directory of the srepod package.

  8. Edit the configuration of your web server. Add a 'gateway' symbolic link from your cgi-bin directory to the cgi-bin directory of this package. Add a gateway' symbolic link from your htdocs directory to the htdocs directory of this package. E.g.
            cd /usr/local/apache/cgi-bin
            ln -s /lanl/srepod/cgi-bin gateway
            cd /usr/local/apache/htdocs
            ln -s /lanl/srepod/htdocs gateway
    (Make sure it is allowed to FollowSymlinks in the cgi-bin and htdocs directory of your Apache installation)
  9. To run the srepod package on your system you need to start up a daemon srepod. This daemon will create cache files of OAI static repositories on your system. It is strongly recommended to run this daemon with the same priviliges as the Apache daemon. But we allow to run this daemon also with normal user privileges.
    If you want to run the daemon with the same privileges as the Apache daemon, then you need to run the script chmod.sh as root and fill in the username and group of the Apache process:
    	sh chmod.sh
    	Enter the user name or id of the process running cgi scripts: [nobody] nobody
    	Enter the group name or id of the process running cgi scripts: [nobody] nogroup
    If you want to run the daemon with your own privileges, then you need to run the script chmod.sh and fill in your username and group (beware this will create world writable directories and files in the installation directory):
    	sh chmod.sh
    	Enter the user name or id of the process running cgi scripts: [nobody] hochsten
    	Enter the group name or id of the process running cgi scripts: [nobody] proto
  10. Start up the srepod daemon (you may need root privileges based on installation method above):
    	cd /lanl/srepod/bin
    	./deamonctl start
  11. Your are now ready to register your first Static Repository file at your LANL Gateway. Issue this request in a browser:


Valid OAI-PMH Base URL's

As specified in the Static Repository Guidelines: the baseURL written inside a Static Repository file "must match the Static Repository base URL at which the Static Repository is available through intermediation from a Static Repository Gateway". This means that if in your installation the GWBASEURL was set to:


and the Static Repository file is located at:


then this Static Repository file should contain a 'oai:baseURL' element with value

to be valid. The Identify section of Static Repository file should look like this:

    <oai:repositoryName>Demo repository</oai:repositoryName>

To test the installation of the LANL Gateway we don't check the validity of baseURL by default. This way we can register quickly a few test Static Repositories in the ${GWHOME}/htdocs directory without changing any of these files. In a production system you should set the GWVALIDBASEURL to 1. This validation check is very important a) when terminating a Static Repository file, b) preventing duplicate registrations of a Static Repository File at two different gateways.

Terminating a Static Repository

New in the Static Repository Guidelines is the ability to de-register Static Repository files at a Gateway. A Static Repository administrator can do this by changing the 'oai:baseURL' element inside the Static Repository file (or just deleting the file) and sending a 'terminate' request to the gateway:


The LANL Gateway can automatically process termination request if the right conditions are met (see Guidelines). You need to set both GWVALIDBASEURL=1 and GWDOTERMINATE=1.

In case you want to terminate Static Repository files manually, then run the ${GWHOME}/bin/unregister.sh command. Be carefull however: you need to run this program with the same privileges as the srepod (daemon) process.

Contact info

Patrick Hochstenbach <hochsten@sci.kun.nl> -- Henry Jerez <hjerez@lanl.gov> -- Herbert Van de Sompel <herbertv@lanl.gov>