Package nl.knaw.dans.lib.dataverse
Class MetadataExportApi
java.lang.Object
nl.knaw.dans.lib.dataverse.MetadataExportApi
API for Dataverse metadata export endpoints.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final nl.knaw.dans.lib.dataverse.HttpClientWrapperprotected static final String -
Method Summary
Modifier and TypeMethodDescriptionprotected PathClears metadata export timestamps on published local datasets.Attempts to export all published local datasets that have not been exported yet.getQueryParamsFromMetadataKeys(Map<String, String> metadataKeys) Forces re-export of all published local datasets.reExportAll(String olderThan, String... formats) Forces re-export of all published local datasets with optional filters.reExportAllFormats(String... formats) Forces re-export of all published local datasets for the selected metadata formats.reExportAllOlderThan(String olderThan) Forces re-export of all published local datasets exported before the supplied date.reExportDataset(int id) Forces re-export of a specific dataset identified by its database id.reExportDataset(int id, String... formats) Forces re-export of a specific dataset identified by its database id for selected formats.reExportDataset(String pid) Forces re-export of a specific dataset identified by its persistent identifier.reExportDataset(String pid, String... formats) Forces re-export of a specific dataset identified by its persistent identifier for selected formats.toString()
-
Field Details
-
MDKEY_PARAM_NAME_PREFIX
- See Also:
-
httpClientWrapper
protected final nl.knaw.dans.lib.dataverse.HttpClientWrapper httpClientWrapper
-
-
Method Details
-
exportAll
Attempts to export all published local datasets that have not been exported yet.- Returns:
- the response envelope
- Throws:
IOException- when I/O problems occur during the interaction with DataverseDataverseException- when Dataverse fails to perform the request
-
reExportAll
Forces re-export of all published local datasets.- Returns:
- the response envelope
- Throws:
IOException- when I/O problems occur during the interaction with DataverseDataverseException- when Dataverse fails to perform the request
-
reExportAllOlderThan
public DataverseHttpResponse<Object> reExportAllOlderThan(String olderThan) throws IOException, DataverseException Forces re-export of all published local datasets exported before the supplied date.- Parameters:
olderThan- re-export datasets exported before this date (YYYY-MM-DD)- Returns:
- the response envelope
- Throws:
IOException- when I/O problems occur during the interaction with DataverseDataverseException- when Dataverse fails to perform the request
-
reExportAllFormats
public DataverseHttpResponse<Object> reExportAllFormats(String... formats) throws IOException, DataverseException Forces re-export of all published local datasets for the selected metadata formats.- Parameters:
formats- metadata formats to export (for example "Datacite", "croissant")- Returns:
- the response envelope
- Throws:
IOException- when I/O problems occur during the interaction with DataverseDataverseException- when Dataverse fails to perform the request
-
reExportAll
public DataverseHttpResponse<Object> reExportAll(String olderThan, String... formats) throws IOException, DataverseException Forces re-export of all published local datasets with optional filters.- Parameters:
olderThan- re-export datasets exported before this date (YYYY-MM-DD), or nullformats- metadata formats to export, or null/empty- Returns:
- the response envelope
- Throws:
IOException- when I/O problems occur during the interaction with DataverseDataverseException- when Dataverse fails to perform the request
-
clearExportTimestamps
public DataverseHttpResponse<DataMessage> clearExportTimestamps() throws IOException, DataverseExceptionClears metadata export timestamps on published local datasets.- Returns:
- the response message from Dataverse
- Throws:
IOException- when I/O problems occur during the interaction with DataverseDataverseException- when Dataverse fails to perform the request
-
reExportDataset
Forces re-export of a specific dataset identified by its database id.- Parameters:
id- the database id of the dataset- Returns:
- the response envelope
- Throws:
IOException- when I/O problems occur during the interaction with DataverseDataverseException- when Dataverse fails to perform the request
-
reExportDataset
public DataverseHttpResponse<Object> reExportDataset(String pid) throws IOException, DataverseException Forces re-export of a specific dataset identified by its persistent identifier.- Parameters:
pid- the dataset persistent identifier- Returns:
- the response envelope
- Throws:
IOException- when I/O problems occur during the interaction with DataverseDataverseException- when Dataverse fails to perform the request
-
reExportDataset
public DataverseHttpResponse<Object> reExportDataset(int id, String... formats) throws IOException, DataverseException Forces re-export of a specific dataset identified by its database id for selected formats.- Parameters:
id- the database id of the datasetformats- metadata formats to export- Returns:
- the response envelope
- Throws:
IOException- when I/O problems occur during the interaction with DataverseDataverseException- when Dataverse fails to perform the request
-
reExportDataset
public DataverseHttpResponse<Object> reExportDataset(String pid, String... formats) throws IOException, DataverseException Forces re-export of a specific dataset identified by its persistent identifier for selected formats.- Parameters:
pid- the dataset persistent identifierformats- metadata formats to export- Returns:
- the response envelope
- Throws:
IOException- when I/O problems occur during the interaction with DataverseDataverseException- when Dataverse fails to perform the request
-
toString
-
buildPath
-
getQueryParamsFromMetadataKeys
-