Taxonomy filter in applyFilter
Taxonomy filter is not applicable within applyFilter operation. In this operation, SQL condition is being built and added to QueryBuilder for entity selection. Taxonomy filter is external filter and cannot be applied by adding conditions in TMD database.
Notes
- Instead of searching by
taxonomy_ptnameId
- better to usespecies_is
as it is the same integer andspecies
is part of Observation entity (no additional http request to Taxonomy API is required) - Sorting by data from taxonomy API is not possible (it is possible only to sort by Observation.species, which is equivalent of TaxonomyApi->ptnameId). Data like Genus and Family are not in TMD database and it is not possible to create sorting by data that is not present in the database.
AC
-
external filters are enabled in FilterService. - New interface is provided and integrated. This interface must be implemented by any class in main project which needs to be used in generic filtering (implemented in TaxonomyFilter in TMD)
-
validation of external filters (like taxonomy filter) is somehow handled in api-base - Supported filters (also external ones) are integrated into GenericFieldBasedFilter. No validation is necessary at this point, only determining allowed external filters, which is now supported directly in GenericFieldBasedFilter
-
Conditions that use taxonomy filter can be stored and used in FilterHistory (ie. taxonomy_genus_is
,taxonomy_ptnameId_is
,taxonomy_genus_is_list
andtaxonomy_ptnameId_is_list
) -
Conditions with is_list
can be used in FilterHistory -
Tests
Review
-
external filters are enabled in FilterService. - New interface is provided and integrated. This interface must be implemented by any class in main project which needs to be used in generic filtering (implemented in TaxonomyFilter in TMD)
-
validation of external filters (like taxonomy filter) is somehow handled in api-base - Supported filters (also external ones) are integrated into GenericFieldBasedFilter. No validation is necessary at this point, only determining allowed external filters, which is now supported directly in GenericFieldBasedFilter
-
Conditions that use taxonomy filter can be stored and used in FilterHistory (ie. taxonomy_genus_is
,taxonomy_ptnameId_is
,taxonomy_genus_is_list
andtaxonomy_ptnameId_is_list
) -
Conditions with is_list
can be used in FilterHistory -
Tests
Edited by Michael Voigt