EasyDeposit – SWORD deposit tool creator
The development of the SWORD (Simple Web-service Offering Repository Deposit) protocol has enabled repositories to start accepting deposits from remote systems and interfaces. If you’re unsure of the basics of SWORD, read one of the following:
- SWORD: Simple Web-service Offering Repository Deposit Ariadne, 2008
- If SWORD is the answer, what is the question? Program, 2009
However, to date there has not been a great deal of use of SWORD. One of the reasons is a lack of SWORD clients that can deposit items into repositories. Demonstration clients were created by the SWORD project, and a PHP SWORD library was created by the SWORD2 project, but no client that can easily be set up by web developers or repository administrators to be used by depositors has been created.
A bit of background:
Last year as part of my job at the University of Auckland Library, I had to create a SWORD deposit client to allow PhD candidates to submit an electronic copy of their thesis. We wanted to use SWORD to do this as it means the PhD students do not have to create a repository account, and learn how to submit in the repository. The SWORD client was written in PHP and made use of the SWORD PHP library. The client was made up of a very small number of pages: login, enter title of thesis, upload file, select embargo and licencing options, verify, submit.
I then had to create a second similar deposit interface to allow a department to archive a technical report series. This deposit interface was similar, but didn’t have the embargo option, asked for more metadata, and returned the URL of the deposited item in a format that could be inserted into their own web publishing system.
Developing and maintaining two similar but not identical systems seemed to be wasteful, therefore I decided to create a generic SWORD deposit interface toolkit that allowed new deposit systems to be easily created. EasyDeposit was born!
What is EasyDeposit?
EasyDeposit is a toolkit for easily creating SWORD deposit web interfaces using PHP. To start using EasyDeposit, follow the installation instructions.
How does EasyDeposit work?
EasyDeposit allows you to create customised SWORD deposit interfaces by configuring a set of ‘steps’. A typical flow of steps may be: login, select a repository, enter some metadata, upload a file, verify the information is correct, perform the deposit, send a confirmation email. Alternatively a deposit flow may just require a file to be uploaded and a title entered. A configuration file is used to list the steps you require.
EasyDeposit makes use of the CodeIgniter MVC PHP framework. This means each ‘step’ is made up of two files: a ‘controller’ which looks after the validation and processing of any data entered, and a ‘view’ which controls the web page that a user sees. This separation of concerns makes it easy for web programmers to edit the controllers, and web designers to tinker with the look and feel of the interface in the views.
What ‘steps’ come with EasyDeposit?
EasyDeposit comes with 14 different steps, including:
- ldaplogin: Allows login to take place against an LDAP directory
- nologin: Allows preset login inforamtino to be provided if you don’t wish users to have to login, then forwards the user on to the next step
- depositcredentials: Sets credentials to be used for the deposit if you wish to use a generic set of credentials, then forwards the user on to the next step
- selectrepository: Allows a user to select between multiple repositories
- servidedocument: Displays a service document to the user to allow them to decide which collection to deposit into
- title: Requires the user to enter a title for the item they are depositing
- metadata: Requires the user to enter metadata for the item they are depositing
- uploadfile: Allows the user to upload files to deposit
- verify: Allow the user to verify their submission before the deposit
- deposit: Performs the deposit, then forwards the user on to the next step
- email: Sends an email confirmation of the deposit, then forwards the user on to the next step
- thankyou: Displays a confirmation of the deposit to the user
Extra steps can be easily added just by adding a controller and a view for each new step.
Is EasyDeposit open source?
Yes! It is published with a modified BSD licence.
How do I use EasyDeposit?
Follow the installation instructions! If you have any questions, please leave comments on this blog entry, to get in touch with me directly.
In: Uncategorized · Tagged with: dspace, easydeposit, interoperability, repositories, sword



on February 5, 2010 at 11:51 pm
Permalink
Hi Stuart
This sounds like a brilliant idea and I would really like to have a go at installing it myself – I’ve had a look at your installation instructions and found them a little beyond me which is a reflection of my limited technical knowledge rather than any lack of clarity on your part. I can just about manage FTP and use Dreamweaver to access an institutionally managed test-server but from what I can glean from your instructions you are referring to installation on a local machine using the command line (as a child of Microsoft I’m a little afraid of the command line!)
As I mentioned on Twitter, I do have a colleague who can probably help me out but he’s very busy (mostly doing web-dev stuff for me!) and I do enjoy tinkering myself and wondered if there might be a way of installing EasyDeposit on my institutionally managed server using FTP?
Apologies for my installation-naivety; as you identify, one of the reasons that SWORD has not been more widely adopted is due to technical barriers for repository administrators.
Any help or advice greatly appreciated!
Cheers
Nick
on March 3, 2010 at 3:05 pm
Permalink
Hi Nick,
Thanks for your feedback. Yes – installation is slightly tricky at the moment, but hopefully not too bad if the instructions are followed. I’ve taken on board your comments about being able to install it via FTP – I’ll have a think about that and see what can be done about it.
I’m hoping to make an administrative interface to it also, so that once it is installed you can edit the settings via a control panel rather than having to have access to the server directly (or via FTP etc).
Thanks for the feedback,
Stuart
on March 3, 2010 at 3:38 pm
Permalink
[...] few weeks ago I wrote about the EasyDeposit system we’ve created at The University of Auckland Library. In a nutshell, it [...]
on August 17, 2010 at 8:33 am
Permalink
I am experimenting with Sword and came across EasyDeposit Client.. Seems like a wonderful idea. I did follow your instructions which seem to be pretty simple and straightforward. But obviously I did miss something since the index page shows fine but clicking on either the start deposit here link or the admin gives me a 404 page. I must be doing something very
on August 17, 2010 at 8:34 am
Permalink
Sorry… here is the continuation of the comment..
I must be doing something very basic mistake.
on August 19, 2010 at 7:41 pm
Permalink
Hi Anita,
It sounds like you might not have mod_rewrite installed or functioning. You could either trying enabling it, or run it without mod_rewrite. See the bottom of this page: http://easydeposit.swordapp.org/instructions/mod_rewrite/
Thanks,
Stuart
on September 21, 2010 at 2:41 am
Permalink
Hello Stuart,
We are in process of upgrading our instance form 1.4 to 1.6, we have installed the easy deposit, i am able to access it using http://www.myhomepage/easydeposit.My question here is i could not find the documents on how to configure easy deposit once you installed it. Like the login, upload data, verification etc.Can you help me in finding the correct documentation please.
Thank you,
Baseer.
on October 1, 2010 at 7:17 am
Permalink
Hi Baseer,
Apologies – the documentation is a little sparse right now. Since releasing EasyDeposit, I’ve been really busy on another project. The other project has now been launched, so I’ll try and find some time to get this written.
Until then, please feel free to contact me directly with any questions, and I’ll help out.
Thanks,
Stuart
on February 4, 2011 at 1:46 pm
Permalink
Hi Stuart, have been looking at EasyDeposit, but we use MODS not METS in our Fedora repository. Is there any easy way to tweak EasyDeposit to support MODS?
on February 4, 2011 at 8:41 pm
Permalink
Hi,
What you’ll need to do is to create a new packager. Take a look at the SWORD PHP library that performs the behind-the-scenes SWORD interactions (http://github.com/stuartlewis/swordapp-php-library/). The bit of code that performs the packaging is packager_mets_swap.php. In theory, all you’ll need to do is to write a new packager, and make use of that instead. Get in touch if I can help.
Thanks,
Stuart
on March 18, 2011 at 9:13 pm
Permalink
hi Stuart,
I have installed the easydepoist successfully. when i click “administrative interface”, it lets me to enter my EasyDeposit administrative username and password. what is the username and password? i did not set them before.
Thank you!
on March 18, 2011 at 9:17 pm
Permalink
Hi,
When you first install EasyDeposit, the username is ‘easydepositadmin’ and the password is ‘easydepositadmin’. These can be changed once you have logged in.
Thanks,
Stuart
on March 19, 2011 at 3:34 pm
Permalink
Hi,Stuart, thank your timely answer! but I meet another similar problem. When I start a deposit, at the first step to connect to a repository, I select the URL of my repository (dspace v1.7), and enter the dspace’s username and password, but I get an error that is ‘Unknown error(status code 400)’.
If I select the URL-http://dspace.swordapp.org/sword/servicedocument, and enter the username and password which I registered on the demo site before, it can submit successfully.
I had configured the sword configurations with default value in dspace.cfg .
is there another file to configure ? or what is wrong with me and what should I do?
many thanks.
chenhe
on March 20, 2011 at 7:28 pm
Permalink
Hi Chenhe,
Can you request the service document of your repository using a browser? If you visit that URL, and enter your username and password, you should see if a service document. If you get an error message, then try looking in [dspace]/log/dspace.log{datestamp} to see what the error is.
You can try emailing the dspace-tech email list for further help – there are a lot of us there who can help, and with email you can send long messages with lots of information in.
Good luck,
Stuart
on March 21, 2011 at 9:44 pm
Permalink
Hi Stuart,
When I visit the URL with browser, and enter the username and password, I get the following error:
HTTP Status 400 – Unable to recognise URL as a valid service document: http://boy.xmulib.org:8080/sword/servicedocument/
type Status report
message Unable to recognise URL as a valid service document: http://boy.xmulib.org:8080/sword/servicedocument/
description The request sent by the client was syntactically incorrect (Unable to recognise URL as a valid service document: http://boy.xmulib.org:8080/sword/servicedocument/).
looking for the dspace log, there is no valuable message.
I find someone met the error too, and asked for help at DSpace-tech mailing list., but no solution.(http://www.mail-archive.com/dspace-tech@lists.sourceforge.net/msg07861.html)
Thank you for your patient response!
chenhe
on March 25, 2011 at 6:56 am
Permalink
Hi Chenhe,
Try setting this line in dspace.cfg:
sword.servicedocument.url = http://boy.xmulib.org:8080/sword/servicedocument/
Thanks,
Stuart
on March 25, 2011 at 8:45 pm
Permalink
Hi Stuart,
It works! why the following settting results to above error?
sword.servicedocument.url = {dspace.url}/sword/servicedocument/
Now, there is another problem, when I deposit an item, I get the following error at “Thank you ” step:
An error has occured with your deposit. Please contact support@example.com for assistance, quoting reference ’453284399′.
why?
Thank you!
chenhe
on March 26, 2011 at 8:19 am
Permalink
Hi Chenhe,
Have you also adjusted the sword.deposit.url and sword.media-link.url settings in dspace.cfg to include http://boy.xmulib.org:8080 ?
Thanks,
Stuart
on March 28, 2011 at 8:13 pm
Permalink
Hi Stuart,
Congratulation! It can work well after resetting the dspace.cfg. I notice that the default url settings (sword.deposit.url, sword.servicedocument.url, sword.media-link.url) are wrong in dspace.cfg. The right is that the “{dspace.url}” should be replaced “${dspace.baseUrl}”.
on March 28, 2011 at 8:18 pm
Permalink
Hi Chenhe,
Thanks for spotting this! This is now reported for fixing: https://jira.duraspace.org/browse/DS-860
Thanks,
Stuart
on March 28, 2011 at 8:34 pm
Permalink
Hi,
Now, there is another question. It shows a blank page when I click “more” button near by “Nested service document:” at “select a collection” step, and no collection could be selected to deposit. But, if I click “back” button at browser, it shows the right page where can select subcommunit or collection to deposit.
I had tried with IE8 and Firefox3.6 browser, and get the same result.
Why?
A question more. How or where could I put/deposit the item’s subject, abstract and other metadata?
Thank you!
Chenhe
on March 30, 2011 at 8:39 pm
Permalink
Hi,
i think comments for SWORD (and other) configuration should also be changed to contain “$” in front of variables like ${dspace.baseUrl}.
I have missed that “$” in front of variables and it made my head ache
This small change could save a lot of time for jaywalkers like me
on March 31, 2011 at 7:23 pm
Permalink
Hi Chenhe,
Thanks for spotting the problem with the ‘more’ button. It should now be fixed in the latest version – http://easydeposit.swordapp.org/download/. The issue you found with the dspace.cfg names has also been fixed, and is part of DSpace 1.7.1.
Thanks,
Stuart
on May 27, 2011 at 7:45 am
Permalink
Hi Stuart, I also experimenting with easydeposit and sword and I have a question about service documents. Excuse me for my ignorance but am I supposed to be creating these service documents and where should I be putting them?
on May 27, 2011 at 9:10 am
Permalink
Hi Chris,
Your repository should be creating the Service Document automatically. It defines a list of collections into which the authenticated user is allowed to deposit. For example from a DSpace repository, you can retrieve the Service Document from http://dspace.your-domain.com/sword/servicedocument
With most of our installations of EasyDeposit, we do not present the user with the Service Document results – we choose for them which collection to deposit into. We have multiple installations of EasyDeposit, and each is tailord for a particular use. For example we have one for PhD theses, and this deposits automatically into our PhD collection without asking the user.
Thanks,
Stuart
on May 28, 2011 at 3:38 am
Permalink
Hi Stuart,
The response I get back when trying to retrieve my service document is
“HTTP Status 500 – Couldn’t connect to the Fedora server for authentication”
What am I missing?
on May 28, 2011 at 4:55 am
Permalink
Just to add to my previous note. Here is what I see in the logs:
org.apache.axis.ConfigurationException: No service named http://www.fedora.info/definitions/1/0/api/#describeRepository is available
on May 28, 2011 at 5:47 am
Permalink
Hi Stuart, I have found my issue. I run multiple instances of fedora with different context names. I have noticed from digging into the code that it is not possible to run sword using anything other than “/fedora” as the context name. I have changed the code so that when I build my URLs I allow for variable context names. It works great now.
Thanks,
Chris
on June 2, 2011 at 8:10 am
Permalink
Hi Stuart,
Is there a way that you can configure easydeposit to use SIPs?
Chris
on June 2, 2011 at 9:51 am
Permalink
Hi Chris,
This should be possible. What sort of SIPs were you thinking of?
Stuart
on June 2, 2011 at 9:52 am
Permalink
Hi Stuart,
They would be METS Dspace SIPs.
Chris
on June 2, 2011 at 1:07 pm
Permalink
Hi Chris,
Would a user have a SIP already? In a way, the purpose of EasyDeposit is to allow a user to generate a SIP, and deposit it, without having to understand what is going on in the background.
Thanks,
Stuart
on June 3, 2011 at 3:45 am
Permalink
Hi Stuart, yes I do have SIPS already, so I guess it would be better just to POST to sword without bothering to use easydeposit.
Chris
on June 3, 2011 at 8:30 am
Permalink
Hi Chris,
Yes – no need to use EasyDeposit. Just using a tool like curl would probably be the easiest, or if you want a wrapper to do a bit of the work for you, then something like the PHP SWORD library (https://github.com/stuartlewis/swordapp-php-library/) would do some of the work for you – see swordappclient.php and the deposit function.
Thanks,
Stuart
on September 20, 2011 at 1:21 am
Permalink
Hi Stuart
I’m testing easydeposit with DSpace and configured everything (http://ruadesa.ua.es/sword/servicedocument/, etc, as you suggested to Chenhe). I can see the collections where the user can deposit, but unfortunately, when I send it to the repository I get this:
“Thank you
An error has occurred with your deposit. Please contact support@example.com for assistance, quoting reference ’624868050′.”
Any idea?
Thank you
on September 20, 2011 at 6:41 am
Permalink
Hi Rafa,
This usually means that your repository rejected the deposit for some reason, but didn’t return a well-formed error response.
Try looking in the log file of your repository to see if it contains any errors. If you use DSpace, this can be found at [dspace]/log/dspace.log
Thanks,
Stuart
on September 20, 2011 at 11:21 pm
Permalink
Hi Stuart,
I looked in the dspace log file and I’ve found the cause of the problem. Everything’s OK in the server side and in the client side too, but easydeposit was trying to create a metadata called dc.date.updated and this in particular didn’t exist in my repository. After creating it, everything was perfect!!
One more question: Where can I configure this things in easydeposit?
Thanks a lot
on September 22, 2011 at 9:44 am
Permalink
Hi Rafa,
What do you want to configure in EasyDeposit? Most of the configurable options can be changed by visiting the administrative interface (/admin from the main web page).
Thanks,
Stuart