AtlasOfLivingAustralia / regions

Regions front end web application
https://regions.ala.org.au
1 stars 16 forks source link

Regions's reference to subgroups.json (we needed multilple duplicated classes) #79

Closed biodivAtlasAT closed 1 year ago

biodivAtlasAT commented 4 years ago

Hello community,

When changing our Taxon in subgroups.json this issue was happening.

regionsGroups.txt subgroups.txt

Like in our case (see file subgroups.json) we used duplicated classnames. In biocache the subgroups file is working proper within this duplication of classnames.

In regions tool it appeared that the names show as often as given in the subgroups file. To merge or normalize the names I created a regionsGroups.json where the classnames only show once and others following left as blank String

In regions tool code I then refered to the file instead of refering to BIOCACHE_SERVICE_URL/explore/hierarchy to the appropriate regionsGrourp.json file on the server /data/regions/config

This is in the MetaData Server file //def responseGroups = getJSON("${BIOCACHE_SERVICE_URL}/explore/hierarchy") def responseGroups = JSON.parse(new File("/data/regions/config/regionsGroups.json").text)

adam-collins commented 1 year ago

Adding ability to override biocache-service's /explore/hierarchy response and use a local file instead.

Default is subgroupFile: '/data/regions/config/regionsGroups.json'