01: package org.purl.sword.server;
02:
03: import org.purl.sword.base.Deposit;
04: import org.purl.sword.base.DepositResponse;
05: import org.purl.sword.base.SWORDAuthenticationException;
06: import org.purl.sword.base.SWORDContentTypeException;
07: import org.purl.sword.base.SWORDException;
08: import org.purl.sword.base.ServiceDocument;
09: import org.purl.sword.base.ServiceDocumentRequest;
10:
11: /**
12: * An abstract interface to be implemnted by repositories wishing to provide
13: * a SWORD compliant service.
14: *
15: * http://www.ukoln.ac.uk/repositories/digirep/index/SWORD_APP_Profile_0.5
16: *
17: * @author Stuart Lewis
18: */
19: public interface SWORDServer {
20:
21: /**
22: * Answer a Service Document request sent on behalf of a user
23: *
24: * @param sdr The Service Document Request object
25: *
26: * @exception SWORDAuthenticationException Thrown if the authentication fails
27: * @exception SWORDException Thrown in an un-handalable Exception occurs.
28: * This will be dealt with by sending a HTTP 500 Server Exception
29: *
30: * @return The ServiceDocument representing the service document
31: */
32: public ServiceDocument doServiceDocument(ServiceDocumentRequest sdr)
33: throws SWORDAuthenticationException, SWORDException;
34:
35: /**
36: * Answer a SWORD deposit
37: *
38: * @param deposit The Deposit object
39: *
40: * @exception SWORDAuthenticationException Thrown if the authentication fails
41: * @exception SWORDException Thrown in an un-handalable Exception occurs.
42: * This will be dealt with by sending a HTTP 500 Server Exception
43: *
44: * @return The response to the deposit
45: */
46: public DepositResponse doDeposit(Deposit deposit)
47: throws SWORDAuthenticationException,
48: SWORDContentTypeException, SWORDException;
49: }
|