AtlasOfLivingAustralia / bie-index

Taxonomic search services
https://bie-ws.ala.org.au/ws
Other
1 stars 17 forks source link

rankID improvements #376

Closed adam-collins closed 5 months ago

adam-collins commented 9 months ago

rankID is populated using an external reference file at the time DwCA names indexes are imported.

The ALA names index has this information but does not include it in the combined version of the names index. https://github.com/AtlasOfLivingAustralia/ala-name-matching/issues/223

Improvements

  1. Use the imported taxonRankID if it is available https://github.com/AtlasOfLivingAustralia/bie-index/blob/master/grails-app/services/au/org/ala/bie/ImportService.groovy#L1445
  2. Permit external override of the internal taxonRanks.json file.
  3. Update ws/ranks to only return results that are present in the index. This is to include information branch notes othernames found in taxonRanks.json to rank and rankID that exist in the index.
  4. The openapi documentation method was recently changed to annotation so this needs moving.
  5. Update buildNameFormatted that uses rankGroup because this information may now be absent and need to be inferred from rank and rankID. e.g. rankGroup is the upper rank name where the upper rank is identified by a rankID in the 000's, e.g. 1000, 2000, 7000.
  6. Update ranks() https://github.com/AtlasOfLivingAustralia/bie-index/blob/master/grails-app/services/au/org/ala/bie/ImportService.groovy#L2767 so that otherNames are correctly added to the map for searching purposes. Prevent changes to ws/ranks output because it also uses this method.
  7. Update taxonRanks.json to match the current names index builder https://github.com/AtlasOfLivingAustralia/ala-name-matching/blob/901eeb929b0e2b3cba47817da83c67ba1578f255/ala-name-matching-model/src/main/java/au/org/ala/names/model/RankType.java#L37
adam-collins commented 8 months ago
  1. Added a TODO for updating when ala-name-matching-model is updated
  2. Override taxonRanks.json with location specified by config taxonRanksFile
  3. Limits /ranks response to rk_ index fields
  4. Added openapi annotations for /ranks
  5. Unnecessary, see 7
  6. Now using taxonRanks.json's otherNames when searching for rankID
  7. Now using ala-name-matching-model's RankType class as the source for the default taxonRanks.json. Leaving this now unused file as a reference when constructing an override file, see 2.