Open Journal Systems  3.3.0
test-packager-mets_swap.php
1 <?php
2  require('../packager_mets_swap.php');
3 
4  // The location of the files (without final directory)
5  $test_rootin = 'test-files';
6 
7  // The location of the files
8  $test_dirin = 'mets_swap';
9 
10  // The location to write the package out to
11  $test_rootout = 'test-files';
12 
13  // The filename to save the package as
14  $test_fileout = 'mets_swap_package.zip';
15 
16  // The type (e.g. ScholarlyWork)
17  $test_type = 'http://purl.org/eprint/entityType/ScholarlyWork';
18 
19  // The title of the item
20  $test_title = 'SWORD: Simple Web-service Offering Repository Deposit';
21 
22  // The abstract of the item
23  $test_abstract = 'This article offers a twofold introduction to the JISC-funded SWORD Project which ran for eight months in mid-2007. Firstly it presents an overview of the methods and madness that led us to where we currently are, including a timeline of how this work moved through an informal working group to a lightweight, distributed project. Secondly, it offers an explanation of the outputs produced for the SWORD Project and their potential benefits for the repositories community. SWORD, which stands for Simple Web service Offering Repository Deposit, came into being in March 2007 but was preceded by a series of discussions and activities which have contributed much to the project, known as the \'Deposit API\'. The project itself was funded under the JISC Repositories and Preservation Programme, Tools and Innovation strand, with the over-arching aim of scoping, defining, developing and testing a standard mechanism for depositing into repositories and other systems. The motivation was that there was no standard way of doing this currently and increasingly scenarios were arising that might usefully leverage such a standard.';
24 
25  // Creators
26  $test_creators = array('Allinson, Julie', 'Francois, Sebastien', 'Lewis, Stuart');
27 
28  // Citation
29  $test_citation = 'Allinson, J., Francois, S., Lewis, S. SWORD: Simple Web-service Offering Repository Deposit, Ariadne, Issue 54, January 2008. Online at http://www.ariadne.ac.uk/issue54/';
30 
31  // Identifier
32  $test_identifier = 'http://www.ariadne.ac.uk/issue54/allinson-et-al/';
33 
34  // Date made available
35  $test_dateavailable = '2008-01';
36 
37  // Copyright holder
38  $test_copyrightholder = 'Julie Allinson, Sebastien Francois, Stuart Lewis';
39 
40  // Custodian
41  $test_custodian = 'Julie Allinson, Sebastien Francois, Stuart Lewis';
42 
43  // Status statement
44  $test_statusstatement = 'http://purl.org/eprint/status/PeerReviewed';
45 
46  // File name
47  $test_file = 'SWORD Ariadne Jan 2008.pdf';
48 
49  // MIME type of file
50  $test_mimetype = 'application/pdf';
51 
52  $test_packager = new PackagerMetsSwap($test_rootin, $test_dirin, $test_rootout, $test_fileout);
53  $test_packager->setCustodian($test_custodian);
54  $test_packager->setType($test_type);
55  $test_packager->setTitle($test_title);
56  $test_packager->setAbstract($test_abstract);
57  foreach ($test_creators as $test_creator) {
58  $test_packager->addCreator($test_creator);
59  }
60  $test_packager->setIdentifier($test_identifier);
61  $test_packager->setDateAvailable($test_dateavailable);
62  $test_packager->setStatusStatement($test_statusstatement);
63  $test_packager->setCopyrightHolder($test_copyrightholder);
64  $test_packager->setCitation($test_citation);
65  $test_packager->addFile($test_file, $test_mimetype);
66 
67  $test_packager->create();
68 ?>
PackagerMetsSwap
Definition: packager_mets_swap.php:3