Skip to content

Commit

Permalink
work for multi taxonomy support
Browse files Browse the repository at this point in the history
  • Loading branch information
djtfmartin committed Sep 8, 2024
1 parent a57c439 commit 9cd0550
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
12 changes: 11 additions & 1 deletion src/main/java/org/gbif/dwc/terms/GbifTerm.java
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,16 @@ public enum GbifTerm implements Term, AlternativeNames, Serializable {
*/
hasGeospatialIssues(DwcTerm.GROUP_OCCURRENCE),


/**
* The checklist key.
* <p>
* The taxonomic checklist to use when search using a taxonKey, a higher taxonKey e.g. phylumKey
* or when searching with a scientific name
* </p>
*/
checklistKey(DwcTerm.GROUP_TAXON),

/**
* The GBIF backbone key.
* <p>
Expand Down Expand Up @@ -367,7 +377,7 @@ public enum GbifTerm implements Term, AlternativeNames, Serializable {
* Lists all GBIF terms in taxon group.
*/
public static final GbifTerm[] TAXONOMIC_TERMS =
{GbifTerm.taxonKey, GbifTerm.acceptedTaxonKey, GbifTerm.kingdomKey, GbifTerm.phylumKey, GbifTerm.classKey,
{GbifTerm.checklistKey, GbifTerm.taxonKey, GbifTerm.acceptedTaxonKey, GbifTerm.kingdomKey, GbifTerm.phylumKey, GbifTerm.classKey,
GbifTerm.orderKey, GbifTerm.familyKey, GbifTerm.genusKey, GbifTerm.subgenusKey, GbifTerm.speciesKey,
GbifTerm.species, GbifTerm.canonicalName, GbifTerm.nameType, GbifTerm.acceptedScientificName,
GbifTerm.verbatimScientificName};
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/org/gbif/dwc/terms/GbifTermTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ public void testListByGroup() {
assertEquals(10, new HashSet<>(profileTerms).size());

List<GbifTerm> taxonTerms = GbifTerm.listByGroup(DwcTerm.GROUP_TAXON);
assertEquals(15, taxonTerms.size());
assertEquals(15, new HashSet<>(taxonTerms).size());
assertEquals(16, taxonTerms.size());
assertEquals(16, new HashSet<>(taxonTerms).size());

List<GbifTerm> crawlingTerms = GbifTerm.listByGroup(GbifTerm.GROUP_CRAWLING);
assertEquals(3, crawlingTerms.size());
Expand Down

0 comments on commit 9cd0550

Please sign in to comment.