Commit 71d8a8eedb8acc261f2a990de57464de1cf249be

Authored by Nathanael Jourdane
1 parent 80e3b826
Exists in master

Implement the VOResources keywords filter.

src/main/java/eu/omp/irap/vespa/epntapclient/voresource/VOResourceCtrl.java
... ... @@ -91,13 +91,14 @@ public class VOResourceCtrl {
91 91  
92 92 StringJoiner keywordJoiner = new StringJoiner(" ");
93 93 for (Map.Entry<String, String> keyword : keywords.entrySet()) {
94   - keywordJoiner.add(keyword.getKey() + ":\"" + keyword.getValue() + "\"");
  94 + keywordJoiner.add(keyword.getKey().toLowerCase() + ":\"" + keyword.getValue() + "\"");
95 95 }
96 96  
97 97 Map<String, String> parameters = new HashMap();
98 98 parameters.put("keywords", keywordJoiner.toString());
99 99 parameters.put("max", String.valueOf(VOResourceCtrl.MAX_VORESOURCES));
100 100 String query = Network.buildQuery(GET_IVOID_RESOURCES_URL, parameters);
  101 + System.out.println(query);
101 102 try {
102 103 ivoidResources = parseIvoidResources(Network.readJson(query));
103 104 } catch (CantSendQueryException e) {
... ...
src/test/java/eu/omp/irap/vespa/epntapclient/TestEpnTapFacade.java
... ... @@ -74,7 +74,7 @@ public class TestEpnTapFacade {
74 74 + Debug.toJson(resources));
75 75  
76 76 Map<String, String> keywords = new HashMap<>();
77   - keywords.put("type", "CatalogService");
  77 + keywords.put("shortName", "IKS");
78 78 List<Resource> resources2 = facade.getEPNVOResources(keywords);
79 79 System.out.println("2.2 getEPNVOResources(keywords)\n\t"
80 80 + Debug.toJson(resources2));
... ...