public class DataSetServiceClient extends Object
| Constructor and Description |
|---|
DataSetServiceClient(String baseUrl)
Creates instance of DataSetServiceClient.
|
DataSetServiceClient(String baseUrl,
String username,
String password)
Creates instance of DataSetServiceClient.
|
| Modifier and Type | Method and Description |
|---|---|
void |
assignRepresentationToDataSet(String providerId,
String dataSetId,
String cloudId,
String representationName,
String versionId)
Assigns representation into data set.
|
URI |
createDataSet(String providerId,
String dataSetId,
String description)
Creates a new data set.
|
void |
deleteDataSet(String providerId,
String dataSetId)
Deletes data set.
|
DataSetIterator |
getDataSetIteratorForProvider(String providerId)
Returns iterator to the list of all data sets of specified provider.
|
List<Representation> |
getDataSetRepresentations(String providerId,
String dataSetId)
Lists all representation versions from data set.
|
|
getDataSetRepresentationsChunk(String providerId,
String dataSetId,
String startFrom)
Returns chunk of representation versions list from data set.
|
List<DataSet> |
getDataSetsForProvider(String providerId)
Lists all data sets of specified provider.
|
|
getDataSetsForProviderChunk(String providerId,
String startFrom)
Returns chunk of data sets list of specified provider.
|
RepresentationIterator |
getRepresentationIterator(String providerId,
String dataSetId)
Returns iterator to list of representation versions of data set.
|
void |
unassignRepresentationFromDataSet(String providerId,
String dataSetId,
String cloudId,
String representationName)
Unassigns representation from data set.
|
void |
updateDescriptionOfDataSet(String providerId,
String dataSetId,
String description)
Updates description of data set.
|
public DataSetServiceClient(String baseUrl)
baseUrl - URL of the MCS Rest Servicepublic DataSetServiceClient(String baseUrl, String username, String password)
DataSetServiceClient(String)
but includes username and password to perform authenticated requests.baseUrl - URL of the MCS Rest ServicepublicgetDataSetsForProviderChunk(String providerId, String startFrom) throws MCSException
startFrom
parameter. If parameter is null, the first chunk is
returned. You can use ResultSlice#getNextSlice() of returned
result to obtain startFrom value to get the next chunk, etc;
if
eu.europeana.cloud.common.response.ResultSlice#getNextSlice()==null
in returned result it means it is the last slice.
If you just need all representations, you can use
getDataSetRepresentations(java.lang.String, java.lang.String) method, which encapsulates this
method.providerId - provider identifier (required)startFrom - code pointing to the requested result slice (if equal to
null, first slice is returned)MCSException - on unexpected situationspublic List<DataSet> getDataSetsForProvider(String providerId) throws MCSException
providerId - provider identifier (required)MCSException - on unexpected situationspublic DataSetIterator getDataSetIteratorForProvider(String providerId)
providerId - provider identifier (required)public URI createDataSet(String providerId, String dataSetId, String description) throws ProviderNotExistsException, DataSetAlreadyExistsException, MCSException
providerId - provider identifier (required)dataSetId - data set identifier (required)description - data set description (not required)DataSetAlreadyExistsException - when data set with given id (for
given provider) already existsProviderNotExistsException - when provider with given id does not
existMCSException - on unexpected situationspublicgetDataSetRepresentationsChunk(String providerId, String dataSetId, String startFrom) throws DataSetNotExistsException, MCSException
startFrom
parameter. If parameter is empty, the first chunk is returned. You can
use ResultSlice#getNextSlice() of returned result to obtain
startFrom value to get the next chunk, etc. If you just need
all representations, you can use getDataSetRepresentations(java.lang.String, java.lang.String)
method, which encapsulates this method.providerId - provider identifier (required)dataSetId - data set identifier (required)startFrom - code pointing to the requested result slice (if equal to
null, first slice is returned)DataSetNotExistsException - if data set does not existMCSException - on unexpected situationspublic List<Representation> getDataSetRepresentations(String providerId, String dataSetId) throws DataSetNotExistsException, MCSException
providerId - provider identifier (required)dataSetId - data set identifier (required)DataSetNotExistsException - if data set does not existMCSException - on unexpected situationspublic RepresentationIterator getRepresentationIterator(String providerId, String dataSetId)
providerId - provider identifier (required)dataSetId - data set identifier (required)public void updateDescriptionOfDataSet(String providerId, String dataSetId, String description) throws DataSetNotExistsException, MCSException
providerId - provider identifier (required)dataSetId - data set identifier (required)description - new description of data set (if "" will
be set to "", if null will be set to
null)DataSetNotExistsException - if data set does not existMCSException - on unexpected situationspublic void deleteDataSet(String providerId, String dataSetId) throws DataSetNotExistsException, MCSException
providerId - provider identifier (required)dataSetId - data set identifier (required)DataSetNotExistsException - if data set does not existMCSException - on unexpected situationspublic void assignRepresentationToDataSet(String providerId, String dataSetId, String cloudId, String representationName, String versionId) throws DataSetNotExistsException, RepresentationNotExistsException, MCSException
getDataSetRepresentations(java.lang.String, java.lang.String)
method will return the last persistent version with
Representation#version filled.providerId - provider identifier (required)dataSetId - data set identifier (required)cloudId - cloudId of the record (required)representationName - name of the representation (required)versionId - version of representation; if not provided, latest
persistent version will be assigned to data setDataSetNotExistsException - if data set does not existRepresentationNotExistsException - if no such representation existsMCSException - on unexpected situationspublic void unassignRepresentationFromDataSet(String providerId, String dataSetId, String cloudId, String representationName) throws DataSetNotExistsException, MCSException
providerId - provider identifier (required)dataSetId - data set identifier (required)cloudId - cloudId of the record (required)representationName - name of the representation (required)DataSetNotExistsException - if data set does not existMCSException - on unexpected situationsCopyright © 2013–2014 Europeana Cloud Development Team. All rights reserved.