Ejemplo n.º 1
0
 @RequestMapping("/graphUserDataset")
 public String graphUserDataset(@RequestParam(value = "limit", required = false) Integer limit) {
   Map<String, Object> map = authorService.graphAlc();
   String json = "";
   ObjectMapper mapper = new ObjectMapper();
   try {
     // convert map to JSON string
     json = mapper.writeValueAsString(map);
   } catch (Exception e) {
     e.printStackTrace();
   }
   return json;
 }
Ejemplo n.º 2
0
 @RequestMapping("/graphTest")
 public String graphTest(@RequestParam(value = "limit", required = false) Integer limit) {
   Map<String, Object> map = paperService.graphAlc(limit == null ? 200 : limit);
   String json = "";
   ObjectMapper mapper = new ObjectMapper();
   try {
     // convert map to JSON string
     json = mapper.writeValueAsString(map);
   } catch (Exception e) {
     e.printStackTrace();
   }
   System.out.println("================================================");
   System.out.println(json);
   return json;
 }