Page MenuHomec4science

oairepository-admin-guide.webdoc
No OneTemporary

File Metadata

Created
Thu, Oct 31, 18:24

oairepository-admin-guide.webdoc

## -*- mode: html; coding: utf-8; -*-
## This file is part of Invenio.
## Copyright (C) 2009, 2010, 2011, 2012 CERN.
##
## Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of the
## License, or (at your option) any later version.
##
## Invenio is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with Invenio; if not, write to the Free Software Foundation, Inc.,
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
<!-- WebDoc-Page-Title: OAIRepository Admin Guide -->
<!-- WebDoc-Page-Navtrail: <a class="navtrail" href="<CFG_SITE_URL>/help/admin<lang:link/>">_(Admin Area)_</a> -->
<!-- WebDoc-Page-Revision: $Id$ -->
<h2>Contents</h2>
<strong>1. <a href="#1">Overview</a></strong><br />
<strong>2. <a href="#2">OAI Repository (<i>Exporting</i>)</a></strong><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2.1 <a href="#2.1">Definition of OAI sets</a><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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.
<br />
<a name="2"></a><h2>2. OAI Repository (<i>Exporting</i>)</h2>
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&amp;c=Articles&amp;p1=hep-*&amp;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>
<a name="2.2.1"></a><h4>2.2.1 oairepositoryupdater commmand-line tool</h4>
<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)
-N, --task_specific_name=TASK_SPECIFIC_NAME Advanced option
General options:
-h, --help Print this help.
-V, --version Print version information.
-v, --verbose=LEVEL Verbose level (0=min, 1=default, 9=max).
Print OAI repository status
$ oairepositoryupdater -r
Print OAI repository detailed status
$ oairepositoryupdater -d
</pre>
</blockquote>
<b>Oaiharvest usage examples</b><br />
<p>To expose the sets defined in the OAI Repository Admin Interface and update them every day:</p>
<blockquote>
<pre>
$ oairepositoryupdater -s24
</pre>
</blockquote>
To print out the current status of your OAI repository. Note that this
is a quick report that might not be accurate if you repository is out
of sync. See oairepositoryupdater -d for a more accurate ( but
slower) report:
<blockquote>
<pre>
$ oairepositoryupdater -r
</pre>
</blockquote>
To print out the detailed status of yoyr OAI repository:
<blockquote>
<pre>
$ oairepositoryupdater -d
</pre>
</blockquote>
<p>
Please see also invenio.conf for more fine configurations of the OAI Repository.

Event Timeline