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:

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.online rpg mobile

52 thoughts on “EasyDeposit – SWORD deposit tool creator

  1. Nick Sheppard

    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

  2. Stuart Post author

    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

  3. Pingback: Stuart Lewis' Blog » EasyDeposit – DOI integration with CrossRef API

  4. Anita

    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

  5. Anita

    Sorry… here is the continuation of the comment..

    I must be doing something very basic mistake.

  6. Baseer

    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.

  7. Stuart Post author

    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

  8. bh

    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?

  9. Stuart Post author

    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

  10. chenhe

    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!

  11. Stuart Post author

    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

  12. chenhe

    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

  13. Stuart Post author

    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

  14. chenhe

    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

  15. chenhe

    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

  16. chenhe

    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}”.

  17. chenhe

    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

  18. alter ego

    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 ๐Ÿ˜€

  19. Chris

    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?

  20. Stuart Post author

    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

  21. Chris

    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?

  22. Chris

    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

  23. Stuart Post author

    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

  24. Chris

    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

  25. Stuart Post author

    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

  26. Rafa Carreres

    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

  27. Stuart Post author

    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

  28. Rafa Carreres

    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

  29. Stuart Post author

    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

  30. Ian Wellaway

    Hi Stuart,

    We’re looking at using Easy Deposit to ingest items into dspace since ED is customisable with PHP and so easier than using the DSpace submission process.

    One issue we have encountered though is for submitting large data files (like 10GB+). These take ages to run through the submission process over http. Any idea how we could get around this using ED? We’re happy to code it ourselves if you could suggest how it might be done?

    Thanks

    Ian

  31. Stuart Post author

    Hi Ian,

    My gut reaction to this is that HTTP and web tools might not be the best tools for dealing with files of that size. That would apply to EasyDeposit or DSpace. Presumably you don’t deal with many of these, so adding them via a more efficient method such as DSpace’s batch ingest might be easier?

    It also raises another question for SWORD generally. We’ve thrown about the idea of ‘deposit by reference’ a bit: you deposit a metadata record, and that record contains the location of the file. It is then up to the repository to schedule the download at a later date, and it pulls the file in from the remote location in an asynchronous fashion. In theory SWORD + DSpace could support this now through the use of a simple curation task, but the question is whether we think SWORD should have implicit support for this.

    Your thoughts on this would be useful – via the sword-app-tech email list if you would be willing?

    Thanks,

    Stuart

  32. Surinder

    i m using dspace 1.8.2 jspui.

    i could able to installed easydeposit however it is giving the
    following error-
    An error has occurred with your deposit. Please contact support@example.com for assistance, quoting reference ‘705000911’.

    Regards

    Awanish Singh

  33. Surinder

    Severity: Notice

    Message: Undefined index: sword

    Filename: swordapp-php-library/swordappservicedocument.php

    Line Number: 65
    A PHP Error was encountered

    Severity: Notice

    Message: Undefined index: sword

    Filename: swordapp-php-library/swordappservicedocument.php

    Line Number: 66
    A PHP Error was encountered

    Severity: Notice

    Message: Undefined index: sword

    Filename: swordapp-php-library/swordappservicedocument.php

    Line Number: 67
    A PHP Error was encountered

    Severity: Notice

    Message: Undefined index: sword

    Filename: swordapp-php-library/swordappservicedocument.php

    Line Number: 68
    A PHP Error was encountered

    Severity: Warning

    Message: SimpleXMLElement::xpath() [simplexmlelement.xpath]: Undefined namespace prefix

    Filename: swordapp-php-library/workspace.php

    Line Number: 38
    A PHP Error was encountered

    Severity: Warning

    Message: SimpleXMLElement::xpath() [simplexmlelement.xpath]: xmlXPathEval: evaluation failed

    Filename: swordapp-php-library/workspace.php

    Line Number: 38
    A PHP Error was encountered

    Severity: Warning

    Message: Invalid argument supplied for foreach()

    Filename: swordapp-php-library/workspace.php

    Line Number: 38
    A PHP Error was encountered

    Severity: Notice

    Message: Undefined index: sword

    Filename: swordapp-php-library/workspace.php

    Line Number: 43
    A PHP Error was encountered

    Severity: Notice

    Message: Undefined index: sword

    Filename: swordapp-php-library/workspace.php

    Line Number: 52
    A PHP Error was encountered

    Severity: Notice

    Message: Undefined index: sword

    Filename: swordapp-php-library/workspace.php

    Line Number: 59

  34. Elvi

    Hi Stuart,

    Is there a way to skip uploading of files? What changes should I make? I can remove the uploading steps from admin but I want to let our user decide if they want to upload files or just skip this step. Another thing, what files should I edit to add mapping of fields coming from the doimetadata to our custom tags? eg I want to map the values of Journal Title to our custom tag dc.citation.journalTitle. And lastly, I would like to confirm from you if easydeposit client is compatible only to sword v1? Thank you and thanks for this wonderful tool.

    Cheers,
    Elvi

  35. Stuart Post author

    Hi Elvi,

    If you want to make the file uploading optional, you can include the step, but to make it optional look in application/controllers/uploadfiles.php and edit the code to allow for 0 files (at present it complains if at least one file hasn’t been loaded).

    Another option is to install multiple copies of EasyDeposit, and present a top-level menu page with two links – one to a version with the file upload step, and one without. This should be easy to do (just copy the installation, but remove the file upload step from the configuration). One of the ideas behind EasyDeposit was that it should be easy to have lots of copies installed, each with a different configuration for a different purpose.

    To change the metadata mappings, look in the [dspace]/config/crosswalks/sword-swap-ingest.xsl file at how they are mapped using XSLT.

    At present it is only compatible with SWORD v1, although this shouldn’t pose a problem as EasyDeposit doesn’t have any features that require v2 functionality (such as being to edit or delete past deposits).

    Thanks,

    Stuart

  36. alvaro

    hi stwart,
    I wonder if easy deposit has options to send data automatically or if I must develop this code in php and include it within the steps for sending a file.
    in my case I need to send data from a remote computer to the repository using sword. this remote computer is connected to a gamma ray sensor
    and I want to send the data to the repository automatically. is this possible using easy deposit?

  37. Stuart Post author

    Hi,

    EasyDeposit is designed for human users to upload files, add metadata, and make submissions (using SWORD).

    If your gamma ray sensor needs to deposit its data without human intervention then you can make use of one of the SWORD code libraries. There are versions in different languages at: https://github.com/swordapp

    I hope that helps,

    Stuart

  38. Washington Ribeiro

    Hi Stuart,

    The EasyDeposit software is a great tool!
    I’m trying to work with EasyDeposit and DSpace, and I don’t know how to make DSpace generate the servicedocument. I’ve had configurated the dspace.cfg and the sword-server.cfg files. Could you help me?

    Best wishes,
    Washigton Ribeiro

  39. Washington Ribeiro

    Hi Stuart,

    Thank you so much. My problem is to configurate the DSpace SWORD Server. Iยดve tryed to follow the steps of the DSpace Manual, modifying the sword-server.cfg file before compiling the source code of DSpace. Althought I’ve had many tests, the DSpace never creates the servicedocument archive in the sword webapp directory. This is my problem. I need to do the servicedocument by hand?

    Thanks,

    Washington Ribeiro

  40. Stuart Post author

    Hi Washington,

    The service document is generated dynamically, and is not saved in the web app directory. What happens when you request the service document URL in your browser?

    Thanks,

    Stuart

Leave a Reply

Your email address will not be published. Required fields are marked *