public class DSpaceSwordClient extends Object
| Modifier and Type | Field and Description |
|---|---|
protected HandleService |
handleService |
| Constructor and Description |
|---|
DSpaceSwordClient() |
| Modifier and Type | Method and Description |
|---|---|
void |
createPackage(Context context,
String handle,
File file)
Create the package and write it to disk.
|
void |
deposit(Context context,
String handle) |
org.purl.sword.base.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) |
protected HandleService handleService
public void setFilename()
public void setRemoteServer(String chosenUrl) throws MalformedURLException
MalformedURLExceptionpublic org.purl.sword.base.ServiceDocument getServiceDocument()
throws HttpException,
org.purl.sword.client.SWORDClientException
HttpExceptionorg.purl.sword.client.SWORDClientExceptionpublic void setCollection(String destination)
public void setFileType(String fileType)
public void setPackageFormat(String packageFormat) throws PackageFormatException
PackageFormatExceptionpublic void deposit(Context context, String handle) throws InvalidHandleException, PackagerException, org.purl.sword.client.SWORDClientException, PackageFormatException, HttpException
InvalidHandleExceptionPackagerExceptionorg.purl.sword.client.SWORDClientExceptionPackageFormatExceptionHttpExceptionpublic void createPackage(Context context, String handle, File file) throws InvalidHandleException, PackagerException, PackageFormatException
public String sendMessage() throws org.purl.sword.client.SWORDClientException, HttpException
org.purl.sword.client.SWORDClientExceptionHttpExceptionCopyright © 2016 DuraSpace. All Rights Reserved.