public class DataSetServiceClient extends MCSClient
| 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.
|
protected void |
finalize() |
List<eu.europeana.cloud.common.response.CloudVersionRevisionResponse> |
getDataSetCloudIdsByRepresentation(String dataSetId,
String providerId,
String representationName,
String dateFrom,
String tag)
Lists all cloud identifiers from data provider's data set having representation name and published revision added after specified date.
|
eu.europeana.cloud.common.response.ResultSlice<eu.europeana.cloud.common.response.CloudVersionRevisionResponse> |
getDataSetCloudIdsByRepresentationChunk(String dataSetId,
String providerId,
String representationName,
String dateFrom,
String tag,
String startFrom)
Returns chunk of cloud identifiers list of specified provider in specified data set having specific representation name
and published revision created after the specified date.
|
DataSetIterator |
getDataSetIteratorForProvider(String providerId)
Returns iterator to the list of all data sets of specified provider.
|
List<eu.europeana.cloud.common.model.Representation> |
getDataSetRepresentations(String providerId,
String dataSetId)
Lists all representation versions from data set.
|
eu.europeana.cloud.common.response.ResultSlice<eu.europeana.cloud.common.model.Representation> |
getDataSetRepresentationsChunk(String providerId,
String dataSetId,
String startFrom)
Returns chunk of representation versions list from data set.
|
List<eu.europeana.cloud.common.response.CloudTagsResponse> |
getDataSetRevisions(String providerId,
String dataSetId,
String representationName,
String revisionName,
String revisionProviderId,
String revisionTimestamp)
Lists cloudIds and tags from data set for specific revision.
|
eu.europeana.cloud.common.response.ResultSlice<eu.europeana.cloud.common.response.CloudTagsResponse> |
getDataSetRevisionsChunk(String providerId,
String dataSetId,
String representationName,
String revisionName,
String revisionProviderId,
String revisionTimestamp,
String startFrom,
Integer limit)
Retrieve chunk of cloudIds and tags from data set for specific revision.
|
List<eu.europeana.cloud.common.model.DataSet> |
getDataSetsForProvider(String providerId)
Lists all data sets of specified provider.
|
eu.europeana.cloud.common.response.ResultSlice<eu.europeana.cloud.common.model.DataSet> |
getDataSetsForProviderChunk(String providerId,
String startFrom)
Returns chunk of data sets list of specified provider.
|
String |
getLatelyTaggedRecords(String dataSetId,
String providerId,
String cloudId,
String representationName,
String revisionName,
String revisionProviderId)
Gives the versionId of specified representation that has the newest revision (by revision timestamp) with given name.
|
List<eu.europeana.cloud.common.model.CloudIdAndTimestampResponse> |
getLatestDataSetCloudIdByRepresentationAndRevision(String dataSetId,
String providerId,
String revisionProvider,
String revisionName,
String representationName,
Boolean isDeleted)
Returns list of the latest cloud identifier,revision timestamp that belong to data set of a specified provider for a specific representation and revision
|
eu.europeana.cloud.common.response.ResultSlice<eu.europeana.cloud.common.model.CloudIdAndTimestampResponse> |
getLatestDataSetCloudIdByRepresentationAndRevisionChunk(String dataSetId,
String providerId,
String revisionProvider,
String revisionName,
String representationName,
Boolean isDeleted,
String startFrom)
Returns chunk of the latest cloud identifier,revision timestamp that belong to data set of a specified provider for a specific representation and revision.
|
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,
String representationVersion)
Unassigns representation from data set.
|
void |
updateDescriptionOfDataSet(String providerId,
String dataSetId,
String description)
Updates description of data set.
|
void |
useAuthorizationHeader(String headerValue) |
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 Servicepublic eu.europeana.cloud.common.response.ResultSlice<eu.europeana.cloud.common.model.DataSet> getDataSetsForProviderChunk(String providerId, String startFrom) throws eu.europeana.cloud.service.mcs.exception.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
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)eu.europeana.cloud.service.mcs.exception.MCSException - on unexpected situationspublic List<eu.europeana.cloud.common.model.DataSet> getDataSetsForProvider(String providerId) throws eu.europeana.cloud.service.mcs.exception.MCSException
providerId - provider identifier (required)eu.europeana.cloud.service.mcs.exception.MCSException - on unexpected situationspublic DataSetIterator getDataSetIteratorForProvider(String providerId)
providerId - provider identifier (required)public URI createDataSet(String providerId, String dataSetId, String description) throws eu.europeana.cloud.service.mcs.exception.ProviderNotExistsException, eu.europeana.cloud.service.mcs.exception.DataSetAlreadyExistsException, eu.europeana.cloud.service.mcs.exception.MCSException
providerId - provider identifier (required)dataSetId - data set identifier (required)description - data set description (not required)eu.europeana.cloud.service.mcs.exception.DataSetAlreadyExistsException - when data set with given id (for
given provider) already existseu.europeana.cloud.service.mcs.exception.ProviderNotExistsException - when provider with given id does not
existeu.europeana.cloud.service.mcs.exception.MCSException - on unexpected situationspublic eu.europeana.cloud.common.response.ResultSlice<eu.europeana.cloud.common.model.Representation> getDataSetRepresentationsChunk(String providerId, String dataSetId, String startFrom) throws eu.europeana.cloud.service.mcs.exception.DataSetNotExistsException, eu.europeana.cloud.service.mcs.exception.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)eu.europeana.cloud.service.mcs.exception.DataSetNotExistsException - if data set does not existeu.europeana.cloud.service.mcs.exception.MCSException - on unexpected situationspublic List<eu.europeana.cloud.common.model.Representation> getDataSetRepresentations(String providerId, String dataSetId) throws eu.europeana.cloud.service.mcs.exception.DataSetNotExistsException, eu.europeana.cloud.service.mcs.exception.MCSException
providerId - provider identifier (required)dataSetId - data set identifier (required)eu.europeana.cloud.service.mcs.exception.DataSetNotExistsException - if data set does not existeu.europeana.cloud.service.mcs.exception.MCSException - 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 eu.europeana.cloud.service.mcs.exception.DataSetNotExistsException, eu.europeana.cloud.service.mcs.exception.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)eu.europeana.cloud.service.mcs.exception.DataSetNotExistsException - if data set does not existeu.europeana.cloud.service.mcs.exception.MCSException - on unexpected situationspublic void deleteDataSet(String providerId, String dataSetId) throws eu.europeana.cloud.service.mcs.exception.DataSetNotExistsException, eu.europeana.cloud.service.mcs.exception.MCSException
providerId - provider identifier (required)dataSetId - data set identifier (required)eu.europeana.cloud.service.mcs.exception.DataSetNotExistsException - if data set does not existeu.europeana.cloud.service.mcs.exception.MCSException - on unexpected situationspublic void assignRepresentationToDataSet(String providerId, String dataSetId, String cloudId, String representationName, String versionId) throws eu.europeana.cloud.service.mcs.exception.DataSetNotExistsException, eu.europeana.cloud.service.mcs.exception.RepresentationNotExistsException, eu.europeana.cloud.service.mcs.exception.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 seteu.europeana.cloud.service.mcs.exception.DataSetNotExistsException - if data set does not existeu.europeana.cloud.service.mcs.exception.RepresentationNotExistsException - if no such representation existseu.europeana.cloud.service.mcs.exception.MCSException - on unexpected situationspublic void unassignRepresentationFromDataSet(String providerId, String dataSetId, String cloudId, String representationName, String representationVersion) throws eu.europeana.cloud.service.mcs.exception.DataSetNotExistsException, eu.europeana.cloud.service.mcs.exception.MCSException
providerId - provider identifier (required)dataSetId - data set identifier (required)cloudId - cloudId of the record (required)representationName - name of the representation (required)eu.europeana.cloud.service.mcs.exception.DataSetNotExistsException - if data set does not existeu.europeana.cloud.service.mcs.exception.MCSException - on unexpected situationspublic eu.europeana.cloud.common.response.ResultSlice<eu.europeana.cloud.common.response.CloudTagsResponse> getDataSetRevisionsChunk(String providerId, String dataSetId, String representationName, String revisionName, String revisionProviderId, String revisionTimestamp, String startFrom, Integer limit) throws eu.europeana.cloud.service.mcs.exception.MCSException
providerId - provider identifier (required)dataSetId - data set identifier (requred)representationName - name of the representation (required)revisionName - revision naem (required)revisionProviderId - revision provider id (required)revisionTimestamp - timestamp of the searched revision which is part of the revision identifierstartFrom - code pointing to the requested result slice (if equal to
null, first slice is returned)eu.europeana.cloud.service.mcs.exception.MCSException - on unexpected situationspublic List<eu.europeana.cloud.common.response.CloudTagsResponse> getDataSetRevisions(String providerId, String dataSetId, String representationName, String revisionName, String revisionProviderId, String revisionTimestamp) throws eu.europeana.cloud.service.mcs.exception.MCSException
providerId - provider identifier (required)dataSetId - data set identifier (requred)representationName - name of the representation (required)revisionName - revision naem (required)revisionProviderId - revision provider id (required)revisionTimestamp - timestamp of the searched revision which is part of the revision identifiereu.europeana.cloud.service.mcs.exception.MCSException - on unexpected situationspublic void useAuthorizationHeader(String headerValue)
protected void finalize()
throws Throwable
public eu.europeana.cloud.common.response.ResultSlice<eu.europeana.cloud.common.response.CloudVersionRevisionResponse> getDataSetCloudIdsByRepresentationChunk(String dataSetId, String providerId, String representationName, String dateFrom, String tag, String startFrom) throws eu.europeana.cloud.service.mcs.exception.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
ResultSlice.getNextSlice()==null
in returned result it means it is the last slice.
dataSetId - data set identifier (required)providerId - provider identifier (required)representationName - name of the representation (required)dateFrom - starting date (required)tag - tag of revision, must be published, other are not supported yet (required)startFrom - code pointing to the requested result slice (if equal to
null, first slice is returned)eu.europeana.cloud.service.mcs.exception.MCSException - on unexpected situationspublic List<eu.europeana.cloud.common.response.CloudVersionRevisionResponse> getDataSetCloudIdsByRepresentation(String dataSetId, String providerId, String representationName, String dateFrom, String tag) throws eu.europeana.cloud.service.mcs.exception.MCSException
dataSetId - data set identifier (required)providerId - provider identifier (required)representationName - name of the representation (required)dateFrom - starting date (required)tag - tag of revision, must be published, other are not supported yet (required)eu.europeana.cloud.service.mcs.exception.MCSException - on unexpected situationspublic eu.europeana.cloud.common.response.ResultSlice<eu.europeana.cloud.common.model.CloudIdAndTimestampResponse> getLatestDataSetCloudIdByRepresentationAndRevisionChunk(String dataSetId, String providerId, String revisionProvider, String revisionName, String representationName, Boolean isDeleted, String startFrom) throws eu.europeana.cloud.service.mcs.exception.MCSException
dataSetId - data set identifierproviderId - provider identifierrevisionProvider - revision providerrevisionName - revision namerepresentationName - representation namestartFrom - identifier to the requested result slice (cloudId) (if equal to
null, first slice is returned)eu.europeana.cloud.service.mcs.exception.MCSException - on unexpected situationspublic List<eu.europeana.cloud.common.model.CloudIdAndTimestampResponse> getLatestDataSetCloudIdByRepresentationAndRevision(String dataSetId, String providerId, String revisionProvider, String revisionName, String representationName, Boolean isDeleted) throws eu.europeana.cloud.service.mcs.exception.MCSException
dataSetId - data set identifierproviderId - provider identifierrevisionProvider - revision providerrevisionName - revision namerepresentationName - representation nameisDeleted - marked deletedeu.europeana.cloud.service.mcs.exception.MCSException - on unexpected situationspublic String getLatelyTaggedRecords(String dataSetId, String providerId, String cloudId, String representationName, String revisionName, String revisionProviderId) throws eu.europeana.cloud.service.mcs.exception.MCSException
dataSetId - dataset identifierproviderId - dataset ownercloudId - representation cloud identifierrepresentationName - representation namerevisionName - revision namerevisionProviderId - revision ownereu.europeana.cloud.service.mcs.exception.DataSetNotExistsExceptioneu.europeana.cloud.service.mcs.exception.MCSExceptionCopyright © 2013–2017 Europeana Cloud Development Team. All rights reserved.