source: ether_ndacc/trunk/web/src/com/ether/Controller.java @ 405

Last change on this file since 405 was 405, checked in by rboipsl, 12 years ago

ajout realtime ecc ohp

File size: 28.4 KB
Line 
1package com.ether;
2
3import com.ether.annotation.ControllerMethod;
4import com.ether.annotation.ParamName;
5import com.ether.instrument.Instrument;
6import com.ether.station.Station;
7import org.apache.commons.logging.Log;
8import org.apache.commons.logging.LogFactory;
9import org.springframework.beans.factory.annotation.Required;
10import org.springframework.web.servlet.ModelAndView;
11
12import javax.servlet.http.HttpServletRequest;
13import javax.servlet.http.HttpServletResponse;
14import java.util.HashMap;
15import java.util.List;
16import java.util.Map;
17
18/**
19 * @author vmipsl
20 * @date 17 feb 2011
21 */
22public class Controller
23        extends ControllerEther
24{
25    /** *********************************************************** **/
26    /** *********************** VIEWS ***************************** **/
27    /** *********************************************************** **/
28
29    /**
30     * Default view if url's methodName is unknown
31     *
32     * @return
33     * @throws WebException
34     */
35    @ControllerMethod(view = VIEW_INIT)
36    public Map<String, Object> home()
37            throws WebException
38    {
39        return new HashMap<String, Object>();
40    }
41
42    @ControllerMethod(view = VIEW_DATA_OHP)
43    public Map<String, Object> viewDataOhp()
44            throws WebException
45    {
46        return new HashMap<String, Object>();
47    }
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
176    @ControllerMethod(view = VIEW_ABOUT)
177    public Map<String, Object> viewAbout()
178            throws WebException
179    {
180        return new HashMap<String, Object>();
181    }
182
183    @ControllerMethod(view = VIEW_ECC)
184    public Map<String, Object> selectEcc( @ParamName("dateinf") final String dateinf,
185                                          @ParamName("station") String station,
186                                          @ParamName("instrument") final String instrument )
187            throws WebException
188    {
189        try
190        {
191            final List<String> plotsList = _plotService.getPlotsByDateByInstrumentByStation( instrument, dateinf, "yyyyMMdd", station );
192
193            //dateinf="02021980";
194            //List<String> ListDates = _plotService.getLastDate(instrument);
195            final List<String> listeDates = _serviceTools.getListeDates();
196            String rep = "";
197            String year = dateinf.substring( 0, 4 );
198
199            if( station.compareTo( "OHP" ) == 0 || station.compareTo( "ohp" ) == 0 )
200            {
201                rep = "./resources/visu/ohp/ecc";
202                station = "OHP";
203                if( year.compareTo( "1970" ) == 0 ) year = "2007";
204            }
205            else if( station.compareTo( "LA REUNION" ) == 0 || station.compareTo( "reunion" ) == 0 )
206            {
207                rep = "./resources/visu/reu/ecc";
208                //rep="./resources/visu/ohp/lidar/o3_strato";
209                station = "LA REUNION";
210                if( year.compareTo( "1970" ) == 0 ) year = "2006";
211                //year="2006";
212            }
213            else if( station.compareTo( "DDU" ) == 0 || station.compareTo( "ddu" ) == 0 )
214            {
215                rep = "./resources/visu/ddu/ecc";
216                //rep="./resources/visu/ohp/lidar/o3_strato";
217                station = "DDU";
218                if( year.compareTo( "1970" ) == 0 ) year = "1991";
219                //year="2006";
220            }
221
222            final Map<String, Object> model = new HashMap<String, Object>();
223            model.put( "plotsList", plotsList );
224            model.put( "listeDates", listeDates );
225            model.put( "firstDate", dateinf );
226            final String month = dateinf.substring( 4, 6 );
227            model.put( "month", month );
228            model.put( "year", year );
229            model.put( "station", station );
230            model.put( "rep", rep );
231            return model;
232        }
233        catch( ServiceException e )
234        {
235            throw new WebException( WebException.WebCode.SERVICE_PROBLEM, e );
236        }
237    }
238
239    @ControllerMethod(view = VIEW_ECC_RT)
240        public Map<String, Object> selectEccRT( @ParamName("dateinf") final String dateinf,
241                                              @ParamName("station") String station,
242                                              @ParamName("instrument") final String instrument,
243                                              @ParamName("type") final String type )
244                throws WebException
245        {
246            try
247            {
248
249                final List<String> plotsList = _plotService.getPlotsByDateByInstrumentByStationByType( instrument, dateinf, "yyyyMMdd", station, type );
250
251                //dateinf="02021980";
252                //List<String> ListDates = _plotService.getLastDate(instrument);
253                final List<String> listeDates = _serviceTools.getListeDates();
254                String rep = "";
255                String year = dateinf.substring( 0, 4 );
256
257                if( station.compareTo( "OHP" ) == 0 || station.compareTo( "ohp" ) == 0 )
258                {
259                    rep = "./resources/visu/ohp/ecc";
260                    station = "OHP";
261                    if( year.compareTo( "1970" ) == 0 ) year = "2012";
262                }
263                else if( station.compareTo( "LA REUNION" ) == 0 || station.compareTo( "reunion" ) == 0 )
264                {
265                    rep = "./resources/visu/reu/ecc";
266                    //rep="./resources/visu/ohp/lidar/o3_strato";
267                    station = "LA REUNION";
268                    if( year.compareTo( "1970" ) == 0 ) year = "2006";
269                    //year="2006";
270                }
271                else if( station.compareTo( "DDU" ) == 0 || station.compareTo( "ddu" ) == 0 )
272                {
273                    rep = "./resources/visu/ddu/ecc";
274                    //rep="./resources/visu/ohp/lidar/o3_strato";
275                    station = "DDU";
276                    if( year.compareTo( "1970" ) == 0 ) year = "1991";
277                    //year="2006";
278                }
279
280                final Map<String, Object> model = new HashMap<String, Object>();
281                model.put( "plotsList", plotsList );
282                model.put( "listeDates", listeDates );
283                model.put( "firstDate", dateinf );
284                final String month = dateinf.substring( 4, 6 );
285                model.put( "month", month );
286                model.put( "year", year );
287                model.put( "station", station );
288                model.put( "rep", rep );
289                return model;
290            }
291            catch( ServiceException e )
292            {
293                throw new WebException( WebException.WebCode.SERVICE_PROBLEM, e );
294            }
295        }
296
297    public ModelAndView viewLidarO3s( final HttpServletRequest request, final HttpServletResponse response )
298            throws WebException
299    {
300        try
301        {
302            final List<String> listeDates = _serviceTools.getListeDates();
303
304            final ModelAndView modelAndView = new ModelAndView( VIEW_LIDAR_O3S );
305            modelAndView.addObject( "listeDates", listeDates );
306
307            return modelAndView;
308
309        }
310        catch( ServiceException e )
311        {
312            throw new WebException( WebException.WebCode.SERVICE_PROBLEM, e );
313        }
314    }
315
316     @ControllerMethod(view = VIEW_LIDAR_O3S)
317     public Map<String, Object> selectLidarO3s( @ParamName("dateinf") final String dateinf,
318                                          @ParamName("station") String station,
319                                          @ParamName("instrument") final String instrument )
320            throws WebException
321
322     /*public ModelAndView selectLidarO3s( final HttpServletRequest request, final HttpServletResponse response )
323            throws WebException*/
324    {
325        try
326        {
327            /*String dateinf = request.getParameter( "dateinf" );
328            String station = request.getParameter( "station" );
329
330            final String instrument = request.getParameter( "instrument" );*/
331
332            List<String> plotsList = _plotService.getPlotsByDateByInstrumentByStation( instrument, dateinf, "yyyyMMdd", station );
333
334            //dateinf="02021980";
335            //List<String> ListDates = _plotService.getLastDate(instrument);
336            final List<String> listeDates = _serviceTools.getListeDates();
337            String rep = "";
338            String year = dateinf.substring( 0, 4 );
339            String month = dateinf.substring( 4, 6 );
340
341            if( station.compareTo( "OHP" ) == 0 || station.compareTo( "ohp" ) == 0 )
342            {
343                rep = "./resources/visu/ohp/lidar/o3_strato";
344                station = "OHP";
345                if( year.compareTo( "1970" ) == 0 )
346                {
347
348                    year = "1991";
349                }
350            }
351            else if( station.compareTo( "REU" ) == 0 || station.compareTo( "reu" ) == 0 || station.compareTo( "LA REUNION" ) == 0 || station.compareTo( "REUNION" ) == 0 )
352            {
353                rep = "./resources/visu/reu/lidar/o3_strato";
354                station = "LA REUNION";
355                if( year.compareTo( "1970" ) == 0 ) year = "2006";
356                //year="2006";
357            }
358
359            else
360            {
361                rep = "./resources/visu/ddu/lidar/o3_strato";
362                station = "DDUModelAndView";
363                if( year.compareTo( "1970" ) == 0 )
364                {
365                    year = "1991";
366                    //month="04";
367                }
368                //year="2006";
369            }
370
371            final Map<String, Object> modelAndView = new HashMap<String, Object>();
372            //plotsList=null;
373            modelAndView.put( "plotsList", plotsList );
374
375            modelAndView.put( "listeDates", listeDates );
376            modelAndView.put( "firstDate", dateinf );
377
378
379            modelAndView.put( "month", month );
380            modelAndView.put( "year", year );
381            modelAndView.put( "station", station );
382            modelAndView.put( "rep", rep );
383
384            return modelAndView;
385
386        }
387        catch( ServiceException e )
388        {
389            throw new WebException( WebException.WebCode.SERVICE_PROBLEM, e );
390        }
391    }
392
393    @ControllerMethod(view = VIEW_LIDAR_O3T)
394    public Map<String, Object> selectLidarO3t( @ParamName("dateinf") String dateinf,
395                                          @ParamName("station") String station,
396                                          @ParamName("instrument") final String instrument )
397            throws WebException
398    {
399        try
400        {
401
402            List<String> plotsList = _plotService.getPlotsByDateByInstrumentByStation( instrument, dateinf, "yyyyMMdd", station );
403
404            //dateinf="02021980";
405            //List<String> ListDates = _plotService.getLastDate(instrument);
406            final List<String> listeDates = _serviceTools.getListeDates();
407            String rep = "";
408            String year = dateinf.substring( 0, 4 );
409            String month = dateinf.substring( 4, 6 );
410
411            if( station.compareTo( "OHP" ) == 0 || station.compareTo( "ohp" ) == 0 )
412            {
413                rep = "./resources/visu/ohp/lidar/o3_tropo";
414                station = "OHP";
415                if( year.compareTo( "1970" ) == 0 )
416                {
417                    year = "2007";
418                    month = "05";
419                    dateinf = year + month + "01";
420                }
421            }
422            //else if (station.compareTo("reunion")==0) {
423            else
424            {
425                rep = "./resources/visu/reu/lidar/o3_tropo";
426                //rep="./resources/visu/ohp/lidar/o3_strato";
427                station = "LA REUNION";
428                if( year.compareTo( "1970" ) == 0 )
429                {
430                    year = "2006";
431
432                }
433                //year="2006";
434            }
435
436            final Map<String, Object> mView = new HashMap<String, Object>();
437            //plotsList=null;
438            mView.put( "plotsList", plotsList );
439
440            mView.put( "listeDates", listeDates );
441            mView.put( "firstDate", dateinf );
442
443            //String month = dateinf.substring(4,6);
444            mView.put( "month", month );
445            mView.put( "year", year );
446            mView.put( "station", station );
447            mView.put( "rep", rep );
448
449            return mView;
450
451        }
452        catch( ServiceException e )
453        {
454            throw new WebException( WebException.WebCode.SERVICE_PROBLEM, e );
455        }
456    }
457
458    @ControllerMethod(view = VIEW_UMK)
459    public Map<String, Object> selectUmk( @ParamName("dateinf") String dateinf,
460                                          @ParamName("station") String station,
461                                          @ParamName("instrument") final String instrument )
462            throws WebException
463    {
464        try
465        {
466
467            List<String> plotsList = _plotService.getPlotsByDateByInstrumentByStation( instrument, dateinf, "yyyyMMdd", station );
468
469            //dateinf="02021980";
470            //List<String> ListDates = _plotService.getLastDate(instrument);
471            final List<String> listeDates = _serviceTools.getListeDates();
472            String rep = "";
473            String year = dateinf.substring( 0, 4 );
474            String month = dateinf.substring( 4, 6 );
475
476            rep = "./resources/visu/ohp/umk";
477            station = "OHP";
478            if( year.compareTo( "1970" ) == 0 )
479            {
480                year = "1983";
481                month = "09";
482                dateinf = year + month + "03";
483            }
484
485
486            final Map<String, Object> mView = new HashMap<String, Object>();
487            //plotsList=null;
488            mView.put( "plotsList", plotsList );
489
490            mView.put( "listeDates", listeDates );
491            mView.put( "firstDate", dateinf );
492
493            //String month = dateinf.substring(4,6);
494            mView.put( "month", month );
495            mView.put( "year", year );
496            mView.put( "station", station );
497            mView.put( "rep", rep );
498
499            return mView;
500
501        }
502        catch( ServiceException e )
503        {
504            throw new WebException( WebException.WebCode.SERVICE_PROBLEM, e );
505        }
506    }
507
508    @ControllerMethod(view = VIEW_LIDAR_TEMP)
509    public Map<String, Object> selectLidarTemp( @ParamName("dateinf") String dateinf,
510                                          @ParamName("station") String station,
511                                          @ParamName("instrument") final String instrument )
512            throws WebException
513    {
514        try
515        {
516
517            List<String> plotsList = _plotService.getPlotsByDateByInstrumentByStation( instrument, dateinf, "yyyyMMdd", station );
518
519            //dateinf="02021980";
520            //List<String> ListDates = _plotService.getLastDate(instrument);
521            final List<String> listeDates = _serviceTools.getListeDates();
522            String rep = "";
523            String year = dateinf.substring( 0, 4 );
524            String month = dateinf.substring( 4, 6 );
525
526            if( station.compareTo( "OHP" ) == 0 || station.compareTo( "ohp" ) == 0 )
527            {
528                rep = "./resources/visu/ohp/lidar/temp";
529                station = "OHP";
530                if( year.compareTo( "1970" ) == 0 )
531                {
532                    year = "2009";
533                    month = "01";
534                }
535            }
536
537            if( station.compareTo( "REU" ) == 0 || station.compareTo( "reu" ) == 0 )
538            {
539                rep = "./resources/visu/reu/lidar/temp";
540                station = "REU";
541                if( year.compareTo( "1970" ) == 0 )
542                {
543                    year = "1994";
544                    month = "05";
545                }
546            }
547
548            final Map<String, Object> mView = new HashMap<String, Object>();
549
550            mView.put( "plotsList", plotsList );
551
552            mView.put( "listeDates", listeDates );
553            mView.put( "firstDate", dateinf );
554
555
556            mView.put( "month", month );
557            mView.put( "year", year );
558            mView.put( "station", station );
559            mView.put( "rep", rep );
560
561            return mView;
562
563        }
564        catch( ServiceException e )
565        {
566            throw new WebException( WebException.WebCode.SERVICE_PROBLEM, e );
567        }
568    }
569
570    @ControllerMethod(view = VIEW_LIDAR_AEROSOLS)
571    public Map<String, Object> selectLidarAerosols( @ParamName("dateinf") String dateinf,
572                                          @ParamName("station") String station,
573                                          @ParamName("instrument") final String instrument )
574            throws WebException
575    {
576        try
577        {
578
579            List<String> plotsList = _plotService.getPlotsByDateByInstrumentByStation( instrument, dateinf, "yyyyMMdd", station );
580
581            //dateinf="02021980";
582            //List<String> ListDates = _plotService.getLastDate(instrument);
583            final List<String> listeDates = _serviceTools.getListeDates();
584            String rep = "";
585            String year = dateinf.substring( 0, 4 );
586            String month = dateinf.substring( 4, 6 );
587
588            if( station.compareTo( "OHP" ) == 0 || station.compareTo( "ohp" ) == 0 )
589            {
590                rep = "./resources/visu/ohp/lidar/aerosols";
591                station = "OHP";
592                if( year.compareTo( "1970" ) == 0 )
593                {
594                    year = "2009";
595                    month = "01";
596                }
597            }
598
599            if( station.compareTo( "DDU" ) == 0 || station.compareTo( "ddu" ) == 0 )
600            {
601                rep = "./resources/visu/ddu/lidar/aerosols";
602                station = "DDU";
603                if( year.compareTo( "1970" ) == 0 )
604                {
605                    year = "2010";
606                    month = "11";
607                }
608            }
609
610            final Map<String, Object> mView = new HashMap<String, Object>();
611            //plotsList=null;
612            mView.put( "plotsList", plotsList );
613
614            mView.put( "listeDates", listeDates );
615            mView.put( "firstDate", dateinf );
616
617            //String month = dateinf.substring(4,6);
618            mView.put( "month", month );
619            mView.put( "year", year );
620            mView.put( "station", station );
621            mView.put( "rep", rep );
622
623            return mView;
624
625        }
626        catch( ServiceException e )
627        {
628            throw new WebException( WebException.WebCode.SERVICE_PROBLEM, e );
629        }
630    }
631
632    @ControllerMethod(view =VIEW_SPECTRO_UV)
633    public Map<String, Object> viewSpectroUV(  @ParamName("dateinf") String dateinf,
634                                          @ParamName("especes") String especes,
635                                          @ParamName("instrument") final String instrument
636    )
637            throws WebException
638    {
639        try
640        {
641
642            String m[];
643            m = new String[12];
644            String fname, iname, year;
645
646            if( especes.equals( "nan" ) )
647            {
648                especes = "uvauvb";
649            }
650
651            if( dateinf.equals( "nan" ) )
652            {
653                year = "2008";
654                dateinf = "2008";
655
656            }
657
658            List<String> plotsList = _plotService.getPlotsByDateByInstrument( instrument, dateinf, "yyyy" );
659            final List<String> listeDates = _serviceTools.getListeDates();
660
661            final Map<String, Object> mView = new HashMap<String, Object>();
662
663            mView.put( "plotsList", plotsList );
664
665            mView.put(  "listeDates", listeDates );
666            mView.put(  "firstDate", dateinf );
667            mView.put(  "especes", especes );
668            year = dateinf.substring( 0, 4 );
669
670            mView.put(  "year", year );
671            mView.put(  "m", m );
672
673            fname = "vasp_";
674            fname = fname.concat( especes );
675            fname = fname.concat( "_" );
676            fname = fname.concat( year );
677
678            iname = fname.concat( "01_plot1.jpg" );
679            if( plotsList.contains( iname ) ) m[0] = iname;
680            else m[0] = "no";
681
682            iname = fname.concat( "02_plot1.jpg" );
683            if( plotsList.contains( iname ) ) m[1] = iname;
684            else m[1] = "no";
685
686            iname = fname.concat( "03_plot1.jpg" );
687            if( plotsList.contains( iname ) ) m[2] = iname;
688            else m[2] = "no";
689
690            iname = fname.concat( "04_plot1.jpg" );
691            if( plotsList.contains( iname ) ) m[3] = iname;
692            else m[3] = "no";
693
694            iname = fname.concat( "05_plot1.jpg" );
695            if( plotsList.contains( iname ) ) m[4] = iname;
696            else m[4] = "no";
697
698            iname = fname.concat( "06_plot1.jpg" );
699            if( plotsList.contains( iname ) ) m[5] = iname;
700            else m[5] = "no";
701
702            iname = fname.concat( "07_plot1.jpg" );
703            if( plotsList.contains( iname ) ) m[6] = iname;
704            else m[6] = "no";
705
706            iname = fname.concat( "08_plot1.jpg" );
707            if( plotsList.contains( iname ) ) m[7] = iname;
708            else m[7] = "no";
709
710            iname = fname.concat( "09_plot1.jpg" );
711            if( plotsList.contains( iname ) ) m[8] = iname;
712            else m[8] = "no";
713
714            iname = fname.concat( "10_plot1.jpg" );
715            if( plotsList.contains( iname ) ) m[9] = iname;
716            else m[9] = "no";
717
718            iname = fname.concat( "11_plot1.jpg" );
719            if( plotsList.contains( iname ) ) m[10] = iname;
720            else m[10] = "no";
721
722            iname = fname.concat( "12_plot1.jpg" );
723            if( plotsList.contains( iname ) ) m[11] = iname;
724            else m[11] = "no";
725
726            return mView;
727
728        }
729        catch( ServiceException e )
730        {
731            throw new WebException( WebException.WebCode.SERVICE_PROBLEM, e );
732        }
733    }
734
735
736    public ModelAndView viewInstruments( final HttpServletRequest request, final HttpServletResponse response )
737            throws WebException
738    {
739        try
740        {
741            final List<Instrument> instruments = _instrumentService.getAllInstruments();
742
743            final ModelAndView modelAndView = new ModelAndView( VIEW_INSTRUMENT );
744            modelAndView.addObject( "instruments", instruments );
745            return modelAndView;
746
747        }
748        catch( ServiceException e )
749        {
750            throw new WebException( WebException.WebCode.SERVICE_PROBLEM, e );
751        }
752    }
753
754    public ModelAndView viewStation( final HttpServletRequest request, final HttpServletResponse response )
755            throws WebException
756    {
757        try
758        {
759            final Long stationId = Long.valueOf( request.getParameter( "stationId" ) );
760            final Station station = _stationService.getStationById( stationId );
761
762            final ModelAndView modelAndView = new ModelAndView( VIEW_STATION );
763            modelAndView.addObject( "station", station );
764            return modelAndView;
765
766        }
767        catch( ServiceException e )
768        {
769            throw new WebException( WebException.WebCode.SERVICE_PROBLEM, e );
770        }
771    }
772
773    @Required
774    public void setStationService( final StationService stationService )
775    {
776        _stationService = stationService;
777    }
778
779    @Required
780    public void setInstrumentService( final InstrumentService instrumentService )
781    {
782        _instrumentService = instrumentService;
783    }
784
785    @Required
786    public void setServiceTools( final ServiceTools serviceTools )
787    {
788        _serviceTools = serviceTools;
789    }
790
791    @Required
792    public void setPlotService( final PlotService plotService )
793    {
794        _plotService = plotService;
795    }
796
797    private static final Log LOGGER = LogFactory.getLog( Controller.class );
798
799    private static final String VIEW_INIT = "init";
800
801    private static final String VIEW_INSTRUMENT = "instrument";
802    private static final String VIEW_STATION = "station";
803    private static final String VIEW_LIDAR_O3S = "visus_lidar_o3s";
804    private static final String VIEW_LIDAR_O3T = "visus_lidar_o3t";
805    private static final String VIEW_UMK = "visus_umk";
806    private static final String VIEW_ECC = "visus_ecc";
807    private static final String VIEW_ECC_RT = "visus_ecc_realtime";
808    private static final String VIEW_SPECTRO_UV = "visus_spectro";
809    private static final String VIEW_LIDAR_TEMP = "visus_lidar_temp";
810    private static final String VIEW_LIDAR_AEROSOLS = "visus_lidar_aerosols";
811    private static final String VIEW_DATA_OHP = "data_ohp";
812    private static final String VIEW_ABOUT = "about";
813    private static final String VIEW_DATA_OPAR = "data_opar";
814    private static final String VIEW_DATA_DDU = "data_ddu";
815    private static final String VIEW_DATA_OMP = "data_lannemezan";
816    private static final String VIEW_DATA_VDA = "data_villeneuve";
817    private static final String VIEW_DATA_BRI = "data_briancon";
818    private static final String VIEW_DATA_SCO = "data_scorebysund";
819    private static final String VIEW_DATA_AND = "data_andoya";
820    private static final String VIEW_DATA_SOD = "data_sodankyla";
821    private static final String VIEW_DATA_ZHI = "data_zhigansk";
822    private static final String VIEW_DATA_SAL = "data_salekhard";
823    private static final String VIEW_DATA_BOR = "data_bordeaux";
824    private static final String VIEW_DATA_TAR = "data_tarawa";
825    private static final String VIEW_DATA_BAU = "data_bauru";
826    private static final String VIEW_DATA_KER = "data_kerguelen";
827    private static final String VIEW_DATA_RIO = "data_riogallegos";
828    private static final String VIEW_DATA_CON = "data_concordia";
829    private static final String VIEW_BIBLIO = "biblio";
830    private static final String VIEW_INTRA = "community";
831
832
833    //services que le controller peut utiliser
834    private StationService _stationService;
835    private InstrumentService _instrumentService;
836    private ServiceTools _serviceTools;
837    private PlotService _plotService;
838}
Note: See TracBrowser for help on using the repository browser.