simple-oai-pmh/oai2config.php

75 lines
2.9 KiB
PHP
Raw Normal View History

2017-05-12 18:13:53 +02:00
<?php
/**
* Simple OAI-PMH 2.0 Data Provider
* Copyright (C) 2005 Heinrich Stamerjohanns <stamer@uni-oldenburg.de>
* Copyright (C) 2011 Jianfeng Li <jianfeng.li@adelaide.edu.au>
2017-05-12 18:13:53 +02:00
* Copyright (C) 2013 Daniel Neis Araujo <danielneis@gmail.com>
* Copyright (C) 2017 Sebastian Meyer <sebastian.meyer@opencultureconsulting.com>
*
* This program 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 3 of the License, or
* (at your option) any later version.
*
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* This file contains all configuration you need to change according to your preferences
* @see http://www.openarchives.org/OAI/2.0/openarchivesprotocol.htm for further explanation
2017-05-12 18:13:53 +02:00
*/
$config = array();
// A human readable name for the repository
2017-05-14 14:14:34 +02:00
$config['repositoryName'] = 'Simple OAI 2.0 Data Provider';
2017-05-12 18:13:53 +02:00
// Email address for contacting the repository owner
2017-05-14 14:14:34 +02:00
$config['adminEmail'] = 'admin@example.org';
2017-05-12 18:13:53 +02:00
// Do you provide 0-byte files for deleted records?
2017-10-05 18:02:15 +02:00
//
// Possible values:
// "no" -> the repository does not maintain information about deletions
// "transient" -> the repository maintains information about deletions, but
// does not guarantee them to be persistent (default)
// "persistent" -> the repository maintains information about deletions with
// no time limit
$config['deletedRecord'] = 'transient';
2017-10-05 18:02:15 +02:00
// Metadata formats, schemas and namespaces of your records
//
// The default is 'oai_dc' which is also required by the OAI-PMH specification,
// but technically you can deliver any XML based data format you want. Just add
// another entry with the 'metadataPrefix' as key and schema/namespace URIs as
// array values or replace the default 'oai_dc' entry (not recommended).
$config['metadataFormats'] = array(
'oai_dc' => array(
2017-10-08 12:59:57 +02:00
'schema' => 'http://www.openarchives.org/OAI/2.0/oai_dc.xsd',
'namespace' => 'http://www.openarchives.org/OAI/2.0/oai_dc/',
2017-10-05 18:02:15 +02:00
),
);
2017-05-12 18:13:53 +02:00
2017-06-09 18:50:11 +02:00
// Directory containing the records
2017-10-05 18:02:15 +02:00
//
// Make sure the given path is readable and there is a subdirectory for every
// 'metadataPrefix' you specified above.
2017-06-09 18:50:11 +02:00
$config['dataDirectory'] = 'data/';
2017-05-12 18:13:53 +02:00
// Maximum number of records to return before giving a resumption token
$config['maxRecords'] = 100;
// Path and prefix for saving resumption tokens
2017-10-05 18:02:15 +02:00
//
// Make sure the given path is writable.
2017-05-12 18:13:53 +02:00
$config['tokenPrefix'] = '/tmp/oai2-';
// Number of seconds a resumption token should be valid
$config['tokenValid'] = 86400; // 24 hours