use of ca.corefacility.bioinformatics.irida.exceptions.ExecutionManagerDownloadException in project irida by phac-nml.
the class GalaxyHistoriesService method downloadDatasetTo.
/**
* Given a particular dataset id within a Galaxy history download this
* dataset to the local filesystem.
*
* @param historyId
* The id of the history containing the dataset.
* @param datasetId
* The id of the dataset to download.
* @param destination
* The destination to download a file to (will overwrite any
* exisiting content).
* @throws IOException
* If there was an error downloading the file.
* @throws ExecutionManagerDownloadException
* If there was an issue downloading the dataset.
*/
public void downloadDatasetTo(String historyId, String datasetId, Path destination) throws IOException, ExecutionManagerDownloadException {
checkNotNull(historyId, "historyId is null");
checkNotNull(datasetId, "datasetId is null");
checkNotNull(destination, "destination is null");
try {
historiesClient.downloadDataset(historyId, datasetId, destination.toFile());
} catch (RuntimeException e) {
throw new ExecutionManagerDownloadException("Could not download dataset identified by historyId=" + historyId + ", datasetId=" + datasetId + " to destination=" + destination, e);
}
}
Aggregations