[EP-tech] Re: deposit URL

Klein, Stephen SKlein at gc.cuny.edu
Tue Apr 23 15:41:25 BST 2013

Thank you, Ian. This is great. Found out that PQT is not compatible with ePrints version of SWORD. PQT needs to re-write their code.

Again, thank you.

-----Original Message-----
From: eprints-tech-bounces at ecs.soton.ac.uk [mailto:eprints-tech-bounces at ecs.soton.ac.uk] On Behalf Of Ian Stuart
Sent: Tuesday, April 23, 2013 3:06 AM
To: eprints-tech at ecs.soton.ac.uk
Subject: [EP-tech] Re: deposit URL

On 22/04/13 21:39, Klein, Stephen wrote:
>>From PQT to eprints.
**ASSUMING EPrints 3.2**

Short answer:

Long answer:
OK - so doing a sword deposit INTO eprints is easy....
(I started writing it up at http://wiki.eprints.org/w/SWORD but work got in the way again...)

You need three things to do a sword deposit:
1) A working user account in the EPrints repo
2) A known-to-work package format
3) The "collection" point to make the deposit

First-off you need a valid user account, so make sure you can log in.
(If the password has non-ascii (a-zA-Z0-9) in it, you can have problems... just so you know)

You need to ensure that your EPrints can understand the data you're sending it.... or, the other way is to ensure that PQT exports data in a format that EPrints can understand.

Next you need to know /where/ you want the items to appear: 
users-workspace; review-queue; live-archive; deleted-list.

If you go to the page
http://yourRepo.web.address/sword-app/servicedocument (you'll need to
authenticate) - you will get an XML file describing the available <collections>, their href deposit locations, and the Package Types they understand.

<collection href="http://devel.edina.ac.uk:1203/sword-app/deposit/archive">
<atom:title>Live Repository</atom:title>
<sword:collectionPolicy>Live archive policy</sword:collectionPolicy>
Deposited items will be transferred, and appear publicly.
<dcterms:abstract>This is the live repository</dcterms:abstract>

So - to make a deposit, you do a POST request to the appropriate 
<collection> href, with the body of the request being the actual 
packaged-up file

I test this with cUrl:
$> curl -i -u username:password --data-binary "@repnet_test_package.zip" 
-H 'X-Packaging:
http://opendepot.org/RepNet/1.0' -H 'Content-Type: application/zip'
.... [[response]] ....

This would send the file "repnet_test_package.zip" to the "archive" (ie, 
live repo) buffer on the server.

Does that help?
(If you're using EPrints 3.3.x, then sorry - I've not made that work yet)

Ian Stuart.
Developer: ORI, RJ-Broker, and OpenDepot.org
Bibliographics and Multimedia Service Delivery team,
The University of Edinburgh.


This email was sent via the University of Edinburgh.

The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: http://www.eprints.org/tech.php/
*** EPrints community wiki: http://wiki.eprints.org/

More information about the Eprints-tech mailing list