Open MikeNeilson opened 1 year ago
Location kind would be helpful too given hec-cwms-data-access provides a retrieval method by kind: https://bitbucket.hecdev.net/projects/CWMS/repos/hec-cwms-data-access/browse/hec-db-jdbc/src/main/java/wcds/dbi/oracle/cwms/CwmsLocationJdbcDao.java#446
I recently worked on the Location Catalog. There are currently 4 optional regex filters. The method signature is getting a little out of hand. I suggest we change the Location Dao interface so that it has a single Map<String, String> of regex filters where the Key is the name of the field and the value is the regex. Then we wouldn't have to change the Dao each time we want to add another potential regex filter. In the Dao we can loop over all the filters entries and add a condition for each filter that was specified. It would be fairly easy to add a filter for every String field in LocationCatalogEntry if we wanted.
Actually, maybe we should add filters for the boolean and double fields as well. For example, being able to query for locations inside a geographic box could be very useful and would be easy to implement.
Agreed. And I'm quite sure that particular feature (geographic box) will be asked for soon.
The Location catalog was recently changed to add CatalogRequestParameters and that means it would now be fairly easy to add filters for public-name or long-name on location. I envision similar changes for the timeseries catalog but that has not been done yet.
If more people start asking we'll knock the priority up.
While typing up a searching for data guide I realized a lot of our location names are abbreviations that a lot of people may not be familiar with.
The catalog should allow searching by public or long name.