Changeset 364 for ether_ndacc/trunk/web/src/com/ether/Controller.java
- Timestamp:
- 01/27/12 13:58:53 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ether_ndacc/trunk/web/src/com/ether/Controller.java
r232 r364 47 47 } 48 48 49 @ControllerMethod(view = VIEW_DATA_OPAR) 50 public Map<String, Object> viewDataOpar() 51 throws WebException 52 { 53 return new HashMap<String, Object>(); 54 } 55 56 @ControllerMethod(view = VIEW_DATA_DDU) 57 public Map<String, Object> viewDataDdu() 58 throws WebException 59 { 60 return new HashMap<String, Object>(); 61 } 62 63 @ControllerMethod(view = VIEW_DATA_OMP) 64 public Map<String, Object> viewDataOmp() 65 throws WebException 66 { 67 return new HashMap<String, Object>(); 68 } 69 70 @ControllerMethod(view = VIEW_DATA_VDA) 71 public Map<String, Object> viewDataVda() 72 throws WebException 73 { 74 return new HashMap<String, Object>(); 75 } 76 77 @ControllerMethod(view = VIEW_DATA_BRI) 78 public Map<String, Object> viewDataBri() 79 throws WebException 80 { 81 return new HashMap<String, Object>(); 82 } 83 84 @ControllerMethod(view = VIEW_DATA_SCO) 85 public Map<String, Object> viewDataSco() 86 throws WebException 87 { 88 return new HashMap<String, Object>(); 89 } 90 91 @ControllerMethod(view = VIEW_DATA_AND) 92 public Map<String, Object> viewDataAnd() 93 throws WebException 94 { 95 return new HashMap<String, Object>(); 96 } 97 98 @ControllerMethod(view = VIEW_DATA_SOD) 99 public Map<String, Object> viewDataSod() 100 throws WebException 101 { 102 return new HashMap<String, Object>(); 103 } 104 105 @ControllerMethod(view = VIEW_DATA_ZHI) 106 public Map<String, Object> viewDataZhi() 107 throws WebException 108 { 109 return new HashMap<String, Object>(); 110 } 111 112 @ControllerMethod(view = VIEW_DATA_SAL) 113 public Map<String, Object> viewDataSal() 114 throws WebException 115 { 116 return new HashMap<String, Object>(); 117 } 118 119 @ControllerMethod(view = VIEW_DATA_BOR) 120 public Map<String, Object> viewDataBor() 121 throws WebException 122 { 123 return new HashMap<String, Object>(); 124 } 125 126 @ControllerMethod(view = VIEW_DATA_TAR) 127 public Map<String, Object> viewDataTar() 128 throws WebException 129 { 130 return new HashMap<String, Object>(); 131 } 132 133 @ControllerMethod(view = VIEW_DATA_BAU) 134 public Map<String, Object> viewDataBau() 135 throws WebException 136 { 137 return new HashMap<String, Object>(); 138 } 139 140 @ControllerMethod(view = VIEW_DATA_KER) 141 public Map<String, Object> viewDataKer() 142 throws WebException 143 { 144 return new HashMap<String, Object>(); 145 } 146 147 @ControllerMethod(view = VIEW_DATA_RIO) 148 public Map<String, Object> viewDataRio() 149 throws WebException 150 { 151 return new HashMap<String, Object>(); 152 } 153 154 @ControllerMethod(view = VIEW_DATA_CON) 155 public Map<String, Object> viewDataCon() 156 throws WebException 157 { 158 return new HashMap<String, Object>(); 159 } 160 161 @ControllerMethod(view = VIEW_BIBLIO) 162 public Map<String, Object> viewBiblio() 163 throws WebException 164 { 165 return new HashMap<String, Object>(); 166 } 167 168 169 @ControllerMethod(view = VIEW_INTRA) 170 public Map<String, Object> viewIntra() 171 throws WebException 172 { 173 return new HashMap<String, Object>(); 174 } 175 49 176 @ControllerMethod(view = VIEW_ABOUT) 50 177 public Map<String, Object> viewAbout() … … 129 256 } 130 257 131 public ModelAndView selectLidarO3s( final HttpServletRequest request, final HttpServletResponse response ) 132 throws WebException 133 { 134 try 135 { 136 String dateinf = request.getParameter( "dateinf" ); 258 @ControllerMethod(view = VIEW_LIDAR_O3S) 259 public Map<String, Object> selectLidarO3s( @ParamName("dateinf") final String dateinf, 260 @ParamName("station") String station, 261 @ParamName("instrument") final String instrument ) 262 throws WebException 263 264 /*public ModelAndView selectLidarO3s( final HttpServletRequest request, final HttpServletResponse response ) 265 throws WebException*/ 266 { 267 try 268 { 269 /*String dateinf = request.getParameter( "dateinf" ); 137 270 String station = request.getParameter( "station" ); 138 271 139 final String instrument = request.getParameter( "instrument" ); 272 final String instrument = request.getParameter( "instrument" );*/ 140 273 141 274 List<String> plotsList = _plotService.getPlotsByDateByInstrumentByStation( instrument, dateinf, "yyyyMMdd", station ); … … 169 302 { 170 303 rep = "./resources/visu/ddu/lidar/o3_strato"; 171 station = "DDU ";304 station = "DDUModelAndView"; 172 305 if( year.compareTo( "1970" ) == 0 ) 173 306 { … … 178 311 } 179 312 180 final M odelAndView modelAndView = new ModelAndView( VIEW_LIDAR_O3S);313 final Map<String, Object> modelAndView = new HashMap<String, Object>(); 181 314 //plotsList=null; 182 modelAndView. addObject( "plotsList", plotsList );183 184 modelAndView. addObject( "listeDates", listeDates );185 modelAndView. addObject( "firstDate", dateinf );186 187 188 modelAndView. addObject( "month", month );189 modelAndView. addObject( "year", year );190 modelAndView. addObject( "station", station );191 modelAndView. addObject( "rep", rep );315 modelAndView.put( "plotsList", plotsList ); 316 317 modelAndView.put( "listeDates", listeDates ); 318 modelAndView.put( "firstDate", dateinf ); 319 320 321 modelAndView.put( "month", month ); 322 modelAndView.put( "year", year ); 323 modelAndView.put( "station", station ); 324 modelAndView.put( "rep", rep ); 192 325 193 326 return modelAndView; … … 200 333 } 201 334 202 public ModelAndView selectLidarO3t( final HttpServletRequest request, final HttpServletResponse response ) 203 throws WebException 204 { 205 try 206 { 207 String dateinf = request.getParameter( "dateinf" ); 208 String station = request.getParameter( "station" ); 209 210 final String instrument = request.getParameter( "instrument" ); 335 @ControllerMethod(view = VIEW_LIDAR_O3T) 336 public Map<String, Object> selectLidarO3t( @ParamName("dateinf") String dateinf, 337 @ParamName("station") String station, 338 @ParamName("instrument") final String instrument ) 339 throws WebException 340 { 341 try 342 { 211 343 212 344 List<String> plotsList = _plotService.getPlotsByDateByInstrumentByStation( instrument, dateinf, "yyyyMMdd", station ); … … 244 376 } 245 377 246 247 final ModelAndView modelAndView = new ModelAndView( VIEW_LIDAR_O3T ); 378 final Map<String, Object> mView = new HashMap<String, Object>(); 248 379 //plotsList=null; 249 m odelAndView.addObject( "plotsList", plotsList );250 251 m odelAndView.addObject( "listeDates", listeDates );252 m odelAndView.addObject( "firstDate", dateinf );380 mView.put( "plotsList", plotsList ); 381 382 mView.put( "listeDates", listeDates ); 383 mView.put( "firstDate", dateinf ); 253 384 254 385 //String month = dateinf.substring(4,6); 255 modelAndView.addObject( "month", month ); 256 modelAndView.addObject( "year", year ); 257 modelAndView.addObject( "station", station ); 258 modelAndView.addObject( "rep", rep ); 259 260 return modelAndView; 261 262 } 263 catch( ServiceException e ) 264 { 265 throw new WebException( WebException.WebCode.SERVICE_PROBLEM, e ); 266 } 267 } 268 269 public ModelAndView selectLidarTemp( final HttpServletRequest request, final HttpServletResponse response ) 270 throws WebException 271 { 272 try 273 { 274 String dateinf = request.getParameter( "dateinf" ); 275 String station = request.getParameter( "station" ); 276 277 final String instrument = request.getParameter( "instrument" ); 386 mView.put( "month", month ); 387 mView.put( "year", year ); 388 mView.put( "station", station ); 389 mView.put( "rep", rep ); 390 391 return mView; 392 393 } 394 catch( ServiceException e ) 395 { 396 throw new WebException( WebException.WebCode.SERVICE_PROBLEM, e ); 397 } 398 } 399 400 @ControllerMethod(view = VIEW_UMK) 401 public Map<String, Object> selectUmk( @ParamName("dateinf") String dateinf, 402 @ParamName("station") String station, 403 @ParamName("instrument") final String instrument ) 404 throws WebException 405 { 406 try 407 { 408 409 List<String> plotsList = _plotService.getPlotsByDateByInstrumentByStation( instrument, dateinf, "yyyyMMdd", station ); 410 411 //dateinf="02021980"; 412 //List<String> ListDates = _plotService.getLastDate(instrument); 413 final List<String> listeDates = _serviceTools.getListeDates(); 414 String rep = ""; 415 String year = dateinf.substring( 0, 4 ); 416 String month = dateinf.substring( 4, 6 ); 417 418 rep = "./resources/visu/ohp/umk"; 419 station = "OHP"; 420 if( year.compareTo( "1970" ) == 0 ) 421 { 422 year = "1983"; 423 month = "09"; 424 dateinf = year + month + "03"; 425 } 426 427 428 final Map<String, Object> mView = new HashMap<String, Object>(); 429 //plotsList=null; 430 mView.put( "plotsList", plotsList ); 431 432 mView.put( "listeDates", listeDates ); 433 mView.put( "firstDate", dateinf ); 434 435 //String month = dateinf.substring(4,6); 436 mView.put( "month", month ); 437 mView.put( "year", year ); 438 mView.put( "station", station ); 439 mView.put( "rep", rep ); 440 441 return mView; 442 443 } 444 catch( ServiceException e ) 445 { 446 throw new WebException( WebException.WebCode.SERVICE_PROBLEM, e ); 447 } 448 } 449 450 @ControllerMethod(view = VIEW_LIDAR_TEMP) 451 public Map<String, Object> selectLidarTemp( @ParamName("dateinf") String dateinf, 452 @ParamName("station") String station, 453 @ParamName("instrument") final String instrument ) 454 throws WebException 455 { 456 try 457 { 278 458 279 459 List<String> plotsList = _plotService.getPlotsByDateByInstrumentByStation( instrument, dateinf, "yyyyMMdd", station ); … … 308 488 } 309 489 310 final ModelAndView modelAndView = new ModelAndView( VIEW_LIDAR_TEMP ); 311 //plotsList=null; 312 modelAndView.addObject( "plotsList", plotsList ); 313 314 modelAndView.addObject( "listeDates", listeDates ); 315 modelAndView.addObject( "firstDate", dateinf ); 316 317 //String month = dateinf.substring(4,6); 318 modelAndView.addObject( "month", month ); 319 modelAndView.addObject( "year", year ); 320 modelAndView.addObject( "station", station ); 321 modelAndView.addObject( "rep", rep ); 322 323 return modelAndView; 324 325 } 326 catch( ServiceException e ) 327 { 328 throw new WebException( WebException.WebCode.SERVICE_PROBLEM, e ); 329 } 330 } 331 332 333 public ModelAndView selectLidarAerosols( final HttpServletRequest request, final HttpServletResponse response ) 334 throws WebException 335 { 336 try 337 { 338 String dateinf = request.getParameter( "dateinf" ); 339 String station = request.getParameter( "station" ); 340 341 final String instrument = request.getParameter( "instrument" ); 490 final Map<String, Object> mView = new HashMap<String, Object>(); 491 492 mView.put( "plotsList", plotsList ); 493 494 mView.put( "listeDates", listeDates ); 495 mView.put( "firstDate", dateinf ); 496 497 498 mView.put( "month", month ); 499 mView.put( "year", year ); 500 mView.put( "station", station ); 501 mView.put( "rep", rep ); 502 503 return mView; 504 505 } 506 catch( ServiceException e ) 507 { 508 throw new WebException( WebException.WebCode.SERVICE_PROBLEM, e ); 509 } 510 } 511 512 @ControllerMethod(view = VIEW_LIDAR_AEROSOLS) 513 public Map<String, Object> selectLidarAerosols( @ParamName("dateinf") String dateinf, 514 @ParamName("station") String station, 515 @ParamName("instrument") final String instrument ) 516 throws WebException 517 { 518 try 519 { 342 520 343 521 List<String> plotsList = _plotService.getPlotsByDateByInstrumentByStation( instrument, dateinf, "yyyyMMdd", station ); … … 372 550 } 373 551 374 final M odelAndView modelAndView = new ModelAndView( VIEW_LIDAR_AEROSOLS);552 final Map<String, Object> mView = new HashMap<String, Object>(); 375 553 //plotsList=null; 376 m odelAndView.addObject( "plotsList", plotsList );377 378 m odelAndView.addObject( "listeDates", listeDates );379 m odelAndView.addObject( "firstDate", dateinf );554 mView.put( "plotsList", plotsList ); 555 556 mView.put( "listeDates", listeDates ); 557 mView.put( "firstDate", dateinf ); 380 558 381 559 //String month = dateinf.substring(4,6); 382 modelAndView.addObject( "month", month ); 383 modelAndView.addObject( "year", year ); 384 modelAndView.addObject( "station", station ); 385 modelAndView.addObject( "rep", rep ); 386 387 return modelAndView; 388 389 } 390 catch( ServiceException e ) 391 { 392 throw new WebException( WebException.WebCode.SERVICE_PROBLEM, e ); 393 } 394 } 395 396 public ModelAndView viewSpectroUV( final HttpServletRequest request, final HttpServletResponse response ) 397 throws WebException 398 { 399 try 400 { 401 String dateinf = request.getParameter( "dateinf" ); 402 //List<String> m = new ArrayList<String>(12); 560 mView.put( "month", month ); 561 mView.put( "year", year ); 562 mView.put( "station", station ); 563 mView.put( "rep", rep ); 564 565 return mView; 566 567 } 568 catch( ServiceException e ) 569 { 570 throw new WebException( WebException.WebCode.SERVICE_PROBLEM, e ); 571 } 572 } 573 574 @ControllerMethod(view =VIEW_SPECTRO_UV) 575 public Map<String, Object> viewSpectroUV( @ParamName("dateinf") String dateinf, 576 @ParamName("especes") String especes, 577 @ParamName("instrument") final String instrument 578 ) 579 throws WebException 580 { 581 try 582 { 403 583 404 584 String m[]; … … 406 586 String fname, iname, year; 407 587 408 final String instrument = request.getParameter( "instrument" );409 String especes = request.getParameter( "especes" );410 411 588 if( especes.equals( "nan" ) ) 412 589 { … … 424 601 final List<String> listeDates = _serviceTools.getListeDates(); 425 602 426 final ModelAndView modelAndView = new ModelAndView( VIEW_SPECTRO_UV ); 427 modelAndView.addObject( "plotsList", plotsList ); 428 429 modelAndView.addObject( "listeDates", listeDates ); 430 modelAndView.addObject( "firstDate", dateinf ); 431 modelAndView.addObject( "especes", especes ); 603 final Map<String, Object> mView = new HashMap<String, Object>(); 604 605 mView.put( "plotsList", plotsList ); 606 607 mView.put( "listeDates", listeDates ); 608 mView.put( "firstDate", dateinf ); 609 mView.put( "especes", especes ); 432 610 year = dateinf.substring( 0, 4 ); 433 611 434 m odelAndView.addObject("year", year );435 m odelAndView.addObject("m", m );612 mView.put( "year", year ); 613 mView.put( "m", m ); 436 614 437 615 fname = "vasp_"; … … 488 666 else m[11] = "no"; 489 667 490 return m odelAndView;668 return mView; 491 669 492 670 } … … 567 745 private static final String VIEW_LIDAR_O3S = "visus_lidar_o3s"; 568 746 private static final String VIEW_LIDAR_O3T = "visus_lidar_o3t"; 747 private static final String VIEW_UMK = "visus_umk"; 569 748 private static final String VIEW_ECC = "visus_ecc"; 570 749 private static final String VIEW_SPECTRO_UV = "visus_spectro"; … … 573 752 private static final String VIEW_DATA_OHP = "data_ohp"; 574 753 private static final String VIEW_ABOUT = "about"; 754 private static final String VIEW_DATA_OPAR = "data_opar"; 755 private static final String VIEW_DATA_DDU = "data_ddu"; 756 private static final String VIEW_DATA_OMP = "data_lannemezan"; 757 private static final String VIEW_DATA_VDA = "data_villeneuve"; 758 private static final String VIEW_DATA_BRI = "data_briancon"; 759 private static final String VIEW_DATA_SCO = "data_scorebysund"; 760 private static final String VIEW_DATA_AND = "data_andoya"; 761 private static final String VIEW_DATA_SOD = "data_sodankyla"; 762 private static final String VIEW_DATA_ZHI = "data_zhigansk"; 763 private static final String VIEW_DATA_SAL = "data_salekhard"; 764 private static final String VIEW_DATA_BOR = "data_bordeaux"; 765 private static final String VIEW_DATA_TAR = "data_tarawa"; 766 private static final String VIEW_DATA_BAU = "data_bauru"; 767 private static final String VIEW_DATA_KER = "data_kerguelen"; 768 private static final String VIEW_DATA_RIO = "data_riogallegos"; 769 private static final String VIEW_DATA_CON = "data_concordia"; 770 private static final String VIEW_BIBLIO = "biblio"; 771 private static final String VIEW_INTRA = "community"; 772 575 773 576 774 //services que le controller peut utiliser
Note: See TracChangeset
for help on using the changeset viewer.