Closed brunopacheco1 closed 2 months ago
This pull request makes CKAN filters configurable by introducing a new configuration property for dataset filters. The changes primarily affect the BeaconDatasetsRepository class, modifying how selected facets are handled and injected into the repository.
Files | Changes |
---|---|
src/main/java/io/github/genomicdatainfrastructure/discovery/repositories/BeaconDatasetsRepository.java |
Introduced a new configuration property 'datasets.filters' to make CKAN filters configurable |
src/main/java/io/github/genomicdatainfrastructure/discovery/repositories/BeaconDatasetsRepository.java |
Replaced the static SELECTED_FACETS constant with a dynamic selectedFacets field |
src/main/java/io/github/genomicdatainfrastructure/discovery/repositories/BeaconDatasetsRepository.java |
Modified the constructor to accept the new datasets.filters configuration and initialize the selectedFacets field |
src/main/java/io/github/genomicdatainfrastructure/discovery/repositories/BeaconDatasetsRepository.java |
Updated the searchCkan method to use the new selectedFacets field instead of the static SELECTED_FACETS constant |
src/main/java/io/github/genomicdatainfrastructure/discovery/repositories/BeaconDatasetsRepository.java |
Reordered and regrouped class fields and constructor parameters for better organization |
src/test/java/io/github/genomicdatainfrastructure/discovery/services/BeaconDatasetRepositoryTest.java |
Updated the test setup in BeaconDatasetRepositoryTest to include the new datasets.filters parameter |
Summary by Sourcery
Make CKAN filters configurable by replacing the static selected facets with a configurable property, allowing dynamic specification of dataset filters. Update the constructor and tests to support this new configuration.
Enhancements:
Tests: