public class ModifyDatastream extends FedoraRequest<ModifyDatastream>
Constructor and Description |
---|
ModifyDatastream(String pid,
String dsId) |
Modifier and Type | Method and Description |
---|---|
ModifyDatastream |
altIDs(List<String> altIDs) |
ModifyDatastream |
checksum(String checksum) |
ModifyDatastream |
checksumType(String checksumType)
The algorithm used to compute the checksum.
|
ModifyDatastream |
content(File content) |
ModifyDatastream |
content(InputStream content) |
ModifyDatastream |
content(String content) |
ModifyDatastream |
controlGroup(String controlGroup) |
ModifyDatastream |
dsLabel(String dsLabel) |
ModifyDatastream |
dsLocation(String dsLocation) |
ModifyDatastream |
dsState(String dsState)
One of "A", "I", "D" (*A*ctive, *I*nactive, *D*eleted)
|
ModifyDatastreamResponse |
execute()
Executes this request against the
FedoraRequest.DEFAULT_CLIENT |
ModifyDatastreamResponse |
execute(FedoraClient fedora)
Execute this request using the supplied FedoraClient instance.
|
ModifyDatastream |
formatURI(String formatURI) |
ModifyDatastream |
ignoreContent(boolean ignoreContent) |
ModifyDatastream |
lastModifiedDate(Date lastModifiedDate)
Convenience method for
lastModifiedDate(String) . |
ModifyDatastream |
lastModifiedDate(org.joda.time.DateTime lastModifiedDate)
Convenience method for
lastModifiedDate(String) . |
ModifyDatastream |
lastModifiedDate(String lastModifiedDate)
If provided, the server will use the supplied lastModifedDate to
prevent concurrent modifications, only performing the request if the
datastream has not been modified since the request-provided
lastModifiedDate.
|
ModifyDatastream |
logMessage(String logMessage) |
ModifyDatastream |
mimeType(String mimeType)
Set the mime type of the datastream.
|
ModifyDatastream |
versionable(boolean versionable)
Enable versioning of the datastream.
|
addHeader, addQueryParam, getFirstQueryParam, getHeaders, getQueryParam, getQueryParams, isDefaultClientSet, removeHeader, resource, resource, resource, resource, setDefaultClient, setHeaders, xParam
public ModifyDatastream altIDs(List<String> altIDs)
public ModifyDatastream checksum(String checksum)
public ModifyDatastream checksumType(String checksumType)
checksumType
- One of DEFAULT, DISABLED, MD5, SHA-1, SHA-256,
SHA-385, SHA-512public ModifyDatastream controlGroup(String controlGroup)
public ModifyDatastream dsLabel(String dsLabel)
public ModifyDatastream dsLocation(String dsLocation)
public ModifyDatastream dsState(String dsState)
dsState
- public ModifyDatastream formatURI(String formatURI)
public ModifyDatastream ignoreContent(boolean ignoreContent)
public ModifyDatastream lastModifiedDate(org.joda.time.DateTime lastModifiedDate)
lastModifiedDate(String)
.lastModifiedDate
- public ModifyDatastream lastModifiedDate(Date lastModifiedDate)
lastModifiedDate(String)
.lastModifiedDate
- public ModifyDatastream lastModifiedDate(String lastModifiedDate)
If provided, the server will use the supplied lastModifedDate to prevent concurrent modifications, only performing the request if the datastream has not been modified since the request-provided lastModifiedDate. Otherwise, the request will fail with an HTTP 409 Conflict.
Typical usage would be to get the lastModifiedDate of a datastream before modification, and then to pass that date as part of the subsequent modify request, which would then only succeed if the datastream has not been already modified since.
Supported against Fedora 3.4.0 and later (with earlier versions, this parameter is ignored).
lastModifiedDate
- an xsd:dateTime string, e.g. 2001-12-31T12:50:01.000Zpublic ModifyDatastream logMessage(String logMessage)
public ModifyDatastream mimeType(String mimeType)
If not set, fedora-client will make a best-guess based on the actual content.
mimeType
- the mime type of the datastream.public ModifyDatastream versionable(boolean versionable)
versionable
- public ModifyDatastream content(File content)
public ModifyDatastream content(InputStream content)
public ModifyDatastream content(String content)
public ModifyDatastreamResponse execute() throws FedoraClientException
FedoraRequest
Executes this request against the FedoraRequest.DEFAULT_CLIENT
execute
in class FedoraRequest<ModifyDatastream>
FedoraClientException
- if FedoraRequest.DEFAULT_CLIENT
is null
public ModifyDatastreamResponse execute(FedoraClient fedora) throws FedoraClientException
FedoraRequest
Execute this request using the supplied FedoraClient instance.
execute
in class FedoraRequest<ModifyDatastream>
fedora
- an instance of FedoraClientFedoraClientException
- if the HTTP status code of the response is
>= 400.Copyright © 2010-2013 MediaShelf. All Rights Reserved.