if (isHTML()) {
if (isConsistent) {
log.debug("The input is consistent");
ResponseBuilder rb = Response.ok(
new Viewable("result",
new ReasoningPrettyResultResource(
context, info, "The input is consistent :)")
)
);
rb.header(HttpHeaders.CONTENT_TYPE, TEXT_HTML + "; charset=utf-8");
addCORSOrigin(context, rb, headers);
return rb.build();
/*return Response.ok(
new Viewable("result",
new ReasoningPrettyResultResource(
context, info,
"The input is consistent :)")),
TEXT_HTML).build();*/
} else {
log.debug("The input is not consistent");
ResponseBuilder rb = Response.status(Status.CONFLICT);
rb.header(HttpHeaders.CONTENT_TYPE, TEXT_HTML + "; charset=utf-8");
addCORSOrigin(context, rb, headers);
rb.entity(new Viewable("result", new ReasoningPrettyResultResource(context, info,
"The input is NOT consistent :(")));
return rb.build();
/*return Response
.status(Status.CONFLICT)