2.1 <a href="#2.1">Definition of OAI sets</a><br />
2.2 <a href="#2.2">Exposing metadata via OAI Repository Gateway</a><br />
<a name="1"></a><h2>1. Overview</h2>
The OAI Repository module handles metadata delivery between OAI-PMH v.2.0 compliant repositories. Metadata exchange is performed on top of the <a href="http://www.openarchives.org/pmh/">OAI-PMH</a>, the Open Archives Initiative's Protocol for Metadata Harvesting.
The OAI Repository Admin Interface can be used to set up a database of OAI sources and open your repository for OAI harvesting.
The OAI Repository corresponds to a set of metadata exposed for periodical harvesting by external OAI service providers. The following steps have to be done in order to expose metadata via OAI:
<ul>
<li>Definition of OAI sets</li>
<li>Exposing metadata via OAI Repository Gateway</li>
</ul>
<a name="2.1"></a><h3>2.1. Definition of OAI sets</h3>
<p>The definition of the OAI sets in the <a href="<CFG_SITE_URL>/admin/oairepository/oairepositoryadmin.py">OAI Repository Admin Interface</a> lets you choose:
<ol>
<li>which records are to be exposed via OAI, by using the standard <a href="<CFG_SITE_URL>/help/search-guide">Invenio search syntax</a>.</li>
<li>which <a href="http://www.openarchives.org/OAI/openarchivesprotocol.html#Set">OAI sets</a> are available in your repository. Simply specify the <code>setSpec</code> and <code>setName</code> of the set.</li>
</ol>
</p>
<p>Let's say you want to expose all the records in the collection "<code>Articles</code>" that have a report number starting with <a href="<CFG_SITE_URL>/search?f1=reportnumber&c=Articles&p1=hep-*&as=1">'<code>hep-</code>'</a>: simply add a new set definition in the <a href="<CFG_SITE_URL>/admin/oairepository/oairepositoryadmin.py">OAI Repository Admin Interface</a>, choose the <code>setName</code> (Eg: "HEP Articles") and <code>setSpec</code> (Eg: "articles:hep"), and fill in the <code>collection</code> field with "Articles", the first <code>Phrase</code> field with "hep-*" and choose search field "report number".<p>
<p>If you want to export all the records in your repository, just leave all the query parameters blank. You can also omit the OAI setSpec and setName if you do not want to organize your repository into a hierarchy.</p>
<p>If you want to force all the clients currently harvesting a given set you are exporting (e.g. because you have enriched a metadata export format) you can simply touch the corresponding set.</p>
<p>Tip: since the exposed records are retrieved using the Invenio search engine, you can test your query definition in the <a href="<CFG_SITE_URL>/?as=1">advanced search interface</a> of your repostory.</p>
<a name="2.2"></a><h3>2.2. Exposing metadata via OAI Repository Gateway</h3>
<p>Once the settings of the OAI Repository are defined, the next step is to expose corresponding metadata via the OAI Repository Gateway. This is done by launching the <code>oairepositoryupdater</code> script, that will add the OAI identifier and OAI setSpec(s) to the records to be exposed (according to the settings defined in the OAI Repository admin interface).<br />
<br />
<b>Oairepositoryupdater usage</b>
<blockquote>
<pre>
oairepositoryupdater [options]
Options:
-r --report OAI repository status
-d --detailed-report OAI repository detailed status
-n --no-process Do no upload the modifications
Scheduling options:
-u, --user=USER User name to submit the task as, password needed.
-t, --runtime=TIME Time to execute the task (now), e.g.: +15s, 5m, 3h, 2002-10-27 13:57:26
-s, --sleeptime=SLEEP Sleeping frequency after which to repeat task (no), e.g.: 30m, 2h, 1d
-P, --priority=PRIORITY Priority level (an integer, 0 is default)