From 71d8a8eedb8acc261f2a990de57464de1cf249be Mon Sep 17 00:00:00 2001 From: Nathanael Jourdane Date: Mon, 9 May 2016 17:03:29 +0200 Subject: [PATCH] Implement the VOResources keywords filter. --- src/main/java/eu/omp/irap/vespa/epntapclient/voresource/VOResourceCtrl.java | 3 ++- src/test/java/eu/omp/irap/vespa/epntapclient/TestEpnTapFacade.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/eu/omp/irap/vespa/epntapclient/voresource/VOResourceCtrl.java b/src/main/java/eu/omp/irap/vespa/epntapclient/voresource/VOResourceCtrl.java index 5b4482c..bcfd765 100644 --- a/src/main/java/eu/omp/irap/vespa/epntapclient/voresource/VOResourceCtrl.java +++ b/src/main/java/eu/omp/irap/vespa/epntapclient/voresource/VOResourceCtrl.java @@ -91,13 +91,14 @@ public class VOResourceCtrl { StringJoiner keywordJoiner = new StringJoiner(" "); for (Map.Entry keyword : keywords.entrySet()) { - keywordJoiner.add(keyword.getKey() + ":\"" + keyword.getValue() + "\""); + keywordJoiner.add(keyword.getKey().toLowerCase() + ":\"" + keyword.getValue() + "\""); } Map parameters = new HashMap(); parameters.put("keywords", keywordJoiner.toString()); parameters.put("max", String.valueOf(VOResourceCtrl.MAX_VORESOURCES)); String query = Network.buildQuery(GET_IVOID_RESOURCES_URL, parameters); + System.out.println(query); try { ivoidResources = parseIvoidResources(Network.readJson(query)); } catch (CantSendQueryException e) { diff --git a/src/test/java/eu/omp/irap/vespa/epntapclient/TestEpnTapFacade.java b/src/test/java/eu/omp/irap/vespa/epntapclient/TestEpnTapFacade.java index c3d32ec..be2d7a5 100644 --- a/src/test/java/eu/omp/irap/vespa/epntapclient/TestEpnTapFacade.java +++ b/src/test/java/eu/omp/irap/vespa/epntapclient/TestEpnTapFacade.java @@ -74,7 +74,7 @@ public class TestEpnTapFacade { + Debug.toJson(resources)); Map keywords = new HashMap<>(); - keywords.put("type", "CatalogService"); + keywords.put("shortName", "IKS"); List resources2 = facade.getEPNVOResources(keywords); System.out.println("2.2 getEPNVOResources(keywords)\n\t" + Debug.toJson(resources2)); -- libgit2 0.21.2