Issue 15065

Reorder Term enums in dwc-api

15065
Reporter: mdoering
Assignee: kbraak
Type: SubTask
Summary: Reorder Term enums in dwc-api 
Description: Order each enumeration so that related terms are next to each other. dwc terms should be grouped in their dwc groups and within groups as makes most sense to humans. For example the classification from scientific name, name parts to species, subgenus and up to kingdom
Priority: Major
Resolution: Fixed
Status: Closed
Created: 2014-02-12 17:23:53.716
Updated: 2014-02-20 12:24:22.865
Resolved: 2014-02-20 12:24:22.829


Author: kbraak@gbif.org
Created: 2014-02-17 15:52:00.97
Updated: 2014-02-17 15:52:00.97
        
[~mdoering@gbif.org], [~omeyn@gbif.org], [~fmendez@gbif.org] 3 proposals below for your comments. Thanks.

A quick review of GbitTerm found the following fields from Occurrence missing:

-genericName
-typifiedName

Proposal 1) Add these missing terms

A quick review of DcTerm and DwcTerm revealed the enum is sorted alphabetically, a-z. GbifTerm is not sorted alphabetically..

Proposal 2) Reorder GbifTerm terms alphabetically, similar to DcTerm and DwcTerm.

We can rely on the fact that "List listByGroup(String group)" method inside DwcTerm can be used to retrieve a list of terms for a DwC group, with constant term order.

It's only with the taxonomic classification that a special order has to exist. For this case, DwCTerm[] TAXONOMIC_TERMS already exists in DwcTerm, having all terms in GROUP_TAXON sorted appropriately.

Proposal 3) Instead of reordering the DwcTerm enum, it would be simpler for us to iterate through terms by their groups, and use TAXONOMIC_TERMS for the special sort order needed for the taxonomic classification.

PS: So that everybody is aware, the IPT orders fields in downloads according to the extensions. So, for the occurrence core, the order follows the occurrence core extension: http://rs.gbif.org/core/dwc_occurrence.xml





    


Author: mdoering@gbif.org
Created: 2014-02-17 17:26:07.632
Updated: 2014-02-17 17:26:07.632
        
The 2 missing terms are in DwcTerm, not GbifTerm. They are not ratified yet, but being proposed under the dwc namespace and catalog of life also uses them already in the dwc namespace

We should definitely order by the dwc term group. Maybe we can also add a group notion to the GbifTerms? There is already the problem that we have quite a few terms in there which only make sense to checklists and can be ignored for occurrences. Apart from the taxonomic terms as you say I am fine to just apply an alphabetic ordering

    


Author: kbraak@gbif.org
Created: 2014-02-20 12:24:22.862
Updated: 2014-02-20 12:24:22.862
        
Summary: reordering not necessary. Grouping of terms will be used to order terms. For taxonomic terms, a static list of terms exists for GbifTerm and DwcTerm that should be used.

Changes committed in https://github.com/gbif/dwc-api/commit/4a619d43e5c6919cfcd3c8942c67176853d823be