From: Stuart L. <sd...@ab...> - 2008-12-01 20:24:06
|
Hi Rishi, > Thanks for replying with your valuable suggestion, > > I have situation where I writing a workflow where user can deposit (need to > use sword) Zip into server and then my program read the Zip and unzip that and > perform rest of the operation and once document pass through all the > examination it will be deposit into repository. > > That is the use case. > > If I use sword java lib how can get the service document. I am just looking > the java API for SWORD. Your SWORD-enabled Java server class needs to 'implement SWORDServer': http://sword-app.svn.sourceforge.net/viewvc/sword-app/java-common/trunk/src/ main/java/org/purl/sword/server/SWORDServer.java?revision=87 This means you have to implement two methods (doServiceDocument and doDeposit). When a SWORD client goes to your SWORD service document URL, the doServiceDocument method in your SWORD code will be called to ask you to generate the service document. Probably the easiest way to understand it is to look at my 'DummyServer' implementation which creates a few hard coded collections in a service document, and accepts deposits: http://sword-app.svn.sourceforge.net/viewvc/sword-app/java-common/trunk/src/ main/java/org/purl/sword/server/DummyServer.java?revision=94 Thanks, Stuart _________________________________________________________________ Gwasanaethau Gwybodaeth Information Services Prifysgol Aberystwyth Aberystwyth University E-bost / E-mail: Stu...@ab... Ffon / Tel: (01970) 622860 _________________________________________________________________ |