+ private CommonSearchSuggestion createCommonSearchSuggestion(ObjectMapper mapper, JsonNode entityNode, String responseText) throws IOException {
+ // do the point transformation as we build the response?
+ CommonSearchSuggestion responseSuggestion = new CommonSearchSuggestion();
+ responseSuggestion.setRoute(vnfSearchSuggestionRoute);
+ responseSuggestion.setText(responseText);
+ responseSuggestion.setHashId(NodeUtils.generateUniqueShaDigest(responseText));
+
+ JsonNode keyDocument = entityNode.get(KEY_DOCUMENT);
+ JsonNode sourceNode = keyDocument.get(KEY_CONTENT);
+ if (sourceNode.has(KEY_FILTER_LIST)) {
+ ArrayNode filtersArray = (ArrayNode) sourceNode.get(KEY_FILTER_LIST);
+ for (int i = 0; i < filtersArray.size(); i++) {
+ String filterValueString = filtersArray.get(i).toString();
+ UiFilterValueEntity filterValue =
+ mapper.readValue(filterValueString, UiFilterValueEntity.class);
+ responseSuggestion.getFilterValues().add(filterValue);
+ }
+ }
+ return responseSuggestion;
+ }
+