Пример #1
0
 private Drugx regimeDrugx(Tree drugT) {
   Drugx drugx = new Drugx(drugT);
   for (Tree t1 : drugT.getChildTs())
     if (t1.isDose()) {
       drugx.setDose(new Dosex(t1));
     } else if (t1.isApp()) {
       drugx.setApp(new Appx(t1));
     } else if (t1.isDay()) {
       drugx.getDay().add(regimeDrugDay(t1));
     }
   return drugx;
 }
Пример #2
0
 @RequestMapping(value = "/jaxb_drug", method = RequestMethod.POST)
 public @ResponseBody String readXml(@RequestBody Drugx drugXml) {
   log.debug(1);
   System.out.println("-------------------");
   System.out.println(drugXml);
   System.out.println(drugXml.getId());
   // System.out.println(drugXml.getDrug());
   // ArrayList<Dayx> day = drugXml.getDay();
   // for (Dayx dayx : day) {
   // System.out.println(dayx);
   // System.out.println(dayx.getAbs());
   // }
   // Dosex dose = drugXml.getDose();
   // System.out.println(dose);
   // System.out.println(dose.getId());
   // System.out.println(dose.getValue());
   // System.out.println(dose.getApp());
   return "Read from XML: " + drugXml;
 }