Skip to content

Commit

Permalink
Merge branch 'dev' into #343_suggest_change_and_log
Browse files Browse the repository at this point in the history
  • Loading branch information
fmendezh committed May 26, 2021
2 parents 3d7938d + 846dcce commit e2c80d6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ public class DatasetResource extends BaseNetworkEntityResource<Dataset>
private static final Logger LOG = LoggerFactory.getLogger(DatasetResource.class);

private static final int ALL_DATASETS_LIMIT = 200;
public static final int SEARCH_EXPORT_LIMIT = 300;

private final RegistryDatasetService registryDatasetService;
private final DatasetSearchService searchService;
Expand Down Expand Up @@ -200,7 +201,9 @@ public void search(HttpServletResponse response,
String headerValue = "attachment; filename=gbif_datasets." + format.name().toLowerCase();
response.setHeader(HttpHeaders.CONTENT_DISPOSITION, headerValue);

CsvWriter.datasetSearchResultCsvWriter(Iterables.datasetSearchResults(searchRequest, searchService),
CsvWriter.datasetSearchResultCsvWriter(Iterables.datasetSearchResults(searchRequest,
searchService,
SEARCH_EXPORT_LIMIT),
format)
.export(response.getWriter());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
@RequestMapping(value = "occurrence/download", produces = MediaType.APPLICATION_JSON_VALUE)
public class OccurrenceDownloadResource implements OccurrenceDownloadService {

public static final int STATS_EXPORT_LIMIT = 500;
private final OccurrenceDownloadMapper occurrenceDownloadMapper;
private final DatasetOccurrenceDownloadMapper datasetOccurrenceDownloadMapper;
private final IdentityAccessService identityService;
Expand Down Expand Up @@ -395,7 +396,8 @@ public void getDownloadStatistics(
toDate,
publishingCountry,
datasetKey,
publishingOrgKey),
publishingOrgKey,
STATS_EXPORT_LIMIT),
format)
.export(response.getWriter());
}
Expand Down

0 comments on commit e2c80d6

Please sign in to comment.