From 9bf9fe16f903734550b1690460b54c50e34049fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20D=C3=B6ring?= Date: Tue, 8 Oct 2024 11:57:28 +0200 Subject: [PATCH] Adding new CLB_DATASET_KEY IdentifierType and ACEF & TEXT_TREE EndpointType values. See https://github.com/CatalogueOfLife/backend/issues/1356 --- .../java/org/gbif/api/vocabulary/EndpointType.java | 10 ++++++++++ .../java/org/gbif/api/vocabulary/IdentifierType.java | 8 +++++++- .../org/gbif/api/vocabulary/IdentifierTypeTest.java | 2 +- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/gbif/api/vocabulary/EndpointType.java b/src/main/java/org/gbif/api/vocabulary/EndpointType.java index 0f75fb2bc2..d09b12fbee 100644 --- a/src/main/java/org/gbif/api/vocabulary/EndpointType.java +++ b/src/main/java/org/gbif/api/vocabulary/EndpointType.java @@ -95,6 +95,16 @@ public enum EndpointType { */ BIOM_2_1, + /** + * Annual Checklist Exchange Format (ACEF) + * from the Catalogue of Life. + */ + ACEF, + /** + * TextTree. + * is a simple format to represent taxonomic trees using indented, plain text. + */ + TEXT_TREE, /** * Any other service not covered by this enum so far. */ diff --git a/src/main/java/org/gbif/api/vocabulary/IdentifierType.java b/src/main/java/org/gbif/api/vocabulary/IdentifierType.java index 59d552e76f..32bdeba13b 100644 --- a/src/main/java/org/gbif/api/vocabulary/IdentifierType.java +++ b/src/main/java/org/gbif/api/vocabulary/IdentifierType.java @@ -104,7 +104,13 @@ public enum IdentifierType { /** * https://www.ncbi.nlm.nih.gov/ */ - NCBI_BIOCOLLECTION; + NCBI_BIOCOLLECTION, + + /** + * ChecklistBank dataset keys (integer) + * https://www.checklistbank.org/dataset + */ + CLB_DATASET_KEY; // TODO: Check if this is used, it didn't exist in the new Registry2 API, but I preserved it from the old vocabulary public static final List TYPES; diff --git a/src/test/java/org/gbif/api/vocabulary/IdentifierTypeTest.java b/src/test/java/org/gbif/api/vocabulary/IdentifierTypeTest.java index 3358fcaba6..bbe9c31c29 100644 --- a/src/test/java/org/gbif/api/vocabulary/IdentifierTypeTest.java +++ b/src/test/java/org/gbif/api/vocabulary/IdentifierTypeTest.java @@ -50,7 +50,7 @@ public void testGuessing() { @Test public void testTypes() { List identifierTypes = IdentifierType.TYPES; - assertEquals(20, identifierTypes.size()); + assertEquals(21, identifierTypes.size()); } }