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