21 JSONObject outObject =
new JSONObject();
22 outObject.put(
"title",
"Labeling System API Version 1.0");
23 outObject.put(
"version",
"1.0");
24 outObject.put(
"info", ConfigProperties.getPropertyParam(
"api") +
"/v1/info");
26 File file =
new File(InfoResource.class.getClassLoader().getResource(
"configLabelingLink.properties").getFile());
27 SimpleDateFormat sdf =
new SimpleDateFormat(
"dd/MM/yyyy HH:mm:ss");
28 outObject.put(
"last build", sdf.format(file.lastModified()));
29 return Response.ok(outObject).header(
"Content-Type",
"application/json;charset=UTF-8").build();
31 return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(Logging.getMessageJSON(e,
"v1.rest.RestResource"))
32 .header(
"Content-Type",
"application/json;charset=UTF-8").build();