try {
String textToProcess = ServerUtils.getTextToProcess(text, inUrl);
Annotation a = getAnnotation(textToProcess, confidence, support, dbpediaTypes, sparqlQuery, policy, coreferenceResolution, spotter, disambiguatorName, clientIp);
LOG.info("JSON format");
String content = a.toJSON();
return ServerUtils.ok(content);
} catch (Exception e) {
throw new WebApplicationException(Response.status(Response.Status.BAD_REQUEST). entity(e.getMessage()).type(MediaType.APPLICATION_JSON).build());
}
}