comparison src/main/java/de/mpiwg/itgroup/annotations/restlet/AnnotatorGroups.java @ 75:25eb2e1df106

change logging to java.util.logging.
author casties
date Fri, 21 Mar 2014 13:32:41 +0100
parents 2b1e6df5e21a
children b406507a953d
comparison
equal deleted inserted replaced
74:e5ff09208c28 75:25eb2e1df106
62 * @param entity 62 * @param entity
63 * @return 63 * @return
64 */ 64 */
65 @Get("json") 65 @Get("json")
66 public Representation doGetJSON(Representation entity) { 66 public Representation doGetJSON(Representation entity) {
67 logger.debug("AnnotatorGroups doGetJSON!"); 67 logger.fine("AnnotatorGroups doGetJSON!");
68 setCorsHeaders(); 68 setCorsHeaders();
69 Form form = getRequest().getResourceRef().getQueryAsForm(); 69 Form form = getRequest().getResourceRef().getQueryAsForm();
70 String user = form.getFirstValue("user"); 70 String user = form.getFirstValue("user");
71 String uri = form.getFirstValue("uri"); 71 String uri = form.getFirstValue("uri");
72 if (uri == null || uri.isEmpty()) { 72 if (uri == null || uri.isEmpty()) {
96 result.put("total", results.length()); 96 result.put("total", results.length());
97 } catch (JSONException e) { 97 } catch (JSONException e) {
98 setStatus(Status.SERVER_ERROR_INTERNAL, "JSON Error"); 98 setStatus(Status.SERVER_ERROR_INTERNAL, "JSON Error");
99 return null; 99 return null;
100 } 100 }
101 logger.debug("sending:"); 101 logger.fine("sending:");
102 logger.debug(result); 102 logger.fine(result.toString());
103 return new JsonRepresentation(result); 103 return new JsonRepresentation(result);
104 104
105 } 105 }
106 } 106 }