From 8dbb9f064029b0f42c2baa9181ffdbc42f2172b7 Mon Sep 17 00:00:00 2001 From: Thimios Dimopulos Date: Mon, 7 Oct 2024 18:11:58 +0300 Subject: [PATCH] update oai identifiers doc --- architecture/oai-pmh/README.md | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/architecture/oai-pmh/README.md b/architecture/oai-pmh/README.md index 4feabc7..d01aebe 100644 --- a/architecture/oai-pmh/README.md +++ b/architecture/oai-pmh/README.md @@ -34,8 +34,15 @@ suggested by the community. Here are some example URLs and other information for these requests: **GetRecord** – needs a record identifier and metadataPrefix + Up to ArchivesSpace v3.5.1 OAI identifiers are in this format: - `http://localhost:8082/oai?verb=GetRecord&identifier=oai:archivesspace//repositories/2/resources/138&metadataPrefix=oai_ead` + ```http://localhost:8082/oai?verb=GetRecord&identifier=oai:archivesspace//repositories/2/resources/138&metadataPrefix=oai_ead``` + + Starting with ArchivesSpace v4.0.0 OAI identifiers are in the new format (notice the colon after the `oai:archivesspace` namespace part of the identifier): + + `http://localhost:8082/oai?verb=GetRecord&identifier=oai:archivesspace:/repositories/2/resources/138&metadataPrefix=oai_ead` + + see also: https://github.com/code4lib/ruby-oai/releases/tag/v1.0.0 **Identify** @@ -79,26 +86,26 @@ configured sets as shown above or from the following levels of description: In addition to the sets based on level of description, you can define sets based on repository codes and/or sponsors in the config/config.rb file: - AppConfig[:oai_sets] = { - 'repository_set' => { - :repo_codes => ['hello626'], - :description => "A set of one or more repositories", - }, - 'sponsor_set' => { - :sponsors => ['The_Sponsor'], - :description => "A set of one or more sponsors", - } - } + AppConfig[:oai_sets] = { + 'repository_set' => { + :repo_codes => ['hello626'], + :description => "A set of one or more repositories", + }, + 'sponsor_set' => { + :sponsors => ['The_Sponsor'], + :description => "A set of one or more sponsors", + } + } The interface implements resumption tokens for pagination of results. As an example, the following URL format should be used to page through the results from a ListRecords request: - `http://localhost:8082/oai?verb=ListRecords&metadataPrefix=oai_ead` + `http://localhost:8082/oai?verb=ListRecords&metadataPrefix=oai_ead` using the resumption token: - `http://localhost:8082/oai?verb=ListRecords&resumptionToken=eyJtZXRhZGF0YV9wcmVmaXgiOiJvYWlfZWFkIiwiZnJvbSI6IjE5NzAtMDEtMDEgMDA6MDA6MDAgVVRDIiwidW50aWwiOiIyMDE3LTA3LTA2IDE3OjEwOjQxIFVUQyIsInN0YXRlIjoicHJvZHVjaW5nX3JlY29yZHMiLCJsYXN0X2RlbGV0ZV9pZCI6MCwicmVtYWluaW5nX3R5cGVzIjp7IlJlc291cmNlIjoxfSwiaXNzdWVfdGltZSI6MTQ5OTM2MTA0Mjc0OX0=` + `http://localhost:8082/oai?verb=ListRecords&resumptionToken=eyJtZXRhZGF0YV9wcmVmaXgiOiJvYWlfZWFkIiwiZnJvbSI6IjE5NzAtMDEtMDEgMDA6MDA6MDAgVVRDIiwidW50aWwiOiIyMDE3LTA3LTA2IDE3OjEwOjQxIFVUQyIsInN0YXRlIjoicHJvZHVjaW5nX3JlY29yZHMiLCJsYXN0X2RlbGV0ZV9pZCI6MCwicmVtYWluaW5nX3R5cGVzIjp7IlJlc291cmNlIjoxfSwiaXNzdWVfdGltZSI6MTQ5OTM2MTA0Mjc0OX0=` Note: you do not use the metadataPrefix when you use the resumptionToken