@Test(expectedExceptions = DatasetNotFoundException.class) public void getDatasetUploadInfoFails() throws Exception { new UploadsInfo(Collections.emptyList()).getDataSet("dataset.non_existing_one"); }
public DataSet getDataSet(String datasetId) { notEmpty(datasetId, "datasetId"); final DataSet dataSet = datasets.get(datasetId); if (dataSet != null) { return dataSet; } else { throw new DatasetNotFoundException(datasetId); } }
UploadsInfo { public DataSet getDataSet(String datasetId) { notEmpty(datasetId, "datasetId"); final DataSet dataSet = datasets.get(datasetId); if (dataSet != null) { return dataSet; } else { throw new DatasetNotFoundException(datasetId); } } }
UploadsInfo { public DataSet getDataSet(String datasetId) { notEmpty(datasetId, "datasetId"); final DataSet dataSet = datasets.get(datasetId); if (dataSet != null) { return dataSet; } else { throw new DatasetNotFoundException(datasetId); } } UploadsInfo(@JsonProperty("sets") Collection<DataSet> datasets); }
UploadsInfo { public DataSet getDataSet(String datasetId) { notEmpty(datasetId, "datasetId"); final DataSet dataSet = datasets.get(datasetId); if (dataSet != null) { return dataSet; } else { throw new DatasetNotFoundException(datasetId); } } UploadsInfo(@JsonProperty("sets") Collection<DataSet> datasets); DataSet getDataSet(String datasetId); @Override String toString(); }
UploadsInfo { public DataSet getDataSet(String datasetId) { notEmpty(datasetId, "datasetId"); final DataSet dataSet = datasets.get(datasetId); if (dataSet != null) { return dataSet; } else { throw new DatasetNotFoundException(datasetId); } } UploadsInfo(@JsonProperty("sets") Collection<DataSet> datasets); DataSet getDataSet(String datasetId); @Override String toString(); static final String URI; }