From 9ca8aed160bc8e50485e88acb556d760d3eddb17 Mon Sep 17 00:00:00 2001 From: Antonis Lempesis Date: Mon, 10 Oct 2022 11:27:28 +0000 Subject: [PATCH] ignoring non aoi interfaces --- .../repo/manager/service/RepositoryServiceImpl.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/dnetlib/repo/manager/service/RepositoryServiceImpl.java b/src/main/java/eu/dnetlib/repo/manager/service/RepositoryServiceImpl.java index 1fb5183..440b096 100644 --- a/src/main/java/eu/dnetlib/repo/manager/service/RepositoryServiceImpl.java +++ b/src/main/java/eu/dnetlib/repo/manager/service/RepositoryServiceImpl.java @@ -472,8 +472,16 @@ public class RepositoryServiceImpl implements RepositoryService { // String rs = restTemplate.getForObject(uriComponents.toUri(), String.class); ApiDetailsResponse rs = restTemplate.getForObject(uriComponents.toUri(), ApiDetailsResponse.class); - return converter.toRepositoryInterfaceList(rs.getApi()); + // TODO STOP FILTERING OUT "sword", "rest", etc AND FIX UI! + List res = new ArrayList<>(); + + for (ApiDetails det: rs.getApi()) { + if (det.getProtocol().equals("oai")) + res.add(det); + } + + return converter.toRepositoryInterfaceList(res); } @Override