Issue 12526

Occurrence search: standardize parameter names

Reporter: kbraak
Assignee: kbraak
Type: Bug
Summary: Occurrence search: standardize parameter names
Priority: Minor
Resolution: Fixed
Status: Closed
Created: 2012-12-11 15:21:00.156
Updated: 2013-09-30 16:48:15.569
Resolved: 2013-01-14 15:47:12.259
Description: This is a complete list of occurrence search filters:

Scientific name (TAXON_KEY)
location (BOUNDING_BOX)
collector (COLLECTOR_NAME)
basis of record (BASIS_OF_RECORD)
collection date (DATE)
catalog number (CATALOG_NUMBER)

dataset (datasetKey)

Notice datasetKey is the only parameter in lower/camelCase.

What is our convention for parameter names? Registry web services appear to use lower/camelCase:


Created: 2012-12-11 15:25:19.649
Updated: 2012-12-11 15:25:19.649
we said we use lower camel case all over and also need to make sure the same parameters are called the same everywhere.

Created: 2013-01-14 15:47:12.285
Updated: 2013-01-14 15:47:12.285
Lower camel case is used all over. This is our established convention now for parameter naming.

The parameter names, based on ENUMs, can be case insensitive, ignore whitespaces, underscores and dashes. This is thanks to the lookup done in VocabularyUtils:

Therefore, regardless of whether we use datasetKey, DATASET_KEY, dataset_key, or dataset-key in an occurrence search, the parameter name is looked up against the OccurrenceSearchParameter ENUM:

Using any of those different parameter names, returns the same.

All we need to do now, is ensure the web application uses lower camel case when generating URIs. I'll create a separate issue for this. 

Comment: Can you make sure we document the lowerCamelCase version in our API wiki?
Created: 2013-01-14 16:22:02.719
Updated: 2013-01-14 16:22:02.719

Comment: The API wiki is now up to date, using the lower camel case across all parameter names for all services.
Created: 2013-01-14 16:36:14.101
Updated: 2013-01-14 16:36:14.101