Closed brunopacheco1 closed 2 months ago
This pull request refactors the dataset search functionality to improve efficiency and remove redundant code. The main changes involve modifying the data structure used for dataset IDs and record counts, removing the separate RecordsCountCollector, and updating the related classes and interfaces to accommodate these changes.
Change | Details | Files |
---|---|---|
Refactored dataset search to use Map<String, Integer> instead of separate List |
|
src/main/java/io/github/genomicdatainfrastructure/discovery/datasets/application/usecases/SearchDatasetsQuery.java src/main/java/io/github/genomicdatainfrastructure/discovery/datasets/application/ports/DatasetIdsCollector.java src/main/java/io/github/genomicdatainfrastructure/discovery/datasets/infrastructure/ckan/persistence/CkanDatasetIdsCollector.java |
Updated BeaconDatasetIdsCollector to implement only DatasetIdsCollector interface |
|
src/main/java/io/github/genomicdatainfrastructure/discovery/datasets/infrastructure/beacon/persistence/BeaconDatasetIdsCollector.java |
Modified DatasetsRepository and CkanDatasetsRepository to use Set |
|
src/main/java/io/github/genomicdatainfrastructure/discovery/datasets/application/ports/DatasetsRepository.java src/main/java/io/github/genomicdatainfrastructure/discovery/datasets/infrastructure/ckan/persistence/CkanDatasetsRepository.java |
Removed RecordsCountCollector interface |
|
src/main/java/io/github/genomicdatainfrastructure/discovery/datasets/application/ports/RecordsCountCollector.java |
Summary by Sourcery
Refactor the dataset ID collection and search processes to use maps and sets for improved efficiency and clarity. Remove the RecordsCountCollector interface and its associated logic, consolidating record count handling within the DatasetIdsCollector.
Enhancements:
Chores: