...
String getNotation ="";
ObjectNode json = (ObjectNode) JacksonUtils.parseJson(results);
//Format should be: { ..."results":["uri":uri...]
if (json.has("results")) {
ArrayNode jsonArray = (ArrayNode) json.get("results");
int numberResults = jsonArray.size();
int i;
for(i = 0; i < numberResults; i++) {
ObjectNode jsonObject = (ObjectNode) jsonArray.get(i);
if(jsonObject.has("notation")) {
System.out.println(jsonObject.get("notation").asText());
getNotation = jsonObject.get("notation").asText();
}
}
}
return getNotation;
}
}
Adjusting the file ConceptSearchService.
...
java
This file containes all of the vocabularies services defined: //vivo22/tib/app/vivo/src/vivo-tib/VIVO/api/src/main/java/edu/cornell/mannlib/vitro/webapp/utils/ConceptSearchService .
In order to add a new service, the file has to be adjusted as follows:
...