From 9a6062886ca6b9f14273f4f27b50e319cab754c9 Mon Sep 17 00:00:00 2001 From: srishti Date: Fri, 1 Dec 2023 14:42:01 +0100 Subject: [PATCH] EA-3619 - remove sysouts --- .../service/MetadataChosenLanguageService.java | 3 --- .../client/service/TranslationApiRestClient.java | 13 ++----------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/translation-client/src/main/java/eu/europeana/api/translation/client/service/MetadataChosenLanguageService.java b/translation-client/src/main/java/eu/europeana/api/translation/client/service/MetadataChosenLanguageService.java index d4382a99..7b8fac71 100644 --- a/translation-client/src/main/java/eu/europeana/api/translation/client/service/MetadataChosenLanguageService.java +++ b/translation-client/src/main/java/eu/europeana/api/translation/client/service/MetadataChosenLanguageService.java @@ -37,7 +37,6 @@ public String getMostRepresentativeLanguage(FullBean bean, String targetLanguage return null; } - System.out.println("langCountMap "+langCountMap); //reverse map - as values might not be unique so using grouping method Map> reverseMap = langCountMap.entrySet() @@ -45,8 +44,6 @@ public String getMostRepresentativeLanguage(FullBean bean, String targetLanguage .collect(Collectors.groupingBy(Map.Entry::getValue, Collectors.mapping(Map.Entry::getKey, Collectors.toList()))); List languagesWithMostvalues = reverseMap.get(Collections.max(reverseMap.keySet())); - System.out.println("reverseMap "+reverseMap); - // if there is a tie between more than one language, choose based on the precedance list if (languagesWithMostvalues.size() > 1) { Optional langWithHigherPrecedance = PRECENDANCE_LIST.stream().filter(languagesWithMostvalues :: contains).findFirst(); diff --git a/translation-client/src/main/java/eu/europeana/api/translation/client/service/TranslationApiRestClient.java b/translation-client/src/main/java/eu/europeana/api/translation/client/service/TranslationApiRestClient.java index 646fd9b5..b1e24b09 100644 --- a/translation-client/src/main/java/eu/europeana/api/translation/client/service/TranslationApiRestClient.java +++ b/translation-client/src/main/java/eu/europeana/api/translation/client/service/TranslationApiRestClient.java @@ -33,13 +33,7 @@ public TranslationApiRestClient(WebClient apiClient) { * @return */ public TranslationResponse getTranslations(String request) { - TranslationResponse response = getTranslationApiResponse(webClient, TranslationClientUtils.buildUrl(TRANSLATE_URL), request, false); - - System.out.println(response.getTranslations()); - System.out.println(response.getLang()); - System.out.println(response.getService()); - - return response; + return getTranslationApiResponse(webClient, TranslationClientUtils.buildUrl(TRANSLATE_URL), request, false); } /** @@ -48,10 +42,7 @@ public TranslationResponse getTranslations(String request) { * @return */ public LangDetectResponse getDetectedLanguages(String request) { - LangDetectResponse response = getTranslationApiResponse(webClient, TranslationClientUtils.buildUrl(LANG_DETECT_URL), request, true); - System.out.println(response.getLangs()); - System.out.println(response.getService()); - return response; + return getTranslationApiResponse(webClient, TranslationClientUtils.buildUrl(LANG_DETECT_URL), request, true); }