From 64e2fc5766be87a24a6638b8249996f55a690722 Mon Sep 17 00:00:00 2001
From: Sam Leeflang <sam.leeflang@naturalis.nl>
Date: Wed, 4 Dec 2024 16:22:12 +0100
Subject: [PATCH] Update for the FDO types and the routes

---
 .../controller/PidController.java             |  4 +---
 .../handlemanager/domain/fdo/FdoType.java     | 20 +++++++++----------
 .../controller/PidControllerTest.java         |  2 +-
 3 files changed, 12 insertions(+), 14 deletions(-)

diff --git a/src/main/java/eu/dissco/core/handlemanager/controller/PidController.java b/src/main/java/eu/dissco/core/handlemanager/controller/PidController.java
index 15f78ec9..02a159c7 100644
--- a/src/main/java/eu/dissco/core/handlemanager/controller/PidController.java
+++ b/src/main/java/eu/dissco/core/handlemanager/controller/PidController.java
@@ -33,7 +33,7 @@
 import org.springframework.web.bind.annotation.RestController;
 
 @RestController
-@RequestMapping("/api/v1/pids")
+@RequestMapping
 @RequiredArgsConstructor
 @ControllerAdvice
 @Slf4j
@@ -41,7 +41,6 @@ public class PidController {
 
   private final PidService service;
   private final ApplicationProperties applicationProperties;
-  private final SchemaValidator validatorComponent;
   private static final String RECEIVED_MSG = "Received {} request from user {}";
 
   // Getters
@@ -51,7 +50,6 @@ public ResponseEntity<JsonApiWrapperRead> resolvePid(@PathVariable("prefix") Str
       @PathVariable("suffix") String suffix, HttpServletRequest r) throws PidResolutionException {
     String link = applicationProperties.getUiUrl() + "/" + r.getRequestURI();
     String handle = prefix + "/" + suffix;
-
     if (prefix.equals(applicationProperties.getPrefix())) {
       var node = service.resolveSingleRecord(handle, link);
       return ResponseEntity.status(HttpStatus.OK).body(node);
diff --git a/src/main/java/eu/dissco/core/handlemanager/domain/fdo/FdoType.java b/src/main/java/eu/dissco/core/handlemanager/domain/fdo/FdoType.java
index 66d59162..df779798 100644
--- a/src/main/java/eu/dissco/core/handlemanager/domain/fdo/FdoType.java
+++ b/src/main/java/eu/dissco/core/handlemanager/domain/fdo/FdoType.java
@@ -32,27 +32,27 @@ public enum FdoType {
   DIGITAL_SPECIMEN(
       "DigitalSpecimen",
       "https://doi.org/21.T11148/894b1e6cad57e921764e",
-      "https://doi.org/21.T11148/894b1e6cad57e921764e",
+      "https://doi.org/21.T11148/d8de0819e144e4096645",
       DOI_DOMAIN),
   @JsonProperty("https://doi.org/21.T11148/bbad8c4e101e8af01115")
   @JsonAlias("https://hdl.handle.net/21.T11148/bbad8c4e101e8af01115")
   DIGITAL_MEDIA(
       "MediaObject",
       "https://doi.org/21.T11148/bbad8c4e101e8af01115",
-      "https://doi.org/21.T11148/bbad8c4e101e8af01115",
+      "https://doi.org/21.T11148/306452d0867adb910803",
       DOI_DOMAIN),
   @JsonProperty("https://doi.org/21.T11148/cf458ca9ee1d44a5608f")
   @JsonAlias("https://hdl.handle.net/21.T11148/cf458ca9ee1d44a5608f")
   ANNOTATION(
       "Annotation",
       "https://doi.org/21.T11148/cf458ca9ee1d44a5608f",
-      "https://doi.org/21.T11148/cf458ca9ee1d44a5608f",
+      "https://doi.org/21.T11148/2e76f544229901c5a942",
       HANDLE_DOMAIN),
-  @JsonProperty("https://doi.org/21.T11148/417a4f472f60f7974c12")
-  @JsonAlias("https://hdl.handle.net/21.T11148/417a4f472f60f7974c12")
+  @JsonProperty("https://doi.org/21.T11148/23a63913d0c800609a50")
+  @JsonAlias("https://hdl.handle.net/21.T11148/23a63913d0c800609a50")
   SOURCE_SYSTEM(
       "sourceSystem",
-      "https://doi.org/21.T11148/417a4f472f60f7974c12",
+      "https://doi.org/21.T11148/23a63913d0c800609a50",
       "https://doi.org/21.T11148/417a4f472f60f7974c12",
       HANDLE_DOMAIN),
   @JsonProperty("https://doi.org/21.T11148/ce794a6f4df42eb7e77e")
@@ -60,7 +60,7 @@ public enum FdoType {
   DATA_MAPPING(
       "Mapping",
       "https://doi.org/21.T11148/ce794a6f4df42eb7e77e",
-      "https://doi.org/21.T11148/ce794a6f4df42eb7e77e",
+      "https://doi.org/21.T11148/def2eba59562958fa4a0",
       HANDLE_DOMAIN),
   @JsonProperty("https://doi.org/21.T11148/413c00cbd83ae33d1ac0")
   @JsonAlias("https://hdl.handle.net/21.T11148/413c00cbd83ae33d1ac0")
@@ -76,11 +76,11 @@ public enum FdoType {
       "https://doi.org/21.T11148/d7570227982f70256af3",
       "https://doi.org/21.T11148/d7570227982f70256af3",
       HANDLE_DOMAIN),
-  @JsonProperty("https://doi.org/21.T11148/22e71a0015cbcfba8ffa")
-  @JsonAlias("https://hdl.handle.net/21.T11148/22e71a0015cbcfba8ffa")
+  @JsonProperty("https://doi.org/21.T11148/a369e128df5ef31044d4")
+  @JsonAlias("https://hdl.handle.net/21.T11148/a369e128df5ef31044d4")
   MAS(
       "Machine Annotation Service",
-      "https://doi.org/21.T11148/22e71a0015cbcfba8ffa",
+      "https://doi.org/21.T11148/a369e128df5ef31044d4",
       "https://doi.org/21.T11148/22e71a0015cbcfba8ffa",
       HANDLE_DOMAIN);
 
diff --git a/src/test/java/eu/dissco/core/handlemanager/controller/PidControllerTest.java b/src/test/java/eu/dissco/core/handlemanager/controller/PidControllerTest.java
index ed54e37c..da27f833 100644
--- a/src/test/java/eu/dissco/core/handlemanager/controller/PidControllerTest.java
+++ b/src/test/java/eu/dissco/core/handlemanager/controller/PidControllerTest.java
@@ -63,7 +63,7 @@ class PidControllerTest {
 
   @BeforeEach
   void setup() {
-    controller = new PidController(service, applicationProperties, validatorComponent);
+    controller = new PidController(service, applicationProperties);
   }
 
   @Test