OAI-PMH
Motivation
In 2012, Leipzig University Library (UB Leipzig) requested a URN server, which at night summarizes all new URNs created during the day and presents them ready for retrieval by the Deutsche Nationalbibliothek (DNB), so that they can be included in the DNB index. Then as now, the DNB worked with OAI clients to retrieve the URNs. Stefan Freitag, meanwhile head of software development at Leipzig University Library, first implemented an OAI-PMH server for URNs using the xepicur format. In 2018, it was re-implemented using more current technologies (including Java 11, vert.x‑Framework).
At the same time, the idea came up to make METS/MODS files also publicly available. METS/MODS files are created during the Kitodo digitization workflow and are used for IIIF processing. IIIF is a wonderful technology for exchanging and presenting image files, but it lacks the functionality to present detailed bibliographic information, which in turn is aggregated in the METS/MODS data. For this reason, Stefan Freitag has modified the OAI server and set up a new instance. Since then, the METS/MODS data are made available via this server. To make this interface more efficient, the data is temporarily stored in a database, which in turn is supplied with data at intervals from a self-developed interface (igiL backend). The Leipzig University Library thus achieves a very high-performance caching of the data for the many and sometimes very large METS/MODS descriptions.
Usage and example of use
Open Archives Initiative Protocol for Metadata Harvesting (OAI-PMH) is a web-based standardized protocol for metadata harvesting and provides an application-independent interoperability framework. With the help of a harvester (client application), metadata can be collected.
With the help of OAI-PMH, data reconciliation between databases is preferred. However, this does not exclude the possibility of obtaining metadata without a separate database via the interface. As mentioned at the beginning, the interface is mainly used for data synchronization with the DNB. In this way, data records can be automated and exchanged between the institutions in a defined standard.
The simplest type of such a client is for example a web browser. However, requests can also be integrated into computer programs by programmers in order to send them to the server, receive a response and process this response in the software accordingly.
In the following, we will show you, how you can use the interface. A detailed description of the protocol can be found at https://www.openarchives.org/OAI/openarchivesprotocol.html
Request
OAI-PMH requests must be sent using either the methods HTTP GET or POST. POST has the advantage that the length of the arguments is not restricted. The URL encoding must be observed for the requests.
For a request, a base URL is required, which is supplemented by keyword arguments. The base URL and the keyword arguments must be separated by a question mark [?].
Base URL of UB Leipzig
https://services.ub.uni-leipzig.de/digitalcollections/oai2
Keyword Arguments
In addition to the base URL, all queries come with a list of keyword arguments in the form of key-value pairs (key=value). The arguments can be put together in any order. Several arguments must be separated by the ampersand [&]. Please note that each OAI-PMH request must contain at least one key-value pair.
Example for retrieving the imprint from the OAI server using the value “Identify”:
https://services.ub.uni-leipzig.de/digitalcollections/oai2?verb=Identify
Base URL:
https://services.ub.uni-leipzig.de/digitalcollections/oai2
keyword arguments:
verb=identify
By default, repositories make their base URL available as the value of the baseURL element in the so-called Identify response.
Example for restricting the Records to a specific time period:
https://services.ub.uni-leipzig.de/digitalcollections/oai2?verb=ListRecords&metadataPrefix=mets&from=2020-01-10&until=2020-05-15
Base URL:
https://services.ub.uni-leipzig.de/digitalcollections/oai2
keyword arguments:
verb=ListRecords
metadataPrefix=mets
from=2020-01-10
until=2020-05-15
Response
All responses to OAI PMH requests are well-formed XML documents encoded in UTF-8.
Available formats:
METS | Metadata Encoding & Transmission Standard | Format for describing digital collections of objects with metadata |
MODS | Metadata Object Description Schema | Format for bibliographic metadata |
In the following, you can see an excerpt for the response for example 2. The example contains elements and attributes that are stored in the scheme definitions. These are filled with appropriate data as required by the schema definition. Let’s look at the following section, where we see that the names are quite unique. Here is the title of the work:
<mods:title>Dominica Aduentus Domini, Matth. 21.</mods:title>
<mets:mets xsi:schemaLocation="http://www.loc.gov/standards/premis/ http://www.loc.gov/standards/premis/v2/premis-v2-0.xsd http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-7.xsd http://www.loc.gov/METS/ http://www.loc.gov/standards/mets/version17/mets.v1-7.xsd http://www.loc.gov/standards/mix/ http://www.loc.gov/standards/mix/mix.xsd" > <mets:metsHdr CREATEDATE="2017-04-25T06:56:22" > <mets:agent OTHERTYPE="SOFTWARE" ROLE="CREATOR" TYPE="OTHER" > <mets:name>Goobi - UGH-1.11.0-7b3c2be - 26−March−2015</mets:name> <mets:note>Goobi</mets:note> </mets:agent> </mets:metsHdr> <mets:dmdSec ID="DMDLOG_0000" > <mets:mdWrap MDTYPE="MODS" > <mets:xmlData> <mods:mods> <mods:identifier type="goobi" >2552</mods:identifier> <mods:relatedItem type="series" > <mods:titleInfo> <mods:title>VD16</mods:title> </mods:titleInfo> </mods:relatedItem> <mods:identifier type="urn" >urn:nbn:de:bsz:15-0010-122769</mods:identifier> <mods:identifier type="swb-ppn" >084461748</mods:identifier> <mods:extension> <slub:slub> <slub:id type="source" >084461748</slub:id> <slub:id type="tsl-ats" >DresPrec</slub:id> </slub:slub> </mods:extension> <mods:identifier type="vd16" >VD16 D 2761</mods:identifier> <mods:titleInfo> <mods:title>Precationum formulae Ex Singvlis Evangeliis Dominicorvm, Et Festorvm Diervm Deliberate</mods:title> <mods:subTitle>Latinè, & Graecè</mods:subTitle> </mods:titleInfo> <mods:titleInfo type="alternative" > <mods:title>Precationum formulae ex singulis Evangeliis Dominicorum, et festorum dierum deliberate</mods:title> </mods:titleInfo> <mods:language> <mods:languageTerm authority="rfc3066" type="code" >grc</mods:languageTerm> </mods:language> <mods:language> <mods:languageTerm authority="rfc3066" type="code" >lat</mods:languageTerm> </mods:language> <mods:originInfo> <mods:place> <mods:placeTerm type="text" >Lipsiae</mods:placeTerm> </mods:place> <mods:dateIssued keyDate="yes" >1596</mods:dateIssued> <mods:dateOther encoding="w3cdtf" type="order" >1596</mods:dateOther> <mods:publisher>Lantzenberger</mods:publisher> </mods:originInfo> <mods:name type="personal" > <mods:role> <mods:roleTerm authority="marcrelator" type="code" >aut</mods:roleTerm> </mods:role> <mods:namePart type="family" >Dresser</mods:namePart> <mods:namePart type="given" >Matthaeus</mods:namePart> <mods:displayForm>Dresser, Matthaeus</mods:displayForm> </mods:name> <mods:physicalDescription> <mods:extent unit="leaves" >[176] Bl.</mods:extent> </mods:physicalDescription> </mods:mods> </mets:xmlData> </mets:mdWrap> </mets:dmdSec> <mets:dmdSec ID="DMDLOG_0001" > <mets:mdWrap MDTYPE="MODS" > <mets:xmlData> <mods:mods> <mods:titleInfo> <mods:title>Dominica Aduentus Domini, Matth. 21.</mods:title> </mods:titleInfo> </mods:mods> </mets:xmlData> </mets:mdWrap> </mets:dmdSec>