public class GetDatastream extends FedoraRequest<GetDatastream>
Constructor and Description |
---|
GetDatastream(String pid,
String dsId) |
Modifier and Type | Method and Description |
---|---|
GetDatastream |
asOfDateTime(String asOfDateTime)
Indicates that the result should be relative to the digital object as it
existed on the given date.
|
GetDatastreamResponse |
execute()
Executes this request against the
FedoraRequest.DEFAULT_CLIENT |
GetDatastreamResponse |
execute(FedoraClient fedora)
Execute this request using the supplied FedoraClient instance.
|
GetDatastream |
format(String format)
The format of the response.
|
GetDatastream |
validateChecksum(boolean validateChecksum)
Verifies that the Datastream content has not changed since the checksum
was initially computed.
|
addHeader, addQueryParam, getFirstQueryParam, getHeaders, getQueryParam, getQueryParams, isDefaultClientSet, removeHeader, resource, resource, resource, resource, setDefaultClient, setHeaders, xParam
public GetDatastream asOfDateTime(String asOfDateTime)
asOfDateTime
- datetime string as yyyy-MM-dd or yyyy-MM-ddTHH:mm:ssZpublic GetDatastream format(String format)
The format of the response. Defaults to "xml".
The Fedora REST API default is "html", but fedora-client will set "xml" as the default in order to parse the response. If "html" is selected, the caller is responsible for parsing the raw HTTP response as most of the FedoraResponse convenience methods rely on an XML response.
format
- "html" or "xml". Defaults to "xml".public GetDatastream validateChecksum(boolean validateChecksum)
asOfDateTime
is
null, Fedora will use the most recent version.validateChecksum
- public GetDatastreamResponse execute() throws FedoraClientException
FedoraRequest
Executes this request against the FedoraRequest.DEFAULT_CLIENT
execute
in class FedoraRequest<GetDatastream>
FedoraClientException
- if FedoraRequest.DEFAULT_CLIENT
is null
public GetDatastreamResponse execute(FedoraClient fedora) throws FedoraClientException
FedoraRequest
Execute this request using the supplied FedoraClient instance.
execute
in class FedoraRequest<GetDatastream>
fedora
- an instance of FedoraClientFedoraClientException
- if the HTTP status code of the response is
>= 400.Copyright © 2010-2013 MediaShelf. All Rights Reserved.