org.dspace.sword.client
Class DSpaceSwordClient

java.lang.Object
  extended by org.dspace.sword.client.DSpaceSwordClient

public class DSpaceSwordClient
extends Object

User: Robin Taylor Date: 15/02/11 Time: 21:12


Constructor Summary
DSpaceSwordClient()
           
 
Method Summary
 void createPackage(Context context, String handle, File file)
          Create the package and write it to disk.
 void deposit(Context context, String handle)
           
 ServiceDocument getServiceDocument()
           
 String sendMessage()
          Reads the file, probably a zipped package, and sends it to the Sword server.
 void setCollection(String destination)
           
 void setCredentials(String username, String password, String onBehalfOf)
           
 void setFilename()
           
 void setFileType(String fileType)
           
 void setPackageFormat(String packageFormat)
           
 void setRemoteServer(String chosenUrl)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DSpaceSwordClient

public DSpaceSwordClient()
Method Detail

setFilename

public void setFilename()

setRemoteServer

public void setRemoteServer(String chosenUrl)
                     throws MalformedURLException
Throws:
MalformedURLException

setCredentials

public void setCredentials(String username,
                           String password,
                           String onBehalfOf)

getServiceDocument

public ServiceDocument getServiceDocument()
                                   throws HttpException,
                                          SWORDClientException
Throws:
HttpException
SWORDClientException

setCollection

public void setCollection(String destination)

setFileType

public void setFileType(String fileType)

setPackageFormat

public void setPackageFormat(String packageFormat)
                      throws PackageFormatException
Throws:
PackageFormatException

deposit

public void deposit(Context context,
                    String handle)
             throws InvalidHandleException,
                    PackagerException,
                    SWORDClientException,
                    PackageFormatException,
                    HttpException
Throws:
InvalidHandleException
PackagerException
SWORDClientException
PackageFormatException
HttpException

createPackage

public void createPackage(Context context,
                          String handle,
                          File file)
                   throws InvalidHandleException,
                          PackagerException,
                          PackageFormatException
Create the package and write it to disk.

Throws:
InvalidHandleException
PackagerException
PackageFormatException

sendMessage

public String sendMessage()
                   throws SWORDClientException,
                          HttpException
Reads the file, probably a zipped package, and sends it to the Sword server.

Returns:
A unique ID returned by a successful deposit
Throws:
SWORDClientException
HttpException


Copyright © 2013 DuraSpace. All Rights Reserved.