module 4 - sword clients
DESCRIPTION
Module 4 of ’The SWORD Course’. For further information see http://swordapp.org/TRANSCRIPT
The SWORD Course
Module4 SWORD
clients
Module objectives
• By the end of this module you will:
– Understand the need for SWORD clients
– Have seen a variety of SWORD clients
– Have had the opportunity to try using some SWORD clients
– Know what tools are available to help with the creation of SWORD clients
A quick recap
• SWORD is a web service that allows deposits to take place into a repository.
• You can find out about a repository’s SWORD interface by requesting a Service Document
• You can deposit an item by POSTing a package
User friendly?
• Interaction with SWORD is via XML documents
• XML is good for machine to machine interfaces
• Do users want to read / write XML?
User friendly?
The answer?
SWORD
clients
An analogy
• Using the web:
– Do we read and write HTML?
– No!
– We use a web client / browser.
SWORD clients
• Three types of SWORD client:
1. Machine to machine custom client
• E.g. custom code to deposit from lab equipment
2. General client
• Deposit any item type to any repository
3. Specific client
• Tailored for an individual use (e.g. e-thesis deposit to repository X, journal article (with DOI) deposit to repository Y)
SWORD clients
• Machine to machine custom client
– E.g. JISC-funded ROAD project
– Robot-generated Open Access Data
– Automated laboratory undertaking investigations into gene functions
– Specific client for specific project / equipment
Online demo client
Desktop demo client
Problems with general clients
• Do users know their repository URL?
• Do users know the URL of their repository’s service document?
• Do users have pre-compiled packages?
Another example
• The Facebook SWORD deposit tool
– http://apps.facebook.com/swordapp/
Facebook client
Facebook client
Facebook client
The application performs the packaging (metadata + file)
Facebook client
Specific clients
• Specific clients overcome the previous problems:
– URLs embedded (or hidden behind easy choices)
– Usernames and passwords may be embedded
– Local language can be used
An example
• E-thesis deposit at The University of Auckland
– http://deposit.library.auckland.ac.nz/
– Uses local language (e.g. ‘UPI’ for login)
– Specific Creative Commons questions
– Email receipt
An example
An example
An example
An example
An example
• Deposit by email
– Email [email protected]
– Script reads mailbox
• From name -> Author
• Subject -> Title
• Message body -> Abstract
– Deposit made
– Reply sent to user with deposited item URL
Another example
• Article Authoring Add-in for Word 2007– http://research.microsoft.com/en-us/projects/authoring/
– .docx files are actually ‘packages’• Zip file containing XML files
– Embed SWORD details in the XML• <article
ms:DepositURL=”http://localhost:8080/sword/deposit/123456789/2″ ms:JournalName=”test” ms:SignupURL=”http://localhost:8080/jspui/” ms:PasswordRequired=”True” ms:PreferredFormat=”docx” ms:SupportedFormats=”docx” ms:Category=”" ms:SubCategory=”">
Deposit from within Microsoft Word
• Create a template using fields
– E.g. title / abstract / conclusion
• Repository can be programmed to extract these fields programmatically into metadata elements
Deposit from within Microsoft Word
Deposit from within Microsoft Word
• Want to create your own custom client?
• No need to re-invent the wheel
• Code libraries / APIs available
Creating your own client
• PHP– http://github.com/stuartlewis/swordapp-php-library/
– Good for web-based or scripted clients
– Includes a METS/SWAP packager
• Java– http://sourceforge.net/projects/sword-app/develop
– Good for web-based, scripted or desktop clients
SWORD code libraries / APIs
Review
• SWORD clients are required to perform deposits
• There are some generic clients available
• Generic clients require a level of technical knowledge
• Specific clients can be created to shield the user from details
• There are code libraries available to help you write your own clients
Want to learn more?
• If SWORD is the answer, what is the question? Use of the Simple Web service Offering Repository Deposit protocol
– http://dx.doi.org/10.1108/00330330910998057
– http://hdl.handle.net/2292/5315
Credits
• This course has been produced by:
– Stuart Lewis
• The SWORD project
– http://swordapp.org/
• Funded by JISC
– http://www.jisc.ac.uk/
• Licence
– Creative commons
Photo Credits
• Lecture hall: http://www.flickr.com/photos/iamthebestartist/2008790/
• It’s a No!: http://www.flickr.com/photos/biscuitsmlp/2247299538/