コード例 #1
0
ファイル: JaxbController.java プロジェクト: romanm/tcmoped14
 private TaskRegimex regimeTaskx(Tree taskT) {
   TaskRegimex taskx = new TaskRegimex(taskT);
   for (Tree t1 : taskT.getChildTs())
     if (t1.isDrug()) {
       // taskx.getTaskOne().add(regimeDrugx(t1));
       taskx.getDrug().add(regimeDrugx(t1));
     } else if (t1.isTask()) {
       taskx.getTask().add(regimeTaskx(t1));
     } else if (t1.isLabor()) {
       taskx.getLabor().add(regimeLaborx(t1));
     }
   return taskx;
 }
コード例 #2
0
ファイル: JaxbController.java プロジェクト: romanm/tcmoped14
 @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;
 }