diff --git a/README.md b/README.md index 178ec22..5bfb6d8 100644 --- a/README.md +++ b/README.md @@ -1,32 +1,28 @@ Simple OAI-PMH 2.0 Data Provider +================================ -Overview +This is a stand-alone and easy to install data provider for the [Open Archives Initiative's Protocol for Metadata Harvesting (OAI-PMH)](http://openarchives.org/pmh/) written in [PHP](http://php.net/). It serves records in any metadata format from a directory of XML files using the filename as identifier and the filemtime as datestamp. Resumption tokens are managed using files. Multiple metadata formats and sets are currently not supported. -This project is derived from the original work of Jianfeng Li -from "The Plant Accelerator" for the "University of Adelaide". +Just put the records as XML files in the data directory, adjust a few configuration settings and you are ready to go! -In the original docs (you can see them on git log), -Jianfeng Li he was inspired by PHP OAI Data Provider developed -by Heinrich Stamerjohanns at University of Oldenburg. -His implementation is at http://physnet.uni-oldenburg.de/oai/. +Installation +------------ -Almost all the code was rewritten in my attempt to understand -both the OAI-PMH protocol and the original code itself. +1. Deploy all the files to a webserver. -The code changed so much that i removed the original documentation. +2. Put the records into the data/ directory (or create a symlink named "data" pointing to your records). Each record has to be a separate XML file with its identifier as filename (i.e. 12345678.xml). -There is some unit tests that were written based on the official -protocol documentation at http://www.openarchives.org/OAI/openarchivesprotocol.html#ErrorConditions -and also on the Open Archives Initiative - Repository Explorer at http://re.cs.uct.ac.za/ +3. Edit oai2config.php and adjust the settings according to your preferences. -This version of the server relies on callbacks to get the needed data -to generate the XML responses. The file oai2.php is a sample server -instantiation to allow unit tests (OAI2ServerTest.php) to be run by -PHP Unit. It has "hard-coded" data to pass the tests and validates -that the server correctly reads correctly-formatted data. -It is your responsibility to provide callbacks that provides -correctly formatted data in all cases. +4. Congratulations! Now you are running an OAI-PMH 2.0 compatible data provider. -Tokens are managed using files. +History +------- -XML Responses are created using the DOMDocument PHP interfaces. +This project was originally initiated in 2002 by [Heinrich Stamerjohanns](stamer@uni-oldenburg.de) at [University of Oldenburg](https://www.uni-oldenburg.de/en/). His latest implementation can be still found via the [Internet Archive's Wayback Machine](https://web.archive.org/web/*/http://physnet.uni-oldenburg.de/oai/). + +It was then modified in 2011 by [Jianfeng Li](jianfeng.li@adelaide.edu.au) of the [University of Adelaide](http://www.adelaide.edu.au/) for [The Plant Accelerator](http://www.plantaccelerator.org.au/). The modified version can be found in the [Google Code Archive](https://code.google.com/archive/p/oai-pmh-2/). + +In 2013 [Daniel Neis Araujo](danielneis@gmail.com) of the [Federal University of Santa Catarina](http://en.ufsc.br/) modified the project again in order to integrate it with [Moodle](https://moodle.org/). His implementation can be found on [GitHub](https://github.com/danielneis/oai_pmh). + +The current implementation was derived from the latter in 2017 by [Sebastian Meyer](sebastian.meyer@opencultureconsutling.com) of [Open Culture Consulting](https://www.opencultureconsulting.com/) for the [German Literature Archive](http://www.dla-marbach.de/en/). diff --git a/index.html b/index.html deleted file mode 100644 index a902a74..0000000 --- a/index.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - Simple OAI-PMH 2.0 Data Provider - - -

Simple OAI-PMH 2.0 Data Provider

- -

This is a simple implementation of an OAI-PMH 2.0 Data Provider written in PHP.

- -

For more information take a look at the source code repository on GitHub.

- - diff --git a/oai2.php b/index.php similarity index 95% rename from oai2.php rename to index.php index 95a1e2b..28feb25 100644 --- a/oai2.php +++ b/index.php @@ -1,7 +1,8 @@ + * Copyright (C) 2011 Jianfeng Li * Copyright (C) 2013 Daniel Neis Araujo * Copyright (C) 2017 Sebastian Meyer * @@ -92,7 +93,7 @@ $oai2 = new OAI2Server( throw new OAI2Exception('idDoesNotExist'); } else { return array( - $config['metadataFormat'] => array ( + $config['metadataFormat'] => array( 'metadataPrefix' => $config['metadataFormat'], 'schema'=> $config['metadataSchema'], 'metadataNamespace' => $config['metadataNamespace'] diff --git a/oai2config.php b/oai2config.php index 6b20bdd..11cb5a0 100644 --- a/oai2config.php +++ b/oai2config.php @@ -1,7 +1,8 @@ + * Copyright (C) 2011 Jianfeng Li * Copyright (C) 2013 Daniel Neis Araujo * Copyright (C) 2017 Sebastian Meyer * diff --git a/oai2exception.php b/oai2exception.php index 84a095c..0cbfaf9 100644 --- a/oai2exception.php +++ b/oai2exception.php @@ -1,7 +1,8 @@ + * Copyright (C) 2011 Jianfeng Li * Copyright (C) 2013 Daniel Neis Araujo * Copyright (C) 2017 Sebastian Meyer * diff --git a/oai2server.php b/oai2server.php index 293eb07..5ea460c 100644 --- a/oai2server.php +++ b/oai2server.php @@ -1,7 +1,8 @@ + * Copyright (C) 2011 Jianfeng Li * Copyright (C) 2013 Daniel Neis Araujo * Copyright (C) 2017 Sebastian Meyer * diff --git a/oai2xml.php b/oai2xml.php index fec03b2..2207522 100644 --- a/oai2xml.php +++ b/oai2xml.php @@ -1,7 +1,8 @@ + * Copyright (C) 2011 Jianfeng Li * Copyright (C) 2013 Daniel Neis Araujo * Copyright (C) 2017 Sebastian Meyer *