From dc0ebe371c7669f5f17b4f6b7ecd32cc64db270f Mon Sep 17 00:00:00 2001 From: Ryan Amari Date: Tue, 19 Nov 2024 16:38:00 -0500 Subject: [PATCH] Fix dictionary service path --- .../hpds/processing/dictionary/DictionaryService.java | 2 +- .../hms/dbmi/avillach/hpds/processing/io/PfbWriter.java | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/processing/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/processing/dictionary/DictionaryService.java b/processing/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/processing/dictionary/DictionaryService.java index 653f1907..c6c10bef 100644 --- a/processing/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/processing/dictionary/DictionaryService.java +++ b/processing/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/processing/dictionary/DictionaryService.java @@ -32,6 +32,6 @@ public DictionaryService(@Value("${dictionary.host}") String dictionaryHostTempl } public List getConcepts(List conceptPaths) { - return restTemplate.exchange(dictionaryHost + "/picsure/proxy/dictionary-api/concepts/detail/", HttpMethod.POST, new HttpEntity<>(conceptPaths), CONCEPT_LIST_TYPE_REFERENCE).getBody(); + return restTemplate.exchange(dictionaryHost + "/pic-sure-api-2/PICSURE/proxy/dictionary-api/concepts/detail", HttpMethod.POST, new HttpEntity<>(conceptPaths), CONCEPT_LIST_TYPE_REFERENCE).getBody(); } } diff --git a/processing/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/processing/io/PfbWriter.java b/processing/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/processing/io/PfbWriter.java index cf1e496e..d29b91f7 100644 --- a/processing/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/processing/io/PfbWriter.java +++ b/processing/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/processing/io/PfbWriter.java @@ -132,7 +132,7 @@ private void writeDrsUris() { conceptMap = dictionaryService.getConcepts(originalFields).stream() .collect(Collectors.toMap(Concept::conceptPath, Function.identity())); } catch (RuntimeException e) { - log.error("Error fetching DRS URIs from dictionary service"); + log.error("Error fetching DRS URIs from dictionary service", e); } for (int i = 0; i < formattedFields.size(); i++) { @@ -144,7 +144,8 @@ private void writeDrsUris() { if (concept != null) { Map meta = concept.meta(); if (meta != null) { - drsUris = meta.values().stream().toList(); + drsUris = new ArrayList<>(meta.keySet().stream().toList()); + drsUris.addAll(meta.values().stream().toList()); } } drsUriData.put("drs_uri", drsUris);