Exemplo n.º 1
0
 @RequestMapping(value = "/xml={htmlId}", method = RequestMethod.GET, produces = "application/xml")
 public @ResponseBody Treex xml(@PathVariable String htmlId, Model model) {
   log.debug(1);
   Integer id = mopetService.getIdFromHtmlId(htmlId);
   log.debug(id);
   Tree t0 = mopetService.readNodes4(id, model);
   Treex mtlX = null;
   if (t0.isTask()) {
     mtlX = regimeTaskx(t0);
   } else if (t0.isDrug()) {
     mtlX = regimeDrugx(t0);
   } else if (t0.isPatient()) {
     mtlX = regimePatientx(t0);
   } else if (t0.isDose()) {
     mtlX = new Dosex(t0);
   } else if (t0.isDay()) {
     mtlX = regimeDrugDay(t0);
   } else if (t0.isTimes()) {
     mtlX = new Timesx(t0);
   } else {
     log.info("TODO!");
   }
   return mtlX;
 }