1 | <%@ page import="fr.acri.norm.*" %> |
---|
2 | |
---|
3 | <%@ page import="java.io.*" %> |
---|
4 | <%@ page import="java.util.*" %> |
---|
5 | <%@ page import="java.lang.*" %> |
---|
6 | <% |
---|
7 | |
---|
8 | send_request req = new send_request(); |
---|
9 | |
---|
10 | /***************************DEFINITIONS************************************/ |
---|
11 | String graph_sel="", sel_tpl_name="", sel_exp_id="", sel_version="", sel_level="", sel_sublevel="", sel_format="", sel_tpl_id="", sel_tpl="", sql="", sql2=""; |
---|
12 | String file_par_abs="", file_unit_abs="", file_nature_abs="", file_type_abs="", sel_par_abs="", error_msg="", param0="", param="", varY=""; |
---|
13 | String selected="", svalue="", par_options_abs="", par_options_abs0="", exp_options="", par_options_ord="", unit_options_ord="", unit_options_abs=""; |
---|
14 | String sspar_options="", sel_par="", DSMinDate="", DSMaxDate="", lonmin="", lonmax="", latmin="", latmax="", sel_sspar_abs="", sel_unit_ord="", from=""; |
---|
15 | String file_par_ord="", file_sspar_ord="", file_unit_ord="", file_nature_ord="", sel_unit_abs="", display_type="", lang="en", sel_par_ord="", lance=""; |
---|
16 | String file_par_aux="", file_unit_aux="", file_nature_aux="", file_par_aux1="", file_unit_aux1="", file_nature_aux1="", file_trf_id="", file_par_orig=""; |
---|
17 | String file_unit_orig="", file_nature_orig="", DSMinDate_file="", DSMaxDate_file="", sel_sspar_ord="", ids="", trf_id="",cnv_id="", result=""; |
---|
18 | String TRANSFO="",AUX0transfo="",AUX1transfo="", more_varid="", ordonnee="", sspar_ordonnee="", auxiliary1="", auxiliary_nature1="", auxiliary_nature=""; |
---|
19 | String AUY0transfo="",AUY1transfo="",Xtransfo="",Ytransfo="", auxiliary="", origin="", origin_unit="",origin_nature="", nature_auxiliary="", nature_ord=""; |
---|
20 | String sel_mindate="",sel_maxdate="",sel_file="",files="",reader="",infofile="", tab_file_name="", nomfile="", nomvariable="",lib_param="",lib_tpl_id=""; |
---|
21 | String nomsubvariable="", src="", tab_paux="", varid="", auxstruct="", typeOrdonnee="",afficheTrace="",par_observation_height="", meta_type=""; |
---|
22 | String form_par_abs="",form_sspar_abs="",form_par_id="",userLevels="",levels="",form_legend="", form_par_ord="",lonmin_file="",lonmax_file="",latmin_file="",latmax_file="", colour_bar_title=""; |
---|
23 | String dot_plot_dot_style="0", dot_plot_colour_flag="1", dot_plot_dotcolour="0,0,0", dot_plot_dotsize="1", lib_meta_type="",email="", cemail="",modeTexte="",rightTexte=""; |
---|
24 | |
---|
25 | //parametres XML |
---|
26 | String id_session="",mode="", uniqueid="",private_data_flag="1", download_auth="0", flag_extrapolate_auth="1", densite="0", reader_param_varid=""; |
---|
27 | String _1d_interpolator_method="", _1d_spacing="",_1d_Nmax="",_1d_Nmin="",irreg_grid_method="",reg_grid_method="",_2d_xspacing="",_2d_yspacing=""; |
---|
28 | String _2d_NXmax="", _2d_NXmin="", _2d_NYmax="", _2d_NYmin="", flag_validity_mask="", observation_height="", map_projection="", hemisphere="", ftitle=""; |
---|
29 | String contour_display_mode="", contour_default_colour_flag="", contour_default_colour="", contour_default_linestyle="", contour_default_line_thickness=""; |
---|
30 | String sel_exp_public="", is_batch="0", is_private="0", login="",passu="",modei="none", droit="0",userid="",group="", continuer="0",onlydata="0"; |
---|
31 | String exp_alt_min="", exp_alt_max="", heightTexte="", pageMode="", chainePageMode="", name="", first_name="", contour_default_label_flag="0"; |
---|
32 | String val_min_bd="", val_max_bd="", unite_bd="", imported_colour_table="", idl_colour_table_id=""; |
---|
33 | String map_information_level="", map_filling="" ,map_axes_type="", grid_linestyle="", latitude_posting="", longitude_posting="", colour_bar_grid=""; |
---|
34 | String colour_bar_nb_value=""; |
---|
35 | |
---|
36 | String[] par_columns={"par_name", "unit_acronym", "par_acronym", "src_acronym", "dcp_id", "par_en_name", "dcp_type"}, nassoc=null, filename=null; |
---|
37 | String[] exp_columns={"exp_id", "exp_name", "exp_mission", "set_dataset_version","set_ceos_level", "set_ceos_sublevel", "set_format", "tpl_id", "exp_public", "exp_alt_min", "exp_alt_max"}; |
---|
38 | String[] batch_columns={"is_batch"}; |
---|
39 | String[] sspar_columns={"subvariable"},file_columns2={"eth_id", "eth_path", "eth_tar_file", "eth_first_date", "eth_last_date","eth_dataset_version", "eth_ceos_level", "eth_ceos_sublevel","eth_format"}, metat_columns={"mt_id"}; |
---|
40 | String[] color_columns={"par_name", "tc_id_idl", "tc_fichier_couleur", "pc_val_mini", "pc_val_max", "pc_unite"}, mode_columns={"is_batch"}; |
---|
41 | String[] sspar_columns1={"set_first_date", "set_last_date","set_lon_min", "set_lon_max", "set_lat_min", "set_lat_max"}, auxfile=null, assoc=null; |
---|
42 | String[] unit_columns={"unit_acronym"}, spl=null, cols={"mindate", "maxdate", "lonmin", "lonmax", "latmin", "latmax" }, tt=null, filname=null, reponse=null; |
---|
43 | String[] priv_columns={"id"}, group_columns={"eri_group_id"}, user_columns={"id","email","name","first_name"}; |
---|
44 | |
---|
45 | int nreq=0, k=0, i=0, nunit_ord=-1, nunit_abs=-1, count=0, numY_aux0=0, numY_aux1=0, nfile=0, nXnature=0, nXtransfo=0, len=0; |
---|
46 | |
---|
47 | long mindate_ms=0, maxdate_ms=0,nb_visu_session=1; |
---|
48 | |
---|
49 | boolean isParAbs=true, isSspar=true, isFile=true, isParOrd=true, isUnitOrd=true, isUnitAbs=true, issel=false, isTransform=false,isParamaux=true; |
---|
50 | |
---|
51 | ArrayList par_list=null,exp_list=null,sspar_list=null,_parameters=null,unit_list_abs=null,unit_list_ord=null,file_list=null,al1=null,mode_list=null,batch_list=null, user_list=null,priv_list=null,group_list=null; |
---|
52 | |
---|
53 | Transform TRF=null; |
---|
54 | |
---|
55 | /****************************************************************/ |
---|
56 | |
---|
57 | /***************************AFFECTATIONS*************************************/ |
---|
58 | |
---|
59 | //parametres XML |
---|
60 | uniqueid=request.getParameter("uniqueid"); |
---|
61 | if (uniqueid==null || uniqueid.equals("") || uniqueid.equals("null")) { |
---|
62 | nb_visu_session=0; |
---|
63 | } |
---|
64 | else nb_visu_session=Long.parseLong(uniqueid)+1; |
---|
65 | |
---|
66 | meta_type=request.getParameter("meta_type"); |
---|
67 | if (meta_type==null || meta_type.equals("") || meta_type.equals("null")) { |
---|
68 | meta_type=""; |
---|
69 | } |
---|
70 | else { |
---|
71 | sql="SELECT mt_id "; |
---|
72 | sql+="FROM sil_type_trace WHERE tt_id="+graph_sel; |
---|
73 | file_list=null; |
---|
74 | file_list=req.get_list(sql,metat_columns); |
---|
75 | |
---|
76 | if (file_list==null || file_list.size()==0) { |
---|
77 | }else{ |
---|
78 | nfile=file_list.size()/metat_columns.length; |
---|
79 | if (nfile>0) { |
---|
80 | k=0; |
---|
81 | lib_meta_type=file_list.get(k).toString(); |
---|
82 | } |
---|
83 | |
---|
84 | } |
---|
85 | |
---|
86 | } |
---|
87 | |
---|
88 | //out.write(String.valueOf(nb_visu_session).toString()); |
---|
89 | id_session=request.getParameter("id_session"); |
---|
90 | if (id_session=="" || id_session==null || id_session.equals("") || id_session.equals("null")) { |
---|
91 | //id_session=""+Math.abs((new Random()).nextInt()); |
---|
92 | //id_session=session_temp.toString(); |
---|
93 | HttpSession session_temp = request.getSession(); |
---|
94 | id_session=(new stringSplit()).split(session_temp.toString(),"@")[1]; |
---|
95 | } |
---|
96 | //else nb_visu_session=nb_visu_session+1; |
---|
97 | |
---|
98 | uniqueid=String.valueOf(nb_visu_session).toString(); |
---|
99 | |
---|
100 | /*pageMode=request.getParameter("pageMode"); |
---|
101 | if (pageMode==null || pageMode.equals("") || pageMode.equals("null")) { |
---|
102 | pageMode=""; |
---|
103 | }*/ |
---|
104 | |
---|
105 | email=request.getParameter("email"); |
---|
106 | if (email==null || email.equals("") || email.equals("null")) { |
---|
107 | email=""; |
---|
108 | } |
---|
109 | |
---|
110 | cemail=request.getParameter("cemail"); |
---|
111 | if (cemail==null || cemail.equals("") || cemail.equals("null")) { |
---|
112 | cemail=""; |
---|
113 | } |
---|
114 | |
---|
115 | login=request.getParameter("login"); |
---|
116 | if (login==null || login.equals("") || login.equals("null")) { |
---|
117 | login=""; |
---|
118 | } |
---|
119 | |
---|
120 | name=request.getParameter("name"); |
---|
121 | if (name==null || name.equals("") || name.equals("null")) { |
---|
122 | name=""; |
---|
123 | } |
---|
124 | |
---|
125 | first_name=request.getParameter("first_name"); |
---|
126 | if (first_name==null || first_name.equals("") || first_name.equals("null")) { |
---|
127 | first_name=""; |
---|
128 | } |
---|
129 | |
---|
130 | passu=request.getParameter("passu"); |
---|
131 | if (passu==null || passu.equals("") || passu.equals("null")) { |
---|
132 | passu=""; |
---|
133 | } |
---|
134 | |
---|
135 | lance=request.getParameter("lance"); |
---|
136 | if (lance==null || lance.equals("") || lance.equals("null")) { |
---|
137 | lance=""; |
---|
138 | } |
---|
139 | |
---|
140 | continuer=request.getParameter("continuer"); |
---|
141 | if (continuer==null || continuer.equals("") || continuer.equals("null")) { |
---|
142 | continuer="0"; |
---|
143 | } |
---|
144 | |
---|
145 | onlydata=request.getParameter("onlydata"); |
---|
146 | if (onlydata==null || onlydata.equals("") || onlydata.equals("null")) { |
---|
147 | onlydata="0"; |
---|
148 | } |
---|
149 | |
---|
150 | colour_bar_title=request.getParameter("colour_bar_title"); |
---|
151 | if (colour_bar_title==null || colour_bar_title.equals("") || colour_bar_title.equals("null")) { |
---|
152 | colour_bar_title=""; |
---|
153 | } |
---|
154 | |
---|
155 | contour_display_mode=request.getParameter("contour_display_mode"); |
---|
156 | if (contour_display_mode==null || contour_display_mode.equals("") || contour_display_mode.equals("null")) { |
---|
157 | contour_display_mode="1"; |
---|
158 | } |
---|
159 | |
---|
160 | contour_default_label_flag=request.getParameter("contour_default_label_flag"); |
---|
161 | if (contour_default_label_flag==null || contour_default_label_flag.equals("") || contour_default_label_flag.equals("null")) { |
---|
162 | contour_default_label_flag="0"; |
---|
163 | } |
---|
164 | |
---|
165 | contour_default_colour_flag=request.getParameter("contour_default_colour_flag"); |
---|
166 | if (contour_default_colour_flag==null || contour_default_colour_flag.equals("") || contour_default_colour_flag.equals("null")) { |
---|
167 | contour_default_colour_flag="1"; |
---|
168 | } |
---|
169 | |
---|
170 | contour_default_colour=request.getParameter("contour_default_colour"); |
---|
171 | if (contour_default_colour==null || contour_default_colour.equals("") || contour_default_colour.equals("null")) { |
---|
172 | contour_default_colour="0,0,0"; |
---|
173 | } |
---|
174 | |
---|
175 | contour_default_linestyle=request.getParameter("contour_default_linestyle"); |
---|
176 | if (contour_default_linestyle==null || contour_default_linestyle.equals("") || contour_default_linestyle.equals("null")) { |
---|
177 | contour_default_linestyle="0"; |
---|
178 | } |
---|
179 | |
---|
180 | contour_default_line_thickness=request.getParameter("contour_default_line_thickness"); |
---|
181 | if (contour_default_line_thickness==null || contour_default_line_thickness.equals("") || contour_default_line_thickness.equals("null")) { |
---|
182 | contour_default_line_thickness="1"; |
---|
183 | } |
---|
184 | |
---|
185 | |
---|
186 | |
---|
187 | dot_plot_dot_style=request.getParameter("dot_plot_dot_style"); |
---|
188 | if (dot_plot_dot_style==null || dot_plot_dot_style.equals("") || dot_plot_dot_style.equals("null")) { |
---|
189 | dot_plot_dot_style="0"; |
---|
190 | } |
---|
191 | |
---|
192 | dot_plot_colour_flag=request.getParameter("dot_plot_colour_flag"); |
---|
193 | if (dot_plot_colour_flag==null || dot_plot_colour_flag.equals("") || dot_plot_colour_flag.equals("null")) { |
---|
194 | dot_plot_colour_flag="1"; |
---|
195 | } |
---|
196 | |
---|
197 | dot_plot_dotcolour=request.getParameter("dot_plot_dotcolour"); |
---|
198 | if (dot_plot_dotcolour==null || dot_plot_dotcolour.equals("") || dot_plot_dotcolour.equals("null")) { |
---|
199 | dot_plot_dotcolour="0,0,0"; |
---|
200 | } |
---|
201 | |
---|
202 | dot_plot_dotsize=request.getParameter("dot_plot_dotsize"); |
---|
203 | if (dot_plot_dotsize==null || dot_plot_dotsize.equals("") || dot_plot_dotsize.equals("null")) { |
---|
204 | dot_plot_dotsize="1"; |
---|
205 | } |
---|
206 | |
---|
207 | |
---|
208 | /*private_data_flag=request.getParameter("private_data_flag"); |
---|
209 | if (private_data_flag==null || private_data_flag.equals("") || private_data_flag.equals("null")) { |
---|
210 | private_data_flag="0"; |
---|
211 | }*/ |
---|
212 | |
---|
213 | download_auth=request.getParameter("download_auth"); |
---|
214 | if (download_auth==null || download_auth.equals("") || download_auth.equals("null")) { |
---|
215 | download_auth="1"; |
---|
216 | } |
---|
217 | |
---|
218 | flag_extrapolate_auth=request.getParameter("flag_extrapolate_auth"); |
---|
219 | if (flag_extrapolate_auth==null || flag_extrapolate_auth.equals("") || flag_extrapolate_auth.equals("null")) { |
---|
220 | flag_extrapolate_auth="1"; |
---|
221 | } |
---|
222 | |
---|
223 | userLevels=request.getParameter("userLevels"); |
---|
224 | if (userLevels==null || userLevels.equals("") || userLevels.equals("null")) { |
---|
225 | userLevels=""; |
---|
226 | } |
---|
227 | |
---|
228 | levels=request.getParameter("levels"); |
---|
229 | if (levels=="" || levels==null || levels.equals("") || levels.equals("null") || levels.equals("0")) { |
---|
230 | userLevels=""; |
---|
231 | levels="0"; |
---|
232 | } |
---|
233 | |
---|
234 | |
---|
235 | map_information_level=request.getParameter("map_information_level"); |
---|
236 | if (map_information_level=="" || map_information_level==null || map_information_level.equals("") || map_information_level.equals("null")) { |
---|
237 | map_information_level="0"; |
---|
238 | } |
---|
239 | |
---|
240 | map_filling=request.getParameter("map_filling"); |
---|
241 | if (map_filling=="" || map_filling==null || map_filling.equals("") || map_filling.equals("null")) { |
---|
242 | map_filling="0"; |
---|
243 | } |
---|
244 | |
---|
245 | map_axes_type=request.getParameter("map_axes_type"); |
---|
246 | if (map_axes_type=="" || map_axes_type==null || map_axes_type.equals("") || map_axes_type.equals("null")) { |
---|
247 | map_axes_type="2"; |
---|
248 | } |
---|
249 | |
---|
250 | grid_linestyle=request.getParameter("grid_linestyle"); |
---|
251 | if (grid_linestyle=="" || grid_linestyle==null || grid_linestyle.equals("") || grid_linestyle.equals("null")) { |
---|
252 | grid_linestyle="0"; |
---|
253 | } |
---|
254 | |
---|
255 | longitude_posting=request.getParameter("longitude_posting"); |
---|
256 | if (longitude_posting=="" || longitude_posting==null || longitude_posting.equals("") || longitude_posting.equals("null")) { |
---|
257 | longitude_posting="30"; |
---|
258 | } |
---|
259 | |
---|
260 | latitude_posting=request.getParameter("latitude_posting"); |
---|
261 | if (latitude_posting=="" || latitude_posting==null || latitude_posting.equals("") || latitude_posting.equals("null")) { |
---|
262 | latitude_posting="30"; |
---|
263 | } |
---|
264 | |
---|
265 | colour_bar_nb_value=request.getParameter("colour_bar_nb_value"); |
---|
266 | if (colour_bar_nb_value=="" || colour_bar_nb_value==null || colour_bar_nb_value.equals("") || colour_bar_nb_value.equals("null")) { |
---|
267 | colour_bar_nb_value="2"; |
---|
268 | } |
---|
269 | |
---|
270 | colour_bar_grid=request.getParameter("colour_bar_grid"); |
---|
271 | if (colour_bar_grid=="" || colour_bar_grid==null || colour_bar_grid.equals("") || colour_bar_grid.equals("null")) { |
---|
272 | colour_bar_grid="1"; |
---|
273 | } |
---|
274 | |
---|
275 | |
---|
276 | //advances setting |
---|
277 | _1d_interpolator_method=request.getParameter("interpolatormethod1d"); |
---|
278 | _1d_spacing=request.getParameter("spacing1d"); |
---|
279 | _1d_Nmax=request.getParameter("nmax1d"); |
---|
280 | _1d_Nmin=request.getParameter("nmin1d"); |
---|
281 | |
---|
282 | irreg_grid_method=request.getParameter("irreg_grid_method"); |
---|
283 | reg_grid_method=request.getParameter("reg_grid_method"); |
---|
284 | _2d_xspacing=request.getParameter("xspacing2d"); |
---|
285 | _2d_yspacing=request.getParameter("yspacing2d"); |
---|
286 | _2d_NXmax=request.getParameter("nxmax2d"); |
---|
287 | _2d_NXmin=request.getParameter("nxmin2d"); |
---|
288 | _2d_NYmax=request.getParameter("nymax2d"); |
---|
289 | _2d_NYmin=request.getParameter("nymin2d"); |
---|
290 | flag_validity_mask=request.getParameter("flag_validity_mask"); |
---|
291 | |
---|
292 | graph_sel=request.getParameter("graph_sel"); |
---|
293 | if (graph_sel=="" || graph_sel==null || graph_sel.equals("") || graph_sel.equals("null")) graph_sel=""; |
---|
294 | |
---|
295 | map_projection=request.getParameter("map_projection"); |
---|
296 | if (map_projection=="" || map_projection==null || map_projection.equals("") || map_projection.equals("null")) map_projection="0"; |
---|
297 | |
---|
298 | hemisphere=request.getParameter("hemisphere"); |
---|
299 | if (hemisphere=="" || hemisphere==null || hemisphere.equals("") || hemisphere.equals("null")) hemisphere="1"; |
---|
300 | |
---|
301 | sel_tpl_name=request.getParameter("sel_tpl_name"); |
---|
302 | if (sel_tpl_name=="" || sel_tpl_name==null || sel_tpl_name.equals("") || sel_tpl_name.equals("null")) sel_tpl_name=""; |
---|
303 | sel_par_abs=request.getParameter("sel_par_abs"); |
---|
304 | |
---|
305 | afficheTrace=request.getParameter("afficheTrace"); |
---|
306 | if (afficheTrace==null || afficheTrace.equals("") || afficheTrace.equals("null")) afficheTrace="0"; |
---|
307 | |
---|
308 | observation_height=request.getParameter("observation_height"); |
---|
309 | if (observation_height==null || observation_height.equals("") || observation_height.equals("null")) observation_height=""; |
---|
310 | |
---|
311 | DSMinDate_file=request.getParameter("DSMinDate_file"); |
---|
312 | DSMaxDate_file=request.getParameter("DSMaxDate_file"); |
---|
313 | sel_mindate=request.getParameter("mindate"); |
---|
314 | sel_maxdate=request.getParameter("maxdate"); |
---|
315 | sel_unit_ord=request.getParameter("sel_unit_ord"); |
---|
316 | if (sel_unit_ord==null || sel_unit_ord.equals("") || sel_unit_ord.equals("null")) sel_unit_ord=""; |
---|
317 | |
---|
318 | ftitle=request.getParameter("ftitle"); |
---|
319 | |
---|
320 | sel_exp_id=request.getParameter("sel_exp_id"); |
---|
321 | sel_version=request.getParameter("sel_version"); |
---|
322 | sel_level=request.getParameter("sel_level"); |
---|
323 | sel_sublevel=request.getParameter("sel_sublevel"); |
---|
324 | sel_format=request.getParameter("sel_format"); |
---|
325 | sel_tpl_id=request.getParameter("sel_tpl_id"); |
---|
326 | if (sel_tpl_id==null || sel_tpl_id.equals("") || sel_tpl_id.equals("null")) sel_tpl_id=""; |
---|
327 | |
---|
328 | lonmin_file=request.getParameter("lonmin_file"); |
---|
329 | lonmax_file=request.getParameter("lonmax_file"); |
---|
330 | latmin_file=request.getParameter("latmin_file"); |
---|
331 | latmax_file=request.getParameter("latmax_file"); |
---|
332 | file_type_abs=request.getParameter("file_type_abs"); |
---|
333 | |
---|
334 | |
---|
335 | sel_par_abs=request.getParameter("sel_par_abs"); |
---|
336 | if (sel_par_abs==null || sel_par_abs.equals("") || sel_par_abs.equals("null")) sel_par_abs=""; |
---|
337 | sel_sspar_abs=request.getParameter("sel_sspar_abs"); |
---|
338 | |
---|
339 | sel_unit_abs=request.getParameter("sel_unit_abs"); |
---|
340 | sel_par_ord=request.getParameter("sel_par_ord"); |
---|
341 | if (sel_par_ord==null || sel_par_ord.equals("") || sel_par_ord.equals("null")) sel_par_ord=""; |
---|
342 | |
---|
343 | sel_sspar_ord=request.getParameter("sel_sspar_ord"); |
---|
344 | |
---|
345 | |
---|
346 | file_unit_ord=request.getParameter("file_unit_ord"); |
---|
347 | file_sspar_ord=request.getParameter("file_sspar_ord"); |
---|
348 | file_par_ord=request.getParameter("file_par_ord"); |
---|
349 | file_nature_ord=request.getParameter("file_nature_ord"); |
---|
350 | display_type=request.getParameter("display_type"); |
---|
351 | file_par_aux=request.getParameter("file_par_aux"); |
---|
352 | file_unit_aux=request.getParameter("file_unit_aux"); |
---|
353 | file_nature_aux=request.getParameter("file_nature_aux"); |
---|
354 | file_par_aux1=request.getParameter("file_par_aux1"); |
---|
355 | file_unit_aux1=request.getParameter("file_unit_aux1"); |
---|
356 | file_nature_aux1=request.getParameter("file_nature_aux1"); |
---|
357 | |
---|
358 | file_trf_id=request.getParameter("file_trf_id"); |
---|
359 | file_par_orig=request.getParameter("file_par_orig"); |
---|
360 | file_unit_orig=request.getParameter("file_unit_orig"); |
---|
361 | file_nature_orig=request.getParameter("file_nature_orig"); |
---|
362 | |
---|
363 | |
---|
364 | lonmin=request.getParameter("lonmin"); |
---|
365 | lonmax=request.getParameter("lonmax"); |
---|
366 | latmin=request.getParameter("latmin"); |
---|
367 | latmax=request.getParameter("latmax"); |
---|
368 | |
---|
369 | if (lonmin==null) lonmin=""; |
---|
370 | if (lonmax==null) lonmax=""; |
---|
371 | if (latmin==null) latmin=""; |
---|
372 | if (latmax==null) latmax=""; |
---|
373 | |
---|
374 | |
---|
375 | if( sel_par_abs==null || sel_par_abs.equals("") || sel_par_abs.equals("-1")) isParAbs=false; |
---|
376 | if( sel_sspar_abs==null || sel_sspar_abs.equals("") ) isSspar=false; |
---|
377 | |
---|
378 | /*******************************************************************************************/ |
---|
379 | |
---|
380 | /*******************************REQUETES FORMULAIRE*******************************************/ |
---|
381 | //liste des differentes version et niveaux de l'experience choisie |
---|
382 | sql="SELECT distinct ether_experiment.exp_id,exp_name,exp_mission,set_dataset_version,set_ceos_level,set_ceos_sublevel,set_format"; |
---|
383 | sql+=",dcp_file_class.tpl_id,exp_public,exp_alt_min,exp_alt_max FROM ether.dcp_file_class, ether.ether_experiment, ether.dcp_descripteur, ether.dcp_parameter "; |
---|
384 | sql+="WHERE ether_experiment.exp_id=dcp_file_class.exp_id and dcp_descripteur.tpl_id=dcp_file_class.tpl_id "; |
---|
385 | sql+="and dcp_parameter.par_acronym = ether.dcp_descripteur.par_acronym and (isord=0 or isord=2) and associate=-1 "; |
---|
386 | sql+="and dcp_file_class.tpl_id NOT IN (1332,1333,1331) "; |
---|
387 | sql+="and dcp_file_class.tpl_id in (select dcp_file_class.tpl_id from ether.ether_experiment, ether.dcp_file_class "; |
---|
388 | sql+="where ether_experiment.exp_id=dcp_file_class.exp_id and exp_name='"+sel_tpl_name+"') "; |
---|
389 | sql+="ORDER BY exp_name, set_dataset_version"; |
---|
390 | |
---|
391 | |
---|
392 | nreq=-1; |
---|
393 | exp_list=req.get_list(sql,exp_columns); |
---|
394 | |
---|
395 | if (exp_list==null || exp_list.size()==0) { |
---|
396 | error_msg="No file class found in the database"; |
---|
397 | } |
---|
398 | else{ |
---|
399 | nreq=exp_list.size()/exp_columns.length; |
---|
400 | exp_options=""; |
---|
401 | if (nreq>0) { |
---|
402 | k=0; |
---|
403 | sel_tpl=""; |
---|
404 | for (i=0 ; i < nreq ; i++) { |
---|
405 | |
---|
406 | if ((selected.equals("") || selected.equals("null")) && (sel_tpl_id.equals("") || sel_tpl_id.equals("null"))) { |
---|
407 | sel_tpl_id=exp_list.get(k+7).toString(); |
---|
408 | } |
---|
409 | |
---|
410 | if(exp_list.get(k+7).toString().equals(sel_tpl_id) ){ |
---|
411 | |
---|
412 | selected="selected"; |
---|
413 | sel_tpl=exp_list.get(k+7).toString(); |
---|
414 | sel_exp_id=exp_list.get(k).toString(); |
---|
415 | sel_version=exp_list.get(k+3).toString(); |
---|
416 | sel_level=exp_list.get(k+4).toString(); |
---|
417 | sel_sublevel=exp_list.get(k+5).toString(); |
---|
418 | sel_format=exp_list.get(k+6).toString(); |
---|
419 | sel_exp_public=exp_list.get(k+8).toString(); |
---|
420 | exp_alt_min=exp_list.get(k+9).toString(); |
---|
421 | exp_alt_max=exp_list.get(k+10).toString(); |
---|
422 | heightTexte="<b>(Between "+exp_alt_min+" km and "+exp_alt_max+" km)</b>"; |
---|
423 | lib_tpl_id=exp_list.get(k+2).toString()+" - "+exp_list.get(k+3).toString()+" - "+exp_list.get(k+4).toString()+" - "+exp_list.get(k+5).toString()+" - "+exp_list.get(k+6).toString(); |
---|
424 | } |
---|
425 | else selected=""; |
---|
426 | |
---|
427 | |
---|
428 | exp_options+="<OPTION class=selection VALUE=\""+exp_list.get(k+7)+"\" "+selected+">"+exp_list.get(k+2); |
---|
429 | exp_options+=" - "+exp_list.get(k+3)+" - "+exp_list.get(k+4)+" - "+exp_list.get(k+5)+" - "; |
---|
430 | exp_options+=exp_list.get(k+6)+"</OPTION>"; |
---|
431 | k+=exp_columns.length; |
---|
432 | } |
---|
433 | |
---|
434 | } |
---|
435 | } |
---|
436 | |
---|
437 | |
---|
438 | //requete de recuperation des especes mesurees |
---|
439 | |
---|
440 | sql="SELECT distinct par_name, unit_acronym, param.par_acronym, src_acronym, dcp_id, subvariable, par_en_name, dcp_type "; |
---|
441 | sql+="FROM ether.dcp_descripteur, ether.dcp_parameter param, ether.dcp_unit unit, ether.ether_dataset ds "; |
---|
442 | sql+="WHERE param.par_acronym=dcp_descripteur.par_acronym and unit.unit_id=dcp_descripteur.unit_id "; |
---|
443 | sql+="and ds.set_parameter=dcp_descripteur.par_acronym"; |
---|
444 | sql+=" and (ds.set_id_experiment="+sel_exp_id+" or ds.set_id_experiment= (select exp_id from ether.dcp_file_class where associate="; |
---|
445 | sql+=sel_tpl_id+")) and (isord=0 or isord=2) and (tpl_id="+sel_tpl_id+" or tpl_id=(select tpl_id from ether.dcp_file_class "; |
---|
446 | sql+="WHERE associate= "+sel_tpl_id+")) "; |
---|
447 | |
---|
448 | |
---|
449 | selected=""; |
---|
450 | par_list=req.get_list(sql,par_columns); |
---|
451 | nreq=-1; |
---|
452 | |
---|
453 | if( par_list==null || par_list.size()==0 ){ |
---|
454 | isParAbs=false; |
---|
455 | error_msg="No parameter found in the database for the selected file class"; |
---|
456 | } |
---|
457 | else { |
---|
458 | isParAbs=true; |
---|
459 | nreq=par_list.size()/par_columns.length; |
---|
460 | par_options_abs=""; |
---|
461 | if( nreq>0 ){ |
---|
462 | k=0; |
---|
463 | param0=""+par_list.get(2)+par_list.get(1)+par_list.get(3)+par_list.get(6); |
---|
464 | param=""; |
---|
465 | for(i=0;i<nreq;i++){ |
---|
466 | // ELIMINATION DES DOUBLONS (PAS POSSIBLE A FAIRE A PARTIR DE LA REQUETE A CAUSE DU DISTINCT) |
---|
467 | // MEME PARAMETRE AYANT PLUSIEURS SOUS-PARAMETRES |
---|
468 | |
---|
469 | if( !param0.equals(param) ){ |
---|
470 | //selected=""; |
---|
471 | svalue=par_list.get(k+2)+"%"+par_list.get(k+3)+"%null%"+par_list.get(k+6); |
---|
472 | if ((selected.equals("") || selected.equals("null")) && (sel_par_abs.equals("") || sel_par_abs.equals("null"))) { |
---|
473 | sel_par_abs=svalue; |
---|
474 | } |
---|
475 | |
---|
476 | if( sel_par_abs!=null && sel_par_abs!="" && svalue.equals(sel_par_abs) ){ |
---|
477 | selected="selected"; |
---|
478 | file_par_abs=par_list.get(k+2).toString(); |
---|
479 | file_unit_abs=par_list.get(k+1).toString(); |
---|
480 | file_nature_abs=par_list.get(k+3).toString();; |
---|
481 | file_type_abs=par_list.get(k+6).toString(); |
---|
482 | form_par_abs=par_list.get(k+5).toString(); |
---|
483 | form_legend=form_par_abs+" ("+file_unit_abs+") - "+file_nature_abs; |
---|
484 | form_par_id=par_list.get(k+4).toString(); |
---|
485 | lib_param=par_list.get(k+5).toString(); |
---|
486 | |
---|
487 | } |
---|
488 | else selected=""; |
---|
489 | |
---|
490 | par_options_abs+="<OPTION class=selection VALUE=\""+svalue+"\" "+selected+">"+par_list.get(k+5)+" ("; |
---|
491 | par_options_abs+=par_list.get(k+1)+") - "+par_list.get(k+3)+"</OPTION>"; |
---|
492 | } |
---|
493 | |
---|
494 | param=""+par_list.get(k+2)+par_list.get(k+1)+par_list.get(k+3)+par_list.get(k+6); |
---|
495 | k+=par_columns.length; |
---|
496 | if( k<par_list.size()-1 )param0=par_list.get(k+2).toString()+par_list.get(k+1)+par_list.get(k+3)+par_list.get(k+6); |
---|
497 | } |
---|
498 | |
---|
499 | sql2="SELECT pc.par_name, tc.tc_id_idl, tc.tc_fichier_couleur, pc.pc_val_mini, pc.pc_val_max, pc.pc_unite "; |
---|
500 | sql2+="FROM sil_parameter_couleur pc, sil_table_couleur tc WHERE tc.tc_id=pc.tc_id "; |
---|
501 | sql2+="and pc.par_name='"+form_par_abs+"'"; //and pc.pc_unite='"+sel_unit_abs+"'"; |
---|
502 | |
---|
503 | file_list=req.get_list(sql2,color_columns); |
---|
504 | |
---|
505 | |
---|
506 | if (file_list==null || file_list.size()==0) { |
---|
507 | }else{ |
---|
508 | nfile=file_list.size()/color_columns.length; |
---|
509 | if( nfile>0 ){ |
---|
510 | k=0; |
---|
511 | idl_colour_table_id=file_list.get(k+1).toString(); |
---|
512 | |
---|
513 | if (!file_list.get(k+2).toString().equals("") && !file_list.get(k+2).toString().equals("null")) { |
---|
514 | imported_colour_table=file_list.get(k+1).toString(); |
---|
515 | } |
---|
516 | |
---|
517 | val_min_bd=file_list.get(k+3).toString(); |
---|
518 | val_max_bd=file_list.get(k+4).toString(); |
---|
519 | unite_bd=file_list.get(k+5).toString(); |
---|
520 | } |
---|
521 | } |
---|
522 | |
---|
523 | } |
---|
524 | } |
---|
525 | |
---|
526 | /* LISTE DES SOUS-PARAMETRES ABSCISSE */ |
---|
527 | |
---|
528 | if(isParAbs) { |
---|
529 | nreq=-1; |
---|
530 | |
---|
531 | sel_par=""; |
---|
532 | if (sel_par_abs!=null) sel_par=(new stringSplit()).split(sel_par_abs,"%")[0]; |
---|
533 | |
---|
534 | // BORNES DE DATES |
---|
535 | sql="SELECT DISTINCT set_first_date,set_last_date,set_lon_min,set_lon_max,set_lat_min,set_lat_max "; |
---|
536 | sql+="FROM ether.ether_dataset,ether.dcp_file_class,set_parameter=par_acronym and set_id_experiment=exp_id and "; |
---|
537 | sql+="(exp_id="+sel_exp_id+" or exp_id= ( select exp_id from ether.dcp_file_class where associate= "+sel_tpl_id+")) and set_parameter='"; |
---|
538 | sql+=sel_par+"' and ether_dataset.set_dataset_version='"+sel_version+"' "+ " and ether_dataset.set_ceos_level='"+sel_level+"' "; |
---|
539 | sql+=" and ether_dataset.set_ceos_sublevel='"+sel_sublevel+"' "+" and ether_dataset.set_format='"+sel_format+"' "; |
---|
540 | sspar_list=req.get_list(sql,sspar_columns1); |
---|
541 | |
---|
542 | if (sspar_list!=null && sspar_list.size()>0) { |
---|
543 | mindate_ms=Long.parseLong(sspar_list.get(0).toString()); |
---|
544 | maxdate_ms=Long.parseLong(sspar_list.get(1).toString()); |
---|
545 | DSMinDate=(new calDate(mindate_ms)).date_cal; |
---|
546 | DSMaxDate=(new calDate(maxdate_ms)).date_cal; |
---|
547 | lonmin=sspar_list.get(2).toString(); |
---|
548 | lonmax=sspar_list.get(3).toString(); |
---|
549 | latmin=sspar_list.get(4).toString(); |
---|
550 | latmax=sspar_list.get(5).toString(); |
---|
551 | } |
---|
552 | |
---|
553 | // LISTE DES SOUS-PARAMETRES PROPREMENT DIT |
---|
554 | sql="select distinct subvariable from ether.dcp_descripteur, ether.dcp_file_class where par_acronym='"+sel_par+"'"; |
---|
555 | sql+=" and dcp_descripteur.tpl_id="+sel_tpl_id+" and dcp_descripteur.tpl_id=dcp_file_class.tpl_id and (exp_id="+sel_exp_id; |
---|
556 | sql+=" or exp_id=( select exp_id from ether.dcp_file_class where associate= "+sel_tpl_id+"))"; |
---|
557 | |
---|
558 | |
---|
559 | sspar_list=req.get_list(sql,sspar_columns); |
---|
560 | if (sspar_list==null || sspar_list.size()==0) isSspar=false; |
---|
561 | else { |
---|
562 | isSspar=true; |
---|
563 | nreq=sspar_list.size()/sspar_columns.length; |
---|
564 | sspar_options=""; |
---|
565 | if (nreq>0) { |
---|
566 | k=0; |
---|
567 | if (sel_sspar_abs=="" || sel_sspar_abs==null || sel_sspar_abs.equals("") || sel_sspar_abs.equals("null")) sel_sspar_abs=sspar_list.get(0).toString(); |
---|
568 | for (i=0;i<nreq;i++) { |
---|
569 | selected=""; |
---|
570 | if (isSspar && sspar_list.get(k).toString().equals(sel_sspar_abs)) selected="selected"; |
---|
571 | sspar_options+="<OPTION class=selection VALUE=\""+sspar_list.get(k).toString()+"\" "+selected+">"; |
---|
572 | |
---|
573 | if (sspar_list.get(k).toString().equals(".")) sspar_options+="None"; |
---|
574 | else sspar_options+=sspar_list.get(k); |
---|
575 | sspar_options+="</OPTION>"; |
---|
576 | form_sspar_abs=sspar_list.get(k).toString(); |
---|
577 | |
---|
578 | k+=sspar_columns.length; |
---|
579 | } |
---|
580 | } |
---|
581 | } |
---|
582 | } |
---|
583 | |
---|
584 | /*LISTE DES PARAMETRES EN ORDONNEES*/ |
---|
585 | |
---|
586 | if( isFile && isParAbs && sel_par_abs!=null && !sel_par_abs.equals("null") && !sel_par_abs.equals("")){ |
---|
587 | from=" from "; |
---|
588 | TRF=new Transform(sel_tpl_id, sel_exp_id,lang, file_type_abs); |
---|
589 | isParOrd=TRF.isPar; |
---|
590 | par_options_ord=""; |
---|
591 | |
---|
592 | if( !isParOrd ) error_msg=""; |
---|
593 | else{ |
---|
594 | |
---|
595 | _parameters=new ArrayList(); |
---|
596 | |
---|
597 | for(i=0;i<TRF.parameter.length;i++){ |
---|
598 | selected=""; |
---|
599 | svalue=TRF.par_acr[i]+"%"+TRF.nature[i]+"%"+TRF.ssparameter[i]; |
---|
600 | if ((selected.equals("") || selected.equals("null")) && (sel_par_ord.equals("") || sel_par_ord.equals("null"))) { |
---|
601 | sel_par_ord=svalue; |
---|
602 | } |
---|
603 | |
---|
604 | if( sel_par_ord!=null && sel_par_ord!="" && !sel_par_ord.equals("null") && TRF.par_acr[i]!=null && svalue.equals(sel_par_ord) ){ |
---|
605 | selected="selected"; |
---|
606 | file_par_ord=TRF.par_acr[i]; |
---|
607 | file_sspar_ord=TRF.ssparameter[i]; |
---|
608 | file_unit_ord=TRF.unit[i]; |
---|
609 | if( sel_unit_ord==null || sel_unit_ord.equals("") || sel_unit_ord.equals("null") ){ |
---|
610 | sel_unit_ord=file_unit_ord; |
---|
611 | isUnitOrd=true; |
---|
612 | } |
---|
613 | |
---|
614 | file_nature_ord=TRF.nature[i]; |
---|
615 | display_type="available"; |
---|
616 | form_par_ord=TRF.parameter[i]; |
---|
617 | } |
---|
618 | |
---|
619 | par_options_ord+="<OPTION class=selection VALUE=\""+svalue+"\" "+selected+">"+TRF.parameter[i]+" - "+TRF.nature[i]; |
---|
620 | par_options_ord+=" - "+TRF.ssparameter[i]+"</OPTION>"; |
---|
621 | if (selected.equals("selected")) par_observation_height=TRF.parameter[i]+" - "+TRF.nature[i]+" - "+TRF.ssparameter[i]; |
---|
622 | |
---|
623 | _parameters.add(TRF.par_acr[i]); |
---|
624 | |
---|
625 | } |
---|
626 | |
---|
627 | // PARAMETRES OBTENUS PAR TRANSFORMATIONS SIMPLES |
---|
628 | if( file_type_abs.equals("profil") && TRF.cal_parameter!=null ) { |
---|
629 | for(i=0;i<TRF.cal_parameter.length;i++) { |
---|
630 | selected=""; |
---|
631 | svalue=TRF.cal_par_acr[i]+"%"+TRF.cal_nature[i]+"%"+TRF.cal_par_acr_orig[i]+"%"; |
---|
632 | svalue+=TRF.cal_ssparameter[i]; |
---|
633 | if( sel_par_ord!=null && sel_par_ord!="" && !sel_par_ord.equals("null") && TRF.cal_par_acr[i]!=null && svalue.equals(sel_par_ord) ){ |
---|
634 | selected="selected"; |
---|
635 | file_par_ord=TRF.cal_par_acr[i]; |
---|
636 | file_sspar_ord=TRF.cal_ssparameter[i]; |
---|
637 | file_unit_ord=TRF.cal_unit[i]; |
---|
638 | |
---|
639 | if( sel_unit_ord==null || sel_unit_ord.equals("") || sel_unit_ord.equals("null") ){ |
---|
640 | sel_unit_ord=file_unit_ord; |
---|
641 | isUnitOrd=true; |
---|
642 | } |
---|
643 | |
---|
644 | file_nature_ord=TRF.cal_nature[i]; |
---|
645 | display_type="transformed"; |
---|
646 | |
---|
647 | file_par_aux=TRF.cal_par_acr_aux[i]; |
---|
648 | file_unit_aux=TRF.cal_unit_aux[i]; |
---|
649 | file_nature_aux=TRF.cal_nature_aux[i]; |
---|
650 | file_par_aux1=TRF.cal_par_acr_aux1[i]; |
---|
651 | file_unit_aux1=TRF.cal_unit_aux1[i]; |
---|
652 | file_nature_aux1=TRF.cal_nature_aux1[i]; |
---|
653 | |
---|
654 | file_trf_id=TRF.cal_trf_id[i]; |
---|
655 | file_par_orig=TRF.cal_par_acr_orig[i]; |
---|
656 | file_unit_orig=TRF.cal_unit_orig[i]; |
---|
657 | file_nature_orig=TRF.cal_nature_orig[i]; |
---|
658 | } |
---|
659 | |
---|
660 | if( !TRF.isRedundant[i] && !TRF.cal_trf_id[i].equals("999")) {// && !svalue.equals("Geopotential%Cal%Press%.")) { |
---|
661 | par_options_ord+="<OPTION class=selection VALUE=\""+svalue+"\" "+selected+">"; |
---|
662 | par_options_ord+=TRF.cal_parameter[i]+from+TRF.cal_parameter_orig[i]+" - Cal</OPTION>"; |
---|
663 | if (selected.equals("selected")) par_observation_height=TRF.cal_parameter[i]+from+TRF.cal_parameter_orig[i]+" - Cal"; |
---|
664 | } |
---|
665 | |
---|
666 | _parameters.add(TRF.cal_par_acr[i]); |
---|
667 | } |
---|
668 | } |
---|
669 | |
---|
670 | |
---|
671 | // PARAMETRES OBTENUS PAR TRANSFORMATIONS COMBINEES |
---|
672 | if( file_type_abs.equals("profil") && TRF.cbn_parameter!=null ){ |
---|
673 | for(i=0;i<TRF.cbn_parameter.length;i++){ |
---|
674 | selected=""; |
---|
675 | |
---|
676 | svalue=TRF.cbn_par_acr[i][TRF.cbn_parameter[i].length-1]; |
---|
677 | svalue+="%"+TRF.cbn_nature[i][TRF.cbn_parameter[i].length-1]+"%"; |
---|
678 | svalue+=TRF.cbn_par_acr_orig[i][0]+"%"+TRF.cbn_nature[i][TRF.cbn_ssparameter[i].length-1]; |
---|
679 | |
---|
680 | if( sel_par_ord!=null && sel_par_ord!="" && !sel_par_ord.equals("null") && svalue.equals(sel_par_ord) ) { |
---|
681 | selected="selected"; |
---|
682 | file_par_ord=TRF.cbn_par_acr[i][TRF.cbn_parameter[i].length-1]; |
---|
683 | file_sspar_ord=TRF.cbn_ssparameter[i][TRF.cbn_parameter[i].length-1]; |
---|
684 | file_unit_ord=TRF.cbn_unit[i][TRF.cbn_parameter[i].length-1]; |
---|
685 | |
---|
686 | if( sel_unit_ord==null || sel_unit_ord.equals("") || sel_unit_ord.equals("null") ){ |
---|
687 | sel_unit_ord=file_unit_ord; |
---|
688 | isUnitOrd=true; |
---|
689 | } |
---|
690 | file_nature_ord=TRF.cbn_nature[i][TRF.cbn_parameter[i].length-1]; |
---|
691 | display_type="combined"; |
---|
692 | file_trf_id=TRF.cbn_trf_id[i]; |
---|
693 | file_par_orig=TRF.cbn_par_acr_orig[i][0]; |
---|
694 | file_unit_orig=TRF.cbn_unit_orig[i][0]; |
---|
695 | file_nature_orig=TRF.cbn_nature_orig[i][0]; |
---|
696 | } |
---|
697 | |
---|
698 | // ON ECARTE LES TRANSFORMATIONS DONT LE PARAMETRE ORIGINE N'APPARTIENT PAS AU FICHIER |
---|
699 | // ON ECARTE EGALEMENT LES TRANSFORMATIONS REDONDANTES |
---|
700 | if( TRF.cbn_nature_orig[i][0]!=null && !TRF.cbn_nature_orig[i][0].equals("Cal") && !TRF.isRedundantCbn[i]) { |
---|
701 | par_options_ord+="<OPTION class=selection VALUE=\""+svalue+"\" "+selected+">"; |
---|
702 | par_options_ord+=TRF.cbn_parameter[i][TRF.cbn_parameter[i].length-1]+from; |
---|
703 | par_options_ord+=TRF.cbn_parameter_orig[i][0]; |
---|
704 | par_options_ord+=" - Cal</OPTION>"; |
---|
705 | if (selected.equals("selected")) |
---|
706 | par_observation_height=TRF.cbn_parameter[i][TRF.cbn_parameter[i].length-1]+from+TRF.cbn_parameter_orig[i][0]+" - Cal"; |
---|
707 | |
---|
708 | |
---|
709 | _parameters.add(TRF.cbn_par_acr[i][TRF.cbn_parameter[i].length-1]); |
---|
710 | } |
---|
711 | } |
---|
712 | } |
---|
713 | |
---|
714 | } |
---|
715 | } |
---|
716 | |
---|
717 | //UNITES |
---|
718 | nunit_abs=-1; |
---|
719 | nunit_ord=-1; |
---|
720 | if (isFile) { |
---|
721 | sql="select unit2.unit_acronym from ether.dcp_unit,ether.dcp_parameter,ether.dcp_unit unit2,ether.dcp_conversion "; |
---|
722 | sql+="where par_acronym = '"+file_par_abs+"' and dcp_unit.unit_acronym = '"+file_unit_abs+"'"; |
---|
723 | sql+="and dcp_parameter.cls_acronym = dcp_unit.cls_acronym "; |
---|
724 | sql+="and dcp_unit.unit_id = dcp_conversion.unit_orig and dcp_conversion.unit_final = unit2.unit_id"; |
---|
725 | |
---|
726 | unit_list_abs=req.get_list(sql,unit_columns); |
---|
727 | isUnitAbs=true; |
---|
728 | Object obs1=new Object(); |
---|
729 | obs1=file_unit_abs; |
---|
730 | unit_list_abs.add(0,obs1); |
---|
731 | nunit_abs=unit_list_abs.size()/unit_columns.length; |
---|
732 | unit_options_abs=""; |
---|
733 | |
---|
734 | if( nunit_abs>0 ){ |
---|
735 | k=0; |
---|
736 | if (!(sel_unit_abs!=null && !sel_unit_abs.equals("")) && sel_par_abs!=null |
---|
737 | && !sel_par_abs.equals("")) sel_unit_abs=unit_list_abs.get(0).toString(); |
---|
738 | |
---|
739 | for(i=0;i<nunit_abs;i++){ |
---|
740 | selected=""; |
---|
741 | if( isUnitAbs && unit_list_abs.get(k).toString().equals(sel_unit_abs)) selected="selected"; |
---|
742 | |
---|
743 | unit_options_abs+="<OPTION class=selection VALUE=\""; |
---|
744 | unit_options_abs+=unit_list_abs.get(k)+"\" "+selected+">"+unit_list_abs.get(k)+"</OPTION>"; |
---|
745 | k+=unit_columns.length; |
---|
746 | } |
---|
747 | } |
---|
748 | |
---|
749 | if( isParOrd && file_par_ord!=null && !file_par_ord.equals("null") && |
---|
750 | file_unit_ord!=null && !file_unit_ord.equals("null") && !file_unit_ord.equals("") ) { |
---|
751 | |
---|
752 | sql="select unit2.unit_acronym from ether.dcp_unit, ether.dcp_parameter, ether.dcp_unit unit2,"; |
---|
753 | sql+="ether.dcp_conversion where par_acronym = '"+file_par_ord+"' and dcp_unit.unit_acronym = '"+file_unit_ord+"' "; |
---|
754 | sql+="and dcp_parameter.cls_acronym = dcp_unit.cls_acronym and dcp_unit.unit_id = dcp_conversion.unit_orig "; |
---|
755 | sql+="and dcp_conversion.unit_final = unit2.unit_id"; |
---|
756 | unit_list_ord=req.get_list(sql,unit_columns); |
---|
757 | |
---|
758 | // RAJOUT DE L'UNITE DU FICHIER |
---|
759 | Object obs=new Object(); |
---|
760 | obs=file_unit_ord; |
---|
761 | unit_list_ord.add(0,obs); |
---|
762 | isUnitOrd=true; |
---|
763 | nunit_ord=unit_list_ord.size()/unit_columns.length; |
---|
764 | unit_options_ord=""; |
---|
765 | if( nunit_ord>0 ){ |
---|
766 | k=0; |
---|
767 | // ON FORCE LA SELECTION DE L'UNITE EN ORDONNEE A CELLE DU FICHIER PAR DEFAUT |
---|
768 | issel=false; |
---|
769 | for(i=0;i<nunit_ord;i++){ |
---|
770 | if( isUnitOrd && unit_list_ord.get(k).toString().equals(sel_unit_ord) ){ |
---|
771 | issel=true; |
---|
772 | break; |
---|
773 | } |
---|
774 | k+=unit_columns.length; |
---|
775 | } |
---|
776 | |
---|
777 | if( !issel ) sel_unit_ord=file_unit_ord; |
---|
778 | |
---|
779 | k=0; |
---|
780 | for(i=0;i<nunit_ord;i++){ |
---|
781 | selected=""; |
---|
782 | if( isUnitOrd && unit_list_ord.get(k).toString().equals(sel_unit_ord) )selected="selected"; |
---|
783 | unit_options_ord+="<OPTION class=selection VALUE=\""+unit_list_ord.get(k)+"\" "+selected+">"; |
---|
784 | unit_options_ord+=unit_list_ord.get(k)+"</OPTION>"; |
---|
785 | k+=unit_columns.length; |
---|
786 | } |
---|
787 | } |
---|
788 | } |
---|
789 | |
---|
790 | } |
---|
791 | |
---|
792 | if (!afficheTrace.equals("null") && afficheTrace.equals("1")) { |
---|
793 | count=1; |
---|
794 | //UNITE DIFFERENTE |
---|
795 | //POUR L'ABSCISSE |
---|
796 | if( sel_unit_abs!=null && !sel_unit_abs.equals("") && !file_unit_abs.equals(sel_unit_abs) ){ |
---|
797 | ids=get_conv("acr", file_unit_abs, sel_unit_abs,req); |
---|
798 | cnv_id=(new stringSplit()).split(ids,"%")[0]; |
---|
799 | trf_id=(new stringSplit()).split(ids,"%")[1]; |
---|
800 | // EST-CE UNE CONVERSION OU/ET UNE TRANSFORMATION (EN ABSCISSE SEULE UNE TRANFO NON COMBINEE PEUT AVOIR LIEU |
---|
801 | |
---|
802 | if( !trf_id.equals("999") ){ |
---|
803 | // LA CONVERSION POINTE VERS UNE TRANSFORMATION: ATTENTION DANS CE CAS LA VARIABLE N'EST PAS TRANSFORMEE |
---|
804 | // CELA RESTE UN CHANGEMENT D'UNITE |
---|
805 | // DONC LA VARIABLE A LIRE RESTE LA MEME (CONTRAIREMENT A L'ORDONNEE OU CELLE A LIRE EST |
---|
806 | // LA VARIABLE ORIGINE DE LA TRANSFORMATION ET NON PAS LA VARIABLE CHOISIE PAR L'UTILISATEUR |
---|
807 | // QUI N'EXISTE PAS DANS LE FICHIER DE MESURE PUISQUE CALCULEE) |
---|
808 | result=treat_trf(trf_id, sel_tpl_id, count,"",sel_unit_abs,false,true,req); |
---|
809 | spl=(new stringSplit()).split(result,"%"); |
---|
810 | Xtransfo=spl[1]; |
---|
811 | AUX0transfo=spl[2]; |
---|
812 | AUX1transfo=spl[3]; |
---|
813 | count=Integer.parseInt(spl[4]); |
---|
814 | more_varid+=spl[5]; |
---|
815 | } |
---|
816 | else if( !cnv_id.equals("-1") ){ |
---|
817 | // C'EST UNE CONVERSION SIMPLE |
---|
818 | Xtransfo="conv"+cnv_id+",999,999"; |
---|
819 | } |
---|
820 | else{ |
---|
821 | sel_unit_abs=file_unit_abs; |
---|
822 | Xtransfo="t999,999,999"; |
---|
823 | } |
---|
824 | } |
---|
825 | else{ |
---|
826 | Xtransfo="t999,999,999"; |
---|
827 | } |
---|
828 | |
---|
829 | //POUR ORDONNEE |
---|
830 | |
---|
831 | if(sel_unit_ord!=null && !sel_unit_ord.equals("") && !file_unit_ord.equals(sel_unit_abs) ){ |
---|
832 | ordonnee=file_par_ord; |
---|
833 | sspar_ordonnee=file_sspar_ord; |
---|
834 | numY_aux0=999; |
---|
835 | numY_aux1=999; |
---|
836 | isTransform=false; |
---|
837 | |
---|
838 | // LA VARIABLE DEMANDEE EN ORDONNEE N'EST PAS DISPONIBLE DANS LE FICHIER |
---|
839 | // ON CREE DE LA DONNEE VIA UNE TRANSFORMATION DE VARIABLE |
---|
840 | if( !display_type.equals("available") ){ |
---|
841 | |
---|
842 | isTransform=true; |
---|
843 | auxiliary=file_par_aux; |
---|
844 | auxiliary_nature=file_nature_aux; |
---|
845 | auxiliary1=file_par_aux1; |
---|
846 | auxiliary_nature1="file_nature_aux1"; |
---|
847 | origin="file_par_orig"; |
---|
848 | origin_unit=file_unit_orig; |
---|
849 | origin_nature=file_nature_orig; |
---|
850 | |
---|
851 | // 2 POSSIBILITES : |
---|
852 | // 1/ ON TRANSFORME LA VARIABLE INITIALE PAR UNE TRANSFORMATION SIMPLE |
---|
853 | if( display_type.equals("transformed") ){ |
---|
854 | if( !file_trf_id.equals("999") ){ |
---|
855 | //LA CONVERSION POINTE VERS UNE TRANSFORMATION |
---|
856 | result=treat_trf(file_trf_id, sel_tpl_id, count,origin_unit,sel_unit_ord,true,true,req); |
---|
857 | spl=(new stringSplit()).split(result,"%"); |
---|
858 | varY=spl[0]; |
---|
859 | Ytransfo=spl[1]; |
---|
860 | AUY0transfo=spl[2]; |
---|
861 | //AUY0transfo=spl[2]; |
---|
862 | AUY1transfo=spl[3]; |
---|
863 | count=Integer.parseInt(spl[4]); |
---|
864 | |
---|
865 | more_varid+=spl[5]; |
---|
866 | |
---|
867 | }else{ |
---|
868 | sel_unit_ord=file_unit_ord; |
---|
869 | Ytransfo="t999,999,999"; |
---|
870 | |
---|
871 | } |
---|
872 | // 2/ ON TRANSFORME LA VARIABLE INITIALE PAR UNE TRANSFORMATION COMBINEE |
---|
873 | } |
---|
874 | else if( display_type.equals("combined") ){ |
---|
875 | if( !file_trf_id.equals("999") ){ |
---|
876 | //La conversion pointe vers une transformation |
---|
877 | result=treat_cbn(file_trf_id, sel_tpl_id, count,origin_unit,sel_unit_ord,req); |
---|
878 | spl=(new stringSplit()).split(result,"%"); |
---|
879 | varY=spl[0]; |
---|
880 | Ytransfo=spl[1]; |
---|
881 | AUY0transfo=spl[2]; |
---|
882 | AUY1transfo=spl[3]; |
---|
883 | count=Integer.parseInt(spl[4]); |
---|
884 | more_varid+=spl[5]; |
---|
885 | }else { |
---|
886 | sel_unit_ord=file_unit_ord; |
---|
887 | Ytransfo="t999,999,999"; |
---|
888 | } |
---|
889 | } |
---|
890 | }else{ |
---|
891 | // PAS DE TRANSFORMATION MAIS PEUT-ETRE UNE CONVERSION |
---|
892 | nature_ord=file_nature_ord; |
---|
893 | //varY=",{variable:'"+ordonnee+"', nature:'"+nature_ord+"', subvariable:'"+sspar_ordonnee+"', unite:'"+sel_unit_ord+"'}"; |
---|
894 | varY=ordonnee+","+nature_ord+","+sspar_ordonnee+","+sel_unit_ord; |
---|
895 | if( !file_unit_ord.equals(sel_unit_ord) ){ |
---|
896 | ids=get_conv("acr", file_unit_ord, sel_unit_ord,req); |
---|
897 | cnv_id=(new stringSplit()).split(ids,"%")[0]; |
---|
898 | trf_id=(new stringSplit()).split(ids,"%")[1]; |
---|
899 | |
---|
900 | //EST-CE UNE CONVERSION OU/ET UNE TRANSFORMATION (EN ORDONNEE TRANFO OU COMBINEE PEUVENT |
---|
901 | //AVOIR LIEU |
---|
902 | if( !trf_id.equals("999") ){ |
---|
903 | //LA CONVERSION POINTE VERS UNE TRANSFORMATION |
---|
904 | result=treat_trf(trf_id, sel_tpl_id, count, "", sel_unit_ord,false,true,req); |
---|
905 | spl=(new stringSplit()).split(result,"%"); |
---|
906 | varY=spl[0]; |
---|
907 | Ytransfo=spl[1]; |
---|
908 | AUY0transfo=spl[2]; |
---|
909 | AUY1transfo=spl[3]; |
---|
910 | count=Integer.parseInt(spl[4]); |
---|
911 | more_varid+=spl[5]; |
---|
912 | } |
---|
913 | else if( !cnv_id.equals("-1") ){ |
---|
914 | //C'EST UNE CONVERSION SIMPLE |
---|
915 | Ytransfo="conv"+cnv_id+",999,999"; |
---|
916 | |
---|
917 | }else{ |
---|
918 | sel_unit_ord=file_unit_ord; |
---|
919 | Ytransfo="t999,999,999"; |
---|
920 | } |
---|
921 | }else{ |
---|
922 | Ytransfo="t999,999,999"; |
---|
923 | } |
---|
924 | } |
---|
925 | |
---|
926 | } |
---|
927 | |
---|
928 | TRANSFO=""; |
---|
929 | TRANSFO+=Xtransfo+"&"+Ytransfo; |
---|
930 | if( !AUX0transfo.equals("") )TRANSFO+="&"+AUX0transfo; |
---|
931 | if( !AUX1transfo.equals("") )TRANSFO+="&"+AUX1transfo; |
---|
932 | if( !AUY0transfo.equals("") )TRANSFO+="&"+AUY0transfo; |
---|
933 | if( !AUY1transfo.equals("") )TRANSFO+="&"+AUY1transfo; |
---|
934 | } |
---|
935 | |
---|
936 | //if (!afficheTrace.equals("null") && afficheTrace.equals("1")) { |
---|
937 | nfile=-1; |
---|
938 | if (isParAbs && sel_par_abs!=null) { |
---|
939 | sel_par=""; |
---|
940 | if (sel_par_abs!=null) sel_par=(new stringSplit()).split(sel_par_abs,"%")[0]; |
---|
941 | //DETERMINATION DES BORNES SPATIO-TEMPROELLES |
---|
942 | if ((sel_mindate==null || sel_mindate.equals("") || sel_mindate.equals("null") |
---|
943 | || sel_maxdate==null || sel_maxdate.equals("") || sel_maxdate.equals("null") |
---|
944 | || lonmin==null || lonmin.equals("") || lonmin.equals("null") |
---|
945 | || lonmax==null || lonmax.equals("") || lonmax.equals("null") |
---|
946 | || latmin==null || latmin.equals("") || latmin.equals("null") |
---|
947 | || latmax==null || latmax.equals("") || latmax.equals("null")) |
---|
948 | && sel_exp_id!=null && sel_sspar_abs!=null) { |
---|
949 | |
---|
950 | sql="SELECT min(eth_first_date) as mindate, max(eth_last_date) as maxdate,min(eth_lon_min) as lonmin"; |
---|
951 | sql+=",max(eth_lon_max) as lonmax,min(eth_lat_min) as latmin, max(eth_lat_max) as latmax "; |
---|
952 | sql+="FROM ether.ether_file where (eth_id_experiment="+sel_exp_id; |
---|
953 | sql+=" or eth_id_experiment=(select exp_id from ether.dcp_file_class where associate="+sel_tpl_id+")) "; |
---|
954 | sql+=" and (eth_subparameter='"+sel_sspar_abs+"' or eth_subparameter='.') and eth_parameter='"+sel_par+"'"; |
---|
955 | al1=req.get_list(sql,cols); |
---|
956 | if(al1!=null && al1.size()>0) { |
---|
957 | |
---|
958 | if (sel_mindate==null || sel_mindate.equals("") || sel_mindate.equals("null")) { |
---|
959 | mindate_ms=Long.parseLong(al1.get(0).toString()); |
---|
960 | DSMinDate=(new calDate(mindate_ms)).date_cal; |
---|
961 | } |
---|
962 | else { |
---|
963 | DSMinDate=sel_mindate; |
---|
964 | mindate_ms=(new calDate()).invers(sel_mindate); |
---|
965 | } |
---|
966 | |
---|
967 | if (sel_maxdate==null || sel_maxdate.equals("") || sel_maxdate.equals("null")) { |
---|
968 | maxdate_ms=Long.parseLong(al1.get(1).toString()); |
---|
969 | DSMaxDate=(new calDate(maxdate_ms)).date_cal; |
---|
970 | } |
---|
971 | else { |
---|
972 | DSMaxDate=sel_maxdate; |
---|
973 | maxdate_ms=(new calDate()).invers(sel_maxdate); |
---|
974 | } |
---|
975 | if (lonmin==null || lonmin.equals("") || lonmin.equals("null")) lonmin=al1.get(2).toString(); |
---|
976 | if (lonmax==null || lonmax.equals("") || lonmax.equals("null")) lonmax=al1.get(3).toString(); |
---|
977 | |
---|
978 | if (latmin==null || latmin.equals("") || latmin.equals("null")) latmin=al1.get(4).toString(); |
---|
979 | if (latmax==null || latmax.equals("") || latmax.equals("null")) latmax=al1.get(5).toString(); |
---|
980 | |
---|
981 | DSMinDate_file=DSMinDate; |
---|
982 | DSMaxDate_file=DSMaxDate; |
---|
983 | lonmin_file=lonmin; |
---|
984 | lonmax_file=lonmax; |
---|
985 | latmin_file=latmin; |
---|
986 | latmax_file=latmax; |
---|
987 | |
---|
988 | } |
---|
989 | } |
---|
990 | else if (sel_mindate!=null && sel_maxdate!=null) { |
---|
991 | DSMinDate=sel_mindate; |
---|
992 | DSMaxDate=sel_maxdate; |
---|
993 | mindate_ms=(new calDate()).invers(sel_mindate); |
---|
994 | maxdate_ms=(new calDate()).invers(sel_maxdate); |
---|
995 | } |
---|
996 | } |
---|
997 | |
---|
998 | |
---|
999 | sel_file=""; |
---|
1000 | // LISTE DES FICHIERS disponibles |
---|
1001 | file_list=null; |
---|
1002 | nfile=0; |
---|
1003 | |
---|
1004 | sql="select is_batch from sil_experiment_attribut where exp_id='"+sel_exp_id+"'"; |
---|
1005 | batch_list=req.get_list(sql,batch_columns); |
---|
1006 | //mode batch |
---|
1007 | if (batch_list==null || batch_list.size()==0) is_batch="0"; |
---|
1008 | else { |
---|
1009 | nreq=batch_list.size()/batch_columns.length; |
---|
1010 | if( nreq>0 ){ |
---|
1011 | k=0; |
---|
1012 | is_batch=batch_list.get(k).toString(); |
---|
1013 | } |
---|
1014 | } |
---|
1015 | |
---|
1016 | |
---|
1017 | if (sel_exp_public.equals("1")) { |
---|
1018 | is_private="1"; |
---|
1019 | private_data_flag="1"; |
---|
1020 | } |
---|
1021 | else { |
---|
1022 | is_private="0"; |
---|
1023 | private_data_flag="0"; |
---|
1024 | } |
---|
1025 | |
---|
1026 | |
---|
1027 | if (is_private.equals("1")) { |
---|
1028 | if (is_batch.equals("0")) { |
---|
1029 | droit="1"; |
---|
1030 | modei="none"; |
---|
1031 | } |
---|
1032 | else { |
---|
1033 | modei="email"; |
---|
1034 | if (cemail.equals("") || cemail.equals("null")) droit="0"; |
---|
1035 | else droit="1"; |
---|
1036 | } |
---|
1037 | download_auth="0"; |
---|
1038 | } |
---|
1039 | |
---|
1040 | |
---|
1041 | if (is_private.equals("0")) { |
---|
1042 | modei="loginu"; |
---|
1043 | |
---|
1044 | if (onlydata.equals("1")) { |
---|
1045 | //out.write("onlydata<br>"); |
---|
1046 | download_auth="1"; |
---|
1047 | droit="1"; |
---|
1048 | rightTexte="Only data"; |
---|
1049 | } |
---|
1050 | else { |
---|
1051 | if (is_batch.equals("1")) { |
---|
1052 | //out.write("mode _batch<br>"); |
---|
1053 | if (!cemail.equals("") && !cemail.equals("null")) { |
---|
1054 | download_auth="1"; |
---|
1055 | email=cemail; |
---|
1056 | droit="1"; |
---|
1057 | continuer="0"; |
---|
1058 | //out.write("email seul<br>"); |
---|
1059 | } |
---|
1060 | else continuer="1"; |
---|
1061 | } |
---|
1062 | else continuer="1"; |
---|
1063 | |
---|
1064 | if (continuer.equals("1")) { |
---|
1065 | |
---|
1066 | //out.write("continuer<br>"); |
---|
1067 | if (!login.equals("") && !passu.equals("")) { |
---|
1068 | //out.write("auth<br>"); |
---|
1069 | |
---|
1070 | //recherche donnees utilisateur |
---|
1071 | sql="select id,email,name,first_name from ether_user where login='"+login+"' and password='"+passu+"'"; |
---|
1072 | user_list=req.get_list(sql,user_columns); |
---|
1073 | |
---|
1074 | if (user_list==null || user_list.size()==0) { |
---|
1075 | droit="0"; |
---|
1076 | //out.write("personne dans la base<br>"); |
---|
1077 | login=""; |
---|
1078 | passu=""; |
---|
1079 | lance="0"; |
---|
1080 | name="Login non-existent in Ether base"; |
---|
1081 | modei="err"; |
---|
1082 | //email=""; |
---|
1083 | //first_name=""; |
---|
1084 | |
---|
1085 | } |
---|
1086 | else{ |
---|
1087 | //out.write("ok1<br>"); |
---|
1088 | nreq=user_list.size()/user_columns.length; |
---|
1089 | if( nreq>0 ){ |
---|
1090 | k=0; |
---|
1091 | //out.write("ok2<br>"); |
---|
1092 | userid=user_list.get(k).toString(); |
---|
1093 | email=user_list.get(k+1).toString(); |
---|
1094 | name=user_list.get(k+2).toString(); |
---|
1095 | first_name=user_list.get(k+3).toString(); |
---|
1096 | |
---|
1097 | |
---|
1098 | //if (email.equals("") || email.equals("null")) email=group_list.get(k+1).toString(); |
---|
1099 | //out.write("email base= "+email+"<br>"); |
---|
1100 | } |
---|
1101 | |
---|
1102 | } |
---|
1103 | |
---|
1104 | |
---|
1105 | //recherche group_id de l'experience |
---|
1106 | sql="select eri_group_id from ether_experiment_right where eri_experiment_id='"+sel_exp_id+"'"; |
---|
1107 | group_list=req.get_list(sql,group_columns); |
---|
1108 | |
---|
1109 | if (group_list==null || group_list.size()==0) { |
---|
1110 | //out.write("impossible recup group<br>"); |
---|
1111 | } |
---|
1112 | else{ |
---|
1113 | nreq=group_list.size()/group_columns.length; |
---|
1114 | if( nreq>0 ){ |
---|
1115 | k=0; |
---|
1116 | group=group_list.get(k).toString(); |
---|
1117 | //out.write("group exp="+group+"<br>"); |
---|
1118 | } |
---|
1119 | |
---|
1120 | } |
---|
1121 | |
---|
1122 | //recherche droit utilisateur |
---|
1123 | sql="select id from ether_group_user where user_id='"+userid+"' and group_id='"+group+"'"; |
---|
1124 | priv_list=req.get_list(sql,priv_columns); |
---|
1125 | |
---|
1126 | if (priv_list==null || priv_list.size()==0) { |
---|
1127 | download_auth="1"; |
---|
1128 | //out.write("pas droit pour l'utilis. sur ce groupe"); |
---|
1129 | login=""; |
---|
1130 | passu=""; |
---|
1131 | //name=""; |
---|
1132 | //first_name=""; |
---|
1133 | } |
---|
1134 | else{ |
---|
1135 | nreq=priv_list.size()/priv_columns.length; |
---|
1136 | if( nreq>0 ){ |
---|
1137 | droit="1"; |
---|
1138 | download_auth="0"; |
---|
1139 | //out.write("droit OK pour l'utilis. sur ce groupe"); |
---|
1140 | } |
---|
1141 | else { |
---|
1142 | download_auth="1"; |
---|
1143 | // out.write("no download"); |
---|
1144 | } |
---|
1145 | |
---|
1146 | } |
---|
1147 | |
---|
1148 | } |
---|
1149 | droit="1"; |
---|
1150 | } |
---|
1151 | if (download_auth.equals("0")) rightTexte="Data and download"; |
---|
1152 | else rightTexte="Only data"; |
---|
1153 | |
---|
1154 | } |
---|
1155 | |
---|
1156 | } |
---|
1157 | |
---|
1158 | if (download_auth.equals("0")) rightTexte="Data and download"; |
---|
1159 | else rightTexte="Only data"; |
---|
1160 | |
---|
1161 | |
---|
1162 | if (is_batch.equals("1")) modeTexte="BATCH"; |
---|
1163 | else modeTexte="DIRECT"; |
---|
1164 | |
---|
1165 | if (ftitle==null || ftitle.equals("") || ftitle.equals("null")) { |
---|
1166 | ftitle=sel_tpl_name; |
---|
1167 | if (!observation_height.equals("")) ftitle+=" - "+observation_height+" "+sel_unit_ord+" ("+par_observation_height+")"; |
---|
1168 | } |
---|
1169 | |
---|
1170 | if (colour_bar_title==null || colour_bar_title.equals("") || colour_bar_title.equals("null")) { |
---|
1171 | colour_bar_title=form_legend; |
---|
1172 | |
---|
1173 | } |
---|
1174 | |
---|
1175 | if (droit.equals("1") && !afficheTrace.equals("null") && afficheTrace.equals("1")) { |
---|
1176 | //out.write("droit="+droit); |
---|
1177 | // if (is_batch.equals("1")) mode="BATCH"; |
---|
1178 | // else mode="DIRECT"; |
---|
1179 | |
---|
1180 | sql="select * from ether.ether_file,ether.dcp_file_class file_class "; |
---|
1181 | sql+="where eth_id_experiment=exp_id "; |
---|
1182 | sql+="and eth_dataset_version=set_dataset_version "; |
---|
1183 | sql+="and eth_ceos_level=set_ceos_level "; |
---|
1184 | sql+="and eth_ceos_sublevel=set_ceos_sublevel "; |
---|
1185 | sql+="and eth_format=set_format and "; |
---|
1186 | sql+="eth_id_experiment=exp_id and eth_id_experiment="+sel_exp_id; |
---|
1187 | sql+=" and (eth_subparameter='"+sel_sspar_abs+"' "; |
---|
1188 | sql+=" or eth_subparameter='.') "; |
---|
1189 | sql+=" and eth_parameter='"+file_par_abs+"' and associate=-1 "; |
---|
1190 | sql+=" and eth_dataset_version='"+sel_version+"' "; |
---|
1191 | sql+=" and eth_ceos_level='"+sel_level+"' "; |
---|
1192 | sql+=" and eth_ceos_sublevel='"+sel_sublevel+"' "; |
---|
1193 | sql+=" and eth_format='"+sel_format+"' and "; |
---|
1194 | sql+=" (eth_last_date>="+mindate_ms+" and eth_first_date<="+maxdate_ms+") "; |
---|
1195 | sql+="and (eth_lon_max>="+lonmin+" and eth_lon_min<="+lonmax+") and (eth_lat_max>="+latmin+" and eth_lat_min<="+latmax+") "; |
---|
1196 | |
---|
1197 | |
---|
1198 | |
---|
1199 | file_list=req.get_list(sql,file_columns2); |
---|
1200 | |
---|
1201 | if (file_list==null || file_list.size()==0) { |
---|
1202 | out.write("<script>alert('No experiment files found for this selection');</script>"); |
---|
1203 | isFile=false; |
---|
1204 | }else{ |
---|
1205 | isFile=true; |
---|
1206 | nfile=file_list.size()/file_columns2.length; |
---|
1207 | if( nfile>0 ){ |
---|
1208 | if (is_batch.equals("1")) mode="BATCH"; |
---|
1209 | else mode="DIRECT"; |
---|
1210 | k=0; |
---|
1211 | for(i=0;i<nfile;i++){ |
---|
1212 | sel_file+=file_list.get(k+2)+","+file_list.get(k+5)+","+file_list.get(k+6)+","+file_list.get(k+7); |
---|
1213 | sel_file+=","+file_list.get(k+8)+"&"; |
---|
1214 | k+=file_columns2.length; |
---|
1215 | } |
---|
1216 | } |
---|
1217 | |
---|
1218 | } |
---|
1219 | |
---|
1220 | |
---|
1221 | |
---|
1222 | pageMode=""; |
---|
1223 | |
---|
1224 | if (sel_tpl_id!=null && !sel_tpl_id.equals("") && isFile==true) { |
---|
1225 | pageMode=""; |
---|
1226 | reader=file_reader(sel_tpl_id,req); |
---|
1227 | if (sel_file!=null && !sel_file.equals("")) { |
---|
1228 | files=sel_file; |
---|
1229 | varid="[{variable:'"+file_par_abs+"', nature:'"+file_nature_abs+"', subvariable:'"+sel_sspar_abs+"', unite:'"+sel_unit_abs+"'}"+varY; |
---|
1230 | varid+=more_varid; |
---|
1231 | varid+="]"; |
---|
1232 | |
---|
1233 | typeOrdonnee=file_par_ord; |
---|
1234 | //nXnature=occurence(varid, "nature:"); |
---|
1235 | //nXtransfo=occurence(TRANSFO, "ptr_new"); |
---|
1236 | |
---|
1237 | //if( nXtransfo!=nXnature ){ |
---|
1238 | // TRANSFO=TRANSFO.substring(0,TRANSFO.length()-1)+",ptr_new([{nom:'t999',aux1:999,aux2:999}])]"; |
---|
1239 | // } |
---|
1240 | |
---|
1241 | reader_param_varid=file_par_abs+","+file_nature_abs+","+sel_sspar_abs+","+sel_unit_abs; |
---|
1242 | reader_param_varid+="&"; |
---|
1243 | reader_param_varid+=varY+more_varid; |
---|
1244 | |
---|
1245 | //reader_param_varid+=file_par_ord+","+file_nature_ord+",none,"+sel_unit_ord; |
---|
1246 | //xtitle=file_par_abs+" - "+file_nature_abs+" ("+sel_unit_abs+")"; |
---|
1247 | //ytitle=file_par_ord+" - "+file_nature_ord+" ("+sel_unit_ord+")"; |
---|
1248 | |
---|
1249 | |
---|
1250 | tt=(new stringSplit()).split(files,"&"); |
---|
1251 | len=tt.length; |
---|
1252 | if( tt[len-1].equals("")) len=len-1; |
---|
1253 | filename=new String[len]; |
---|
1254 | auxfile=new String[len]; |
---|
1255 | infofile=""; |
---|
1256 | |
---|
1257 | //out.write(sel_tpl_id); |
---|
1258 | |
---|
1259 | for(i=0; i<len;i++){ |
---|
1260 | filename[i]=(new stringSplit()).split(tt[i],",")[0]; |
---|
1261 | tab_file_name+="/doc/data"+filename[i]; |
---|
1262 | if( i<len-1 )tab_file_name+=","; |
---|
1263 | |
---|
1264 | |
---|
1265 | assoc=scanAssociates("info",sel_tpl_id,filename[i],req); |
---|
1266 | if( assoc!=null && assoc.length>0 ){ |
---|
1267 | infofile+=assoc[0]; |
---|
1268 | }else{ |
---|
1269 | infofile+="none"; |
---|
1270 | } |
---|
1271 | |
---|
1272 | if (i<len-1) infofile+=","; |
---|
1273 | |
---|
1274 | /////////////////////////////////////////////// |
---|
1275 | assoc=scanAssociates("paramaux",sel_tpl_id,filename[i],req); |
---|
1276 | if( assoc!=null && assoc.length>0 ){ |
---|
1277 | //out.write("load"); |
---|
1278 | for(int p=0;p<assoc.length;p++){ |
---|
1279 | |
---|
1280 | reponse=(new stringSplit()).split(assoc[p],"%"); |
---|
1281 | nomfile=reponse[0]; |
---|
1282 | nomvariable=reponse[1]; |
---|
1283 | nomsubvariable=reponse[2]; |
---|
1284 | src=reponse[3]; |
---|
1285 | |
---|
1286 | /*tab_paux="{nomfile:'"+nomfile+"',"; |
---|
1287 | tab_paux+=" nomvariable:'"+nomvariable+"',"; |
---|
1288 | tab_paux+=" nomsubvariable:'"+nomsubvariable+"',"; |
---|
1289 | tab_paux+=" nomnature:'"+src+"'"; |
---|
1290 | nassoc=scanAssociates("info",sel_tpl_id,(new File(nomfile)).getName(),req); |
---|
1291 | if (nassoc!=null && nassoc.length>0) tab_paux+=",nominfo:'"+nassoc[0]+"'"; |
---|
1292 | tab_paux+="}"; |
---|
1293 | auxstruct+=tab_paux; |
---|
1294 | if( p<assoc.length-1 )auxstruct+="#";*/ |
---|
1295 | |
---|
1296 | tab_paux=nomfile+","; |
---|
1297 | tab_paux+=nomvariable+","; |
---|
1298 | tab_paux+=nomsubvariable+","; |
---|
1299 | tab_paux+=src; |
---|
1300 | nassoc=scanAssociates("info",sel_tpl_id,(new File(nomfile)).getName(),req); |
---|
1301 | if (nassoc!=null && nassoc.length>0) tab_paux+=","+nassoc[0]; |
---|
1302 | else tab_paux+=",."; |
---|
1303 | |
---|
1304 | auxstruct+=tab_paux; |
---|
1305 | if( p<assoc.length-1 )auxstruct+="&"; |
---|
1306 | |
---|
1307 | } |
---|
1308 | } |
---|
1309 | else{ |
---|
1310 | tab_paux="none,"; |
---|
1311 | tab_paux+="none,"; |
---|
1312 | tab_paux+="none,"; |
---|
1313 | tab_paux+="none,"; |
---|
1314 | tab_paux+="."; |
---|
1315 | auxstruct+=tab_paux; |
---|
1316 | isParamaux=false; |
---|
1317 | } |
---|
1318 | |
---|
1319 | if (i<len-1) auxstruct+="@"; |
---|
1320 | |
---|
1321 | } |
---|
1322 | } |
---|
1323 | |
---|
1324 | /**************************CREATION FICHIER XML*********************************************/ |
---|
1325 | |
---|
1326 | structureXML docXML = new structureXML(); |
---|
1327 | |
---|
1328 | docXML.id_session=id_session; |
---|
1329 | docXML.uniqueid=uniqueid; |
---|
1330 | docXML.mode=mode; |
---|
1331 | |
---|
1332 | docXML.private_data_flag=private_data_flag; |
---|
1333 | docXML.download_auth=download_auth; |
---|
1334 | docXML.flag_extrapolate_auth=flag_extrapolate_auth; |
---|
1335 | |
---|
1336 | docXML._1d_interpolator_method=_1d_interpolator_method; |
---|
1337 | docXML._1d_spacing=_1d_spacing; |
---|
1338 | docXML._1d_Nmax=_1d_Nmax; |
---|
1339 | docXML._1d_Nmin=_1d_Nmin; |
---|
1340 | |
---|
1341 | docXML.irreg_grid_method=irreg_grid_method; |
---|
1342 | docXML.reg_grid_method=reg_grid_method; |
---|
1343 | docXML._2d_xspacing=_2d_xspacing; |
---|
1344 | docXML._2d_yspacing=_2d_yspacing; |
---|
1345 | docXML._2d_NXmax=_2d_NXmax; |
---|
1346 | docXML._2d_NXmin=_2d_NXmin; |
---|
1347 | docXML._2d_NYmax=_2d_NYmax; |
---|
1348 | docXML._2d_NYmin=_2d_NYmin; |
---|
1349 | docXML.flag_validity_mask=flag_validity_mask; |
---|
1350 | |
---|
1351 | if (file_type_abs.equals("densite")) { |
---|
1352 | densite="1"; |
---|
1353 | docXML.profil_flag="1"; |
---|
1354 | } |
---|
1355 | else docXML.profil_flag="0"; |
---|
1356 | |
---|
1357 | docXML.densite=densite; |
---|
1358 | |
---|
1359 | docXML.experiment_name=sel_tpl_name; |
---|
1360 | |
---|
1361 | docXML.plot_type=graph_sel; |
---|
1362 | docXML.reader=reader; |
---|
1363 | docXML.tab_file=tab_file_name; |
---|
1364 | docXML.tab_infofile=infofile; |
---|
1365 | |
---|
1366 | docXML.mindate=DSMinDate; |
---|
1367 | docXML.maxdate=DSMaxDate; |
---|
1368 | docXML.latmin=latmin; |
---|
1369 | docXML.latmax=latmax; |
---|
1370 | docXML.lonmin=lonmin; |
---|
1371 | docXML.lonmax=lonmax; |
---|
1372 | |
---|
1373 | docXML.observation_height=observation_height; |
---|
1374 | docXML.num_version=sel_version; |
---|
1375 | docXML.map_projection=map_projection; |
---|
1376 | |
---|
1377 | docXML.hemisphere=hemisphere; |
---|
1378 | |
---|
1379 | docXML.title=ftitle; |
---|
1380 | docXML.sub_title=ftitle; |
---|
1381 | |
---|
1382 | docXML.colour_bar_title=colour_bar_title; |
---|
1383 | docXML.map_information_level=map_information_level; |
---|
1384 | docXML.map_filling=map_filling; |
---|
1385 | docXML.map_axes_type=map_axes_type; |
---|
1386 | docXML.grid_linestyle=grid_linestyle; |
---|
1387 | docXML.latitude_posting=latitude_posting; |
---|
1388 | docXML.longitude_posting=longitude_posting; |
---|
1389 | docXML.colour_bar_grid=colour_bar_grid; |
---|
1390 | docXML.colour_bar_nb_value=colour_bar_nb_value; |
---|
1391 | |
---|
1392 | docXML.auxstruct=auxstruct; |
---|
1393 | |
---|
1394 | docXML.read_param_varid=reader_param_varid; |
---|
1395 | |
---|
1396 | docXML.parameter_name=form_par_abs; |
---|
1397 | docXML.vertical_scale_name=file_par_ord; |
---|
1398 | |
---|
1399 | docXML.vertical_scale_unit=sel_unit_ord; |
---|
1400 | docXML.parameter_unit=sel_unit_abs; |
---|
1401 | docXML.sub_parameter=form_sspar_abs; |
---|
1402 | |
---|
1403 | docXML.xvariable=file_par_abs; |
---|
1404 | docXML.xnature=file_nature_abs; |
---|
1405 | if (sel_sspar_abs.equals(".")) docXML.xsubvariable="none"; |
---|
1406 | else docXML.xsubvariable=sel_sspar_abs; |
---|
1407 | docXML.xunite=sel_unit_abs; |
---|
1408 | |
---|
1409 | //out.write(contour_default_colour_flag); |
---|
1410 | //contour_default_colour_flag="1"; |
---|
1411 | |
---|
1412 | docXML.contour_display_mode=contour_display_mode; |
---|
1413 | docXML.contour_default_colour_flag=contour_default_colour_flag; |
---|
1414 | docXML.contour_default_colour=contour_default_colour; |
---|
1415 | docXML.contour_default_linestyle=contour_default_linestyle; |
---|
1416 | docXML.contour_default_line_thickness=contour_default_line_thickness; |
---|
1417 | docXML.contour_default_label_flag=contour_default_label_flag; |
---|
1418 | |
---|
1419 | if (graph_sel.equals("13") && contour_default_colour_flag.equals("0")) { |
---|
1420 | if (contour_display_mode.equals("0")) { |
---|
1421 | if (contour_default_colour_flag.equals("0") && contour_default_colour.equals("0,0,0")) { |
---|
1422 | docXML.idl_colour_table_id=""; |
---|
1423 | docXML.contour_default_colour_flag="1"; |
---|
1424 | } |
---|
1425 | else { |
---|
1426 | docXML.default_linecolour=contour_default_colour; |
---|
1427 | } |
---|
1428 | } |
---|
1429 | else { |
---|
1430 | docXML.idl_colour_table_id=""; |
---|
1431 | docXML.contour_default_colour_flag="1"; |
---|
1432 | } |
---|
1433 | |
---|
1434 | } |
---|
1435 | else if ((graph_sel.equals("3") && dot_plot_colour_flag.equals("1")) || (graph_sel.equals("13") && contour_default_colour_flag.equals("1"))) { |
---|
1436 | //out.write("<br>definition couleur"); |
---|
1437 | docXML.idl_colour_table_id=idl_colour_table_id; |
---|
1438 | |
---|
1439 | if (!imported_colour_table.equals("") && !imported_colour_table.equals("null") && imported_colour_table!="" && imported_colour_table!=null) |
---|
1440 | { |
---|
1441 | docXML.imported_colour_table=imported_colour_table; |
---|
1442 | } |
---|
1443 | |
---|
1444 | docXML.val_min_bd=val_min_bd; |
---|
1445 | docXML.val_max_bd=val_max_bd; |
---|
1446 | docXML.unite_bd=unite_bd; |
---|
1447 | |
---|
1448 | } |
---|
1449 | |
---|
1450 | sql="SELECT mt_id "; |
---|
1451 | sql+="FROM sil_type_trace WHERE tt_id="+graph_sel; |
---|
1452 | file_list=null; |
---|
1453 | file_list=req.get_list(sql,metat_columns); |
---|
1454 | |
---|
1455 | if (file_list==null || file_list.size()==0) { |
---|
1456 | }else{ |
---|
1457 | nfile=file_list.size()/metat_columns.length; |
---|
1458 | if (nfile>0) { |
---|
1459 | k=0; |
---|
1460 | docXML.meta_type=file_list.get(k).toString(); |
---|
1461 | } |
---|
1462 | } |
---|
1463 | |
---|
1464 | docXML.transfo=TRANSFO; |
---|
1465 | |
---|
1466 | docXML.dot_plot_dot_style=dot_plot_dot_style; |
---|
1467 | if (dot_plot_colour_flag.equals("0")) docXML.dot_plot_colour_flag="1"; |
---|
1468 | else docXML.dot_plot_colour_flag=dot_plot_colour_flag; |
---|
1469 | |
---|
1470 | docXML.dot_plot_dotcolour=dot_plot_dotcolour; |
---|
1471 | docXML.dot_plot_dotsize=dot_plot_dotsize; |
---|
1472 | |
---|
1473 | if (levels.equals("1") && !userLevels.equals("") && !userLevels.equals("null")) { |
---|
1474 | docXML.userLevels=userLevels; |
---|
1475 | docXML.contour_level_setting_mode=levels; |
---|
1476 | } |
---|
1477 | else { |
---|
1478 | docXML.userLevels=""; |
---|
1479 | docXML.contour_level_setting_mode="0"; |
---|
1480 | } |
---|
1481 | |
---|
1482 | |
---|
1483 | |
---|
1484 | String ret=docXML.generate(); |
---|
1485 | if (mode.equals("BATCH")) { |
---|
1486 | pageMode="lanceEnTacheDeFond.jsp"; |
---|
1487 | if (!login.equals("") && !passu.equals("")) { |
---|
1488 | chainePageMode="?id="+id_session+"&uniqueid="+uniqueid+"&mode="+mode+"&email="+email; |
---|
1489 | } |
---|
1490 | else { |
---|
1491 | chainePageMode="?id="+id_session+"&uniqueid="+uniqueid+"&mode="+mode+"&email="+cemail; |
---|
1492 | } |
---|
1493 | } |
---|
1494 | else { |
---|
1495 | pageMode="lanceAppletEtherVisu.html"; |
---|
1496 | chainePageMode="?id="+id_session+"&uniqueid="+uniqueid+"&mode="+mode+"&email="; |
---|
1497 | } |
---|
1498 | |
---|
1499 | } |
---|
1500 | } |
---|
1501 | |
---|
1502 | |
---|
1503 | par_options_abs="<option class=selection value=''> </option>"+par_options_abs; |
---|
1504 | |
---|
1505 | par_options_abs0+="<option class=selection value=''> </option>"; |
---|
1506 | |
---|
1507 | par_options_ord="<option class=selection value=''> </option>"+par_options_ord; |
---|
1508 | |
---|
1509 | unit_options_abs="<option class=selection value=''> </option>"+unit_options_abs; |
---|
1510 | |
---|
1511 | //if (sspar_options.equals("") || sspar_options.equals("null") || sspar_options=="" || sspar_options==null) sspar_options="<OPTION class=selection VALUE=\".\" selected>None</OPTION>"; |
---|
1512 | |
---|
1513 | sspar_options+="<option class=selection value=''> </option>"; |
---|
1514 | |
---|
1515 | unit_options_ord+="<option class=selection value=''> </option>"; |
---|
1516 | |
---|
1517 | |
---|
1518 | req.close_connection(); |
---|
1519 | %> |
---|
1520 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
---|
1521 | <html> |
---|
1522 | <head> |
---|
1523 | <meta http-equiv="pragma" content="no-cache"> |
---|
1524 | <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
---|
1525 | <title>Visualisation V3</title> |
---|
1526 | <link rel="stylesheet" href="etherTypo.css" type="text/css"> |
---|
1527 | <script language="Javascript"> |
---|
1528 | //<!-- |
---|
1529 | var longdate=""; |
---|
1530 | var regExpEmpty=/^(\s)*$/g; |
---|
1531 | |
---|
1532 | function updateCreation(f,ib,pm,cpm) { |
---|
1533 | |
---|
1534 | parent.crea2.document.file_type_abs.value='12'; |
---|
1535 | |
---|
1536 | |
---|
1537 | } |
---|
1538 | |
---|
1539 | function lancerMode(page,chainePage) { |
---|
1540 | Newfen(page+chainePage,'Visualisation_V3','800','800'); |
---|
1541 | |
---|
1542 | return true; |
---|
1543 | |
---|
1544 | } |
---|
1545 | |
---|
1546 | function blocForm() { |
---|
1547 | document.thisForm.submit(); |
---|
1548 | |
---|
1549 | document.thisForm.sel_tpl_id.disabled=true; |
---|
1550 | document.thisForm.sel_par_abs.disabled=true; |
---|
1551 | document.thisForm.sel_unit_abs.disabled=true; |
---|
1552 | document.thisForm.sel_sspar_abs.disabled=true; |
---|
1553 | if (document.thisForm.sel_par_ord) { |
---|
1554 | document.thisForm.sel_par_ord.disabled=true; |
---|
1555 | document.thisForm.sel_unit_ord.disabled=true; |
---|
1556 | } |
---|
1557 | document.thisForm.latmin.disabled=true; |
---|
1558 | document.thisForm.latmax.disabled=true; |
---|
1559 | document.thisForm.lonmin.disabled=true; |
---|
1560 | document.thisForm.lonmax.disabled=true; |
---|
1561 | document.thisForm.mindate.disabled=true; |
---|
1562 | document.thisForm.maxdate.disabled=true; |
---|
1563 | document.thisForm.observation_height.disabled=true; |
---|
1564 | document.thisForm.ftitle.disabled=true; |
---|
1565 | document.thisForm.colour_bar_title.disabled=true; |
---|
1566 | |
---|
1567 | |
---|
1568 | } |
---|
1569 | |
---|
1570 | function updateLegend() { |
---|
1571 | document.thisForm.colour_bar_title.value=""; |
---|
1572 | |
---|
1573 | abs=document.thisForm.form_par_abs.value; |
---|
1574 | unit=document.thisForm.sel_unit_abs.value; |
---|
1575 | |
---|
1576 | legend=abs+' ('+unit+')'; |
---|
1577 | |
---|
1578 | document.thisForm.colour_bar_title.value=legend; |
---|
1579 | |
---|
1580 | return true; |
---|
1581 | |
---|
1582 | } |
---|
1583 | |
---|
1584 | |
---|
1585 | function updateTitle() { |
---|
1586 | document.thisForm.ftitle.value=""; |
---|
1587 | oh=document.thisForm.observation_height.value; |
---|
1588 | |
---|
1589 | exp=document.thisForm.sel_tpl_name.value; |
---|
1590 | mid=document.thisForm.mindate.value; |
---|
1591 | mad=document.thisForm.maxdate.value; |
---|
1592 | par_observation_height=document.thisForm.par_observation_height.value; |
---|
1593 | sel_unit_ord=document.thisForm.sel_unit_ord.value; |
---|
1594 | |
---|
1595 | tt=exp; |
---|
1596 | |
---|
1597 | if (oh!='' && !matchRegExp(oh, regExpEmpty)) tt=tt+' - '+oh+' '+sel_unit_ord+' ('+par_observation_height+')'; |
---|
1598 | document.thisForm.ftitle.value=tt; |
---|
1599 | |
---|
1600 | return true; |
---|
1601 | |
---|
1602 | } |
---|
1603 | |
---|
1604 | |
---|
1605 | function testLoad(type_abs,is_batch,page,chainePage) { |
---|
1606 | if (document.thisForm.pageMode.value!='') { |
---|
1607 | //alert(page+' '+chainePage+'pageMode='+pageMode); |
---|
1608 | lancerMode(page,chainePage); |
---|
1609 | |
---|
1610 | } |
---|
1611 | else if (document.thisForm.lance.value=='1') lancerTrace(type_abs,is_batch); |
---|
1612 | |
---|
1613 | return true; |
---|
1614 | |
---|
1615 | } |
---|
1616 | |
---|
1617 | function changeEmail(is_batch) { |
---|
1618 | if (document.thisForm.modei.value=="email") { |
---|
1619 | Newfen('email.jsp?cemail='+document.thisForm.cemail.value+'&modifye=1&is_batch=','Email','400','300'); |
---|
1620 | } |
---|
1621 | else if (document.thisForm.modei.value=="loginu" || document.thisForm.modei.value=="err") { |
---|
1622 | Newfen('loginu.jsp?email='+document.thisForm.email.value+'&modifye=1&is_batch='+is_batch,'Authentification','650','550'); |
---|
1623 | } |
---|
1624 | } |
---|
1625 | |
---|
1626 | function choixIdent(is_batch) { |
---|
1627 | if (document.thisForm.modei.value=="email") { |
---|
1628 | Newfen('email.jsp?cemail=&modifye=0&is_batch=','Email','400','300'); |
---|
1629 | } |
---|
1630 | else if (document.thisForm.modei.value=="loginu") { |
---|
1631 | Newfen('loginu.jsp?modifye=0&is_batch='+is_batch,'Authentification','650','550'); |
---|
1632 | } |
---|
1633 | |
---|
1634 | return true; |
---|
1635 | } |
---|
1636 | |
---|
1637 | function updateOverview() { |
---|
1638 | graph_sel=document.thisForm.graph_sel.value; |
---|
1639 | chaineURL="overview.jsp?graph_sel="+graph_sel; |
---|
1640 | chaineURL+="&meta_type="+document.thisForm.lib_meta_type.value; |
---|
1641 | if (document.thisForm.mindate.value!='') chaineURL+="&datemin="+document.thisForm.mindate.value; |
---|
1642 | if (document.thisForm.maxdate.value!='') chaineURL+="&datemax="+document.thisForm.maxdate.value; |
---|
1643 | if (document.thisForm.latmin.value!='') chaineURL+="&latmin="+document.thisForm.latmin.value; |
---|
1644 | if (document.thisForm.latmax.value!='') chaineURL+="&latmax="+document.thisForm.latmax.value; |
---|
1645 | if (document.thisForm.lonmin.value!='') chaineURL+="&lonmin="+document.thisForm.lonmin.value; |
---|
1646 | if (document.thisForm.lonmax.value!='') chaineURL+="&lonmax="+document.thisForm.lonmax.value; |
---|
1647 | if (document.thisForm.ftitle.value!='') chaineURL+="&title="+document.thisForm.ftitle.value; |
---|
1648 | if (document.thisForm.sel_tpl_name.value!='') chaineURL+="&sel_tpl_name="+document.thisForm.sel_tpl_name.value; |
---|
1649 | if (document.thisForm.sel_tpl_id.value!='') chaineURL+="&sel_tpl_id="+document.thisForm.lib_tpl_id.value; |
---|
1650 | if (document.thisForm.sel_par_abs.value!='') chaineURL+="&sel_par_abs="+document.thisForm.lib_param.value; |
---|
1651 | if (document.thisForm.sel_sspar_abs.value!='') chaineURL+="&sel_sspar_abs="+document.thisForm.sel_sspar_abs.value; |
---|
1652 | if (document.thisForm.sel_par_ord.value!='') chaineURL+="&sel_par_ord="+document.thisForm.form_par_ord.value; |
---|
1653 | if (document.thisForm.sel_unit_ord.value!='') chaineURL+="&sel_unit_ord="+document.thisForm.sel_unit_ord.value; |
---|
1654 | if (document.thisForm.sel_unit_abs.value!='') chaineURL+="&sel_unit_abs="+document.thisForm.sel_unit_abs.value; |
---|
1655 | |
---|
1656 | parent.overview.location.href=chaineURL; |
---|
1657 | |
---|
1658 | return true; |
---|
1659 | |
---|
1660 | } |
---|
1661 | |
---|
1662 | function showTrace(id_session,uniqueid,mode) { |
---|
1663 | var chaine='pop_upapplet.jsp?id_session='+id_session+'&uniqueid='+uniqueid+'&mode='+mode; |
---|
1664 | |
---|
1665 | Newfen(chaine,'Visualisation_V3','600','600'); |
---|
1666 | |
---|
1667 | return true; |
---|
1668 | } |
---|
1669 | |
---|
1670 | |
---|
1671 | function checkObservationHeight(type_abs) { |
---|
1672 | if (type_abs!='profil') return false; |
---|
1673 | return matchRegExp(document.thisForm.observation_height.value, regExpEmpty); |
---|
1674 | } |
---|
1675 | |
---|
1676 | |
---|
1677 | function matchRegExp(valeur, regularExpression) { |
---|
1678 | var resultat = valeur.match(regularExpression); |
---|
1679 | if(resultat!=null && resultat.length==1) return true; |
---|
1680 | else return false; |
---|
1681 | } |
---|
1682 | |
---|
1683 | function checkLongitude(minL,maxL){ |
---|
1684 | var text=''; |
---|
1685 | |
---|
1686 | if (isNaN(document.thisForm.lonmin.value) || isNaN(document.thisForm.lonmax.value)) { |
---|
1687 | alert("Error : Invalid longitude format"); |
---|
1688 | document.thisForm.lonmin.value=minL; |
---|
1689 | document.thisForm.lonmax.value=maxL; |
---|
1690 | return false; |
---|
1691 | } |
---|
1692 | |
---|
1693 | minlon=parseFloat(document.thisForm.lonmin.value); |
---|
1694 | maxlon=parseFloat(document.thisForm.lonmax.value); |
---|
1695 | if( minlon > maxlon ){ |
---|
1696 | alert("Error : Latitude min is greater than latitude max"); |
---|
1697 | document.thisForm.lonmin.value=minL; |
---|
1698 | document.thisForm.lonmax.value=maxL; |
---|
1699 | return false; |
---|
1700 | } |
---|
1701 | if( minlon<-180 || maxlon>180 ){ |
---|
1702 | alert("Error : the selected longitude is out of range [-180,180]"); |
---|
1703 | if (minlon<-180) document.thisForm.lonmin.value=minL; |
---|
1704 | if (maxlon>180) document.thisForm.lonmax.value=maxL; |
---|
1705 | return false; |
---|
1706 | } |
---|
1707 | if( minlon<minL || maxlon>maxL ){ |
---|
1708 | alert("Error : the selected longitude is out of range of the experiment files ["+minL+","+maxL+"]"); |
---|
1709 | if (minlon<minL) document.thisForm.lonmin.value=minL; |
---|
1710 | if (maxlon>maxL) document.thisForm.lonmax.value=maxL; |
---|
1711 | return false; |
---|
1712 | } |
---|
1713 | |
---|
1714 | if (matchRegExp(document.thisForm.lonmax.value, regExpEmpty) || document.thisForm.lonmax.value=='') { |
---|
1715 | document.thisForm.lonmax.value=maxL; |
---|
1716 | } |
---|
1717 | if (matchRegExp(document.thisForm.lonmin.value, regExpEmpty) || document.thisForm.lonmin.value=='') { |
---|
1718 | document.thisForm.lonmin.value=minL; |
---|
1719 | } |
---|
1720 | updateOverview(); |
---|
1721 | return true; |
---|
1722 | } |
---|
1723 | |
---|
1724 | function checkLatitude(minL,maxL) { |
---|
1725 | |
---|
1726 | if (isNaN(document.thisForm.latmin.value) || isNaN(document.thisForm.latmax.value)) { |
---|
1727 | alert("Error : Invalid latitude format"); |
---|
1728 | document.thisForm.latmin.value=minL; |
---|
1729 | document.thisForm.latmax.value=maxL; |
---|
1730 | return false; |
---|
1731 | } |
---|
1732 | |
---|
1733 | minlat=parseFloat(document.thisForm.latmin.value); |
---|
1734 | maxlat=parseFloat(document.thisForm.latmax.value); |
---|
1735 | |
---|
1736 | |
---|
1737 | if( minlat > maxlat ){ |
---|
1738 | alert("Error : Latitude min is greater than latitude max"); |
---|
1739 | document.thisForm.latmin.value=minL; |
---|
1740 | document.thisForm.latmax.value=maxL; |
---|
1741 | return false; |
---|
1742 | } |
---|
1743 | if( minlat<-90 || maxlat>90 ){ |
---|
1744 | alert("Error : the selected latitude is out of range [-90,90]"); |
---|
1745 | if (minlat<-90) document.thisForm.latmin.value=minL; |
---|
1746 | if (maxlat>90) document.thisForm.latmax.value=maxL; |
---|
1747 | return false; |
---|
1748 | } |
---|
1749 | if (minlat<minL || maxlat>maxL) { |
---|
1750 | alert("Error : the selected latitude is out of range of the experiment files ["+minL+","+maxL+"]"); |
---|
1751 | if (minlat<minL) document.thisForm.latmin.value=minL; |
---|
1752 | if (maxlat>maxL) document.thisForm.latmax.value=maxL; |
---|
1753 | return false; |
---|
1754 | } |
---|
1755 | |
---|
1756 | |
---|
1757 | if (matchRegExp(document.thisForm.latmax.value, regExpEmpty) || document.thisForm.latmax.value=='') { |
---|
1758 | document.thisForm.latmax.value=maxL; |
---|
1759 | } |
---|
1760 | if (matchRegExp(document.thisForm.latmin.value, regExpEmpty) || document.thisForm.latmin.value=='') { |
---|
1761 | document.thisForm.latmin.value=minL; |
---|
1762 | } |
---|
1763 | updateOverview(); |
---|
1764 | return true; |
---|
1765 | } |
---|
1766 | |
---|
1767 | |
---|
1768 | function isDate(s) { |
---|
1769 | var a0=s.split("-"); |
---|
1770 | if ((a0.length!=2)){ |
---|
1771 | e=false; |
---|
1772 | }else{ |
---|
1773 | // Verification de la date |
---|
1774 | var a1=a0[0].split("/"); |
---|
1775 | var a2=a0[1].split(":"); |
---|
1776 | var e=true; |
---|
1777 | if( (a1.length!=3) && (a2.length!=4) && (a1[0].length!=4 || a1[1].length!=2 || a1[2].length!=2 || a2[0].length!=2 || a2[1].length!=2 || a2[2].length!=2 || a2[3].length!=3 )){ |
---|
1778 | e=false; |
---|
1779 | }else{ |
---|
1780 | var y=a1[0],m=a1[1],d=a1[2]; |
---|
1781 | if (isPositiveInteger(a1[0]) && isPositiveInteger(a1[1]) && isPositiveInteger(a1[2])){ |
---|
1782 | if ( (y<1000)||(y.length>4) )e=false |
---|
1783 | if (e) { |
---|
1784 | v=new Date(m+"/"+d+"/"+y); |
---|
1785 | if (v.getMonth()!=m-1)e=false; |
---|
1786 | } |
---|
1787 | }else{ |
---|
1788 | e=false; |
---|
1789 | } |
---|
1790 | // Verification de l'heure |
---|
1791 | if( e ){ |
---|
1792 | if (isPositiveInteger(a2[0]) && isPositiveInteger(a2[1]) && isPositiveInteger(a2[2])){ |
---|
1793 | var hh=a2[0],mm=a2[1],ss=a2[2],ms=a2[3]; |
---|
1794 | if( ms.length<3 )e=false; |
---|
1795 | if (e) { |
---|
1796 | v=new Date(m+"/"+d+"/"+y+" "+hh+":"+mm+":"+ss); |
---|
1797 | longdate=y+m+d+hh+mm+ss+ms; |
---|
1798 | if (v.getMonth()!=m-1)e=false; |
---|
1799 | } |
---|
1800 | }else{ |
---|
1801 | e=false; |
---|
1802 | } |
---|
1803 | } |
---|
1804 | } |
---|
1805 | } |
---|
1806 | return e |
---|
1807 | } |
---|
1808 | |
---|
1809 | function isDigit(theDigit) |
---|
1810 | { |
---|
1811 | var digitArray = new Array('0','1','2','3','4','5','6','7','8','9'),j; |
---|
1812 | |
---|
1813 | for (j = 0; j < digitArray.length; j++) |
---|
1814 | { |
---|
1815 | if (theDigit == digitArray[j])return true |
---|
1816 | } |
---|
1817 | return false |
---|
1818 | |
---|
1819 | } |
---|
1820 | function isPositiveInteger(theString){ |
---|
1821 | var theData = new String(theString) |
---|
1822 | |
---|
1823 | if (!isDigit(theData.charAt(0))) |
---|
1824 | if (!(theData.charAt(0)== '+'))return false |
---|
1825 | |
---|
1826 | for (var i = 1; i < theData.length; i++) |
---|
1827 | if (!isDigit(theData.charAt(i)))return false |
---|
1828 | return true |
---|
1829 | } |
---|
1830 | |
---|
1831 | function checkDate(minDT,maxDT){ |
---|
1832 | var minD=""; |
---|
1833 | mindate=document.thisForm.mindate.value; |
---|
1834 | |
---|
1835 | |
---|
1836 | isDate(minDT); |
---|
1837 | long_minDT=longdate; |
---|
1838 | |
---|
1839 | isDate(maxDT); |
---|
1840 | long_maxDT=longdate; |
---|
1841 | /* |
---|
1842 | if( !isDate(mindate) ){ |
---|
1843 | alert("Warning : The format of the Date min is not correct, it should be YYYY/MM/DD-HH:MM:SS:MSC"); |
---|
1844 | document.thisForm.mindate.value=minDT; |
---|
1845 | return false; |
---|
1846 | } |
---|
1847 | longdatemin=longdate; |
---|
1848 | maxdate=document.thisForm.maxdate.value; |
---|
1849 | if( !isDate(maxdate) ){ |
---|
1850 | alert("Warning : The format of the Date max is not correct, it should be YYYY/MM/DD-HH:MM:SS:MSC"); |
---|
1851 | document.thisForm.maxdate.value=maxDT; |
---|
1852 | return false; |
---|
1853 | } |
---|
1854 | longdatemax=longdate; |
---|
1855 | if (parseFloat(longdatemin)<parseFloat(long_minDT)) { |
---|
1856 | alert("Warning: Date min can not be less than the Date min of the experiment files ("+minDT+")"); |
---|
1857 | document.thisForm.mindate.value=minDT; |
---|
1858 | return false; |
---|
1859 | } |
---|
1860 | |
---|
1861 | if (parseFloat(longdatemax)>parseFloat(long_maxDT)) { |
---|
1862 | alert("Warning: Date max can not be greater than the Date max of the experiment files ("+maxDT+")"); |
---|
1863 | document.thisForm.maxdate.value=maxDT; |
---|
1864 | return false; |
---|
1865 | } |
---|
1866 | |
---|
1867 | if( parseFloat(longdatemin)>parseFloat(longdatemax) ){ |
---|
1868 | alert("Warning : Date min can not be greater than the Date max"); |
---|
1869 | document.thisForm.maxdate.value=maxDT; |
---|
1870 | document.thisForm.mindate.value=minDT; |
---|
1871 | return false; |
---|
1872 | }*/ |
---|
1873 | //document.thisForm.mindate.focus(); |
---|
1874 | updateOverview(); |
---|
1875 | updateTitle(); |
---|
1876 | return true; |
---|
1877 | } |
---|
1878 | |
---|
1879 | |
---|
1880 | function Newfen (URL,NAME,W,H) |
---|
1881 | { |
---|
1882 | var wconf = 'scrollbars=yes,toolbar=no,location=no,directories=no,status=yes,menubar=no,resizable=yes,width=' + W + ',height=' + H; |
---|
1883 | var w = window.open (URL, '', wconf); |
---|
1884 | |
---|
1885 | } |
---|
1886 | |
---|
1887 | function lancerTrace(type_abs,is_batch) { |
---|
1888 | var ok='0'; |
---|
1889 | |
---|
1890 | if (document.thisForm.modei.value=='email') { |
---|
1891 | if (document.thisForm.cemail.value!='') ok='1'; |
---|
1892 | else ok='0'; |
---|
1893 | } |
---|
1894 | else if (document.thisForm.modei.value=='loginu') { |
---|
1895 | |
---|
1896 | if (document.thisForm.login.value!='' && document.thisForm.passu.value!='') ok='1'; |
---|
1897 | else if (document.thisForm.email.value!='') ok='1'; |
---|
1898 | else if (document.thisForm.onlydata.value=="1") ok='1'; |
---|
1899 | else ok='0'; |
---|
1900 | } |
---|
1901 | |
---|
1902 | if (document.thisForm.modei.value=='none' || document.thisForm.modei.value=='err') { |
---|
1903 | ok='1'; |
---|
1904 | } |
---|
1905 | |
---|
1906 | |
---|
1907 | if (ok=='1') { |
---|
1908 | if (document.thisForm.sel_par_abs.value=='' || document.thisForm.sel_unit_abs.value=='' || document.thisForm.sel_sspar_abs.value=='' || document.thisForm.sel_par_ord.value=='' || document.thisForm.sel_unit_ord.value=='') { |
---|
1909 | alert("The parameters information are not complete"); |
---|
1910 | return false; |
---|
1911 | } |
---|
1912 | else if (checkObservationHeight(type_abs)) { |
---|
1913 | alert("You must enter an observation height"); |
---|
1914 | return false; |
---|
1915 | } |
---|
1916 | else if (confirm('Confirm your selection ?')) { |
---|
1917 | document.thisForm.afficheTrace.value="1"; |
---|
1918 | |
---|
1919 | //advances setting |
---|
1920 | document.thisForm.interpolatormethod1d.value=parent.entete.document.thisForm.interpolatormethod1d.value; |
---|
1921 | document.thisForm.spacing1d.value=parent.entete.document.thisForm.spacing1d.value; |
---|
1922 | document.thisForm.nmin1d.value=parent.entete.document.thisForm.nmin1d.value; |
---|
1923 | document.thisForm.nmax1d.value=parent.entete.document.thisForm.nmax1d.value; |
---|
1924 | |
---|
1925 | document.thisForm.reg_grid_method.value=parent.entete.document.thisForm.reg_grid_method.value; |
---|
1926 | document.thisForm.irreg_grid_method.value=parent.entete.document.thisForm.irreg_grid_method.value; |
---|
1927 | document.thisForm.nxmin2d.value=parent.entete.document.thisForm.nxmin2d.value; |
---|
1928 | document.thisForm.nxmax2d.value=parent.entete.document.thisForm.nxmax2d.value; |
---|
1929 | document.thisForm.nymin2d.value=parent.entete.document.thisForm.nymin2d.value; |
---|
1930 | document.thisForm.xspacing2d.value=parent.entete.document.thisForm.xspacing2d.value; |
---|
1931 | document.thisForm.yspacing2d.value=parent.entete.document.thisForm.yspacing2d.value; |
---|
1932 | document.thisForm.nymax2d.value=parent.entete.document.thisForm.nymax2d.value; |
---|
1933 | |
---|
1934 | |
---|
1935 | //document.thisForm.lance.value=""; |
---|
1936 | //return document.thisForm.submit(); |
---|
1937 | blocForm(); |
---|
1938 | //return true; |
---|
1939 | } |
---|
1940 | else { |
---|
1941 | return false; |
---|
1942 | } |
---|
1943 | } |
---|
1944 | else choixIdent(is_batch); |
---|
1945 | |
---|
1946 | |
---|
1947 | } |
---|
1948 | |
---|
1949 | function checkValue(valeur,texte,def) { |
---|
1950 | if (isNaN(valeur)) { |
---|
1951 | alert(texte+' must be numeric'); |
---|
1952 | if (texte=="Level value") document.thisForm.level_value.value=def; |
---|
1953 | else document.thisForm.observation_height.value=def; |
---|
1954 | |
---|
1955 | } |
---|
1956 | updateTitle(); |
---|
1957 | updateOverview(); |
---|
1958 | return true; |
---|
1959 | } |
---|
1960 | |
---|
1961 | //--> |
---|
1962 | </script> |
---|
1963 | </head> |
---|
1964 | <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" bgcolor="#ffffff"> |
---|
1965 | <%! |
---|
1966 | boolean isUnitIdentique(String param1, String param2, String isord,send_request req) { |
---|
1967 | |
---|
1968 | String list=""; |
---|
1969 | String[] cols1={"cls_acronym"}; |
---|
1970 | ArrayList _list1=req.get_list("select cls_acronym from ether.dcp_parameter where par_acronym='"+param1+"' and (isord=2 or isord=1)",cols1); |
---|
1971 | if( _list1==null || _list1.size()<1 ) return false; |
---|
1972 | else { |
---|
1973 | String[] cols2={"cls_acronym"}; |
---|
1974 | ArrayList _list2=req.get_list("select cls_acronym from ether.dcp_parameter where par_acronym='"+param2+"' and (isord=2 or isord=1)",cols2); |
---|
1975 | if( _list2==null || _list2.size()<1 ) return false; |
---|
1976 | else { |
---|
1977 | if (_list1.get(0).equals(_list2.get(0))) return true; |
---|
1978 | else return false; |
---|
1979 | } |
---|
1980 | } |
---|
1981 | } |
---|
1982 | |
---|
1983 | String getTransform(String trf_id,send_request req){ |
---|
1984 | String list=""; |
---|
1985 | |
---|
1986 | String columns[]={"par_orig", "par_acr_orig", "unit_orig", "unit_acr_orig","par_final", "par_acr_final", "unit_final", "unit_acr_final","par_aux0", "par_acr_aux0", "unit_aux0", "unit_acr_aux0","par_aux1", "par_acr_aux1", "unit_aux1", "unit_acr_aux1"}; |
---|
1987 | ArrayList _list=req.get_list( |
---|
1988 | "select "+ |
---|
1989 | "par_orig, "+ |
---|
1990 | "param0.par_acronym as par_acr_orig, "+ |
---|
1991 | "unit_orig, "+ |
---|
1992 | "unit0.unit_acronym as unit_acr_orig, "+ |
---|
1993 | "par_final, "+ |
---|
1994 | "param3.par_acronym as par_acr_final, "+ |
---|
1995 | "unit_final, "+ |
---|
1996 | "unit3.unit_acronym as unit_acr_final, "+ |
---|
1997 | "par_aux0, "+ |
---|
1998 | "param1.par_acronym as par_acr_aux0, "+ |
---|
1999 | "unit_aux0, "+ |
---|
2000 | "unit1.unit_acronym as unit_acr_aux0, "+ |
---|
2001 | "par_aux1, "+ |
---|
2002 | "param2.par_acronym as par_acr_aux1, "+ |
---|
2003 | "unit_aux1, "+ |
---|
2004 | "unit2.unit_acronym as unit_acr_aux1 "+ |
---|
2005 | "from "+ |
---|
2006 | "ether.dcp_transformation, "+ |
---|
2007 | "ether.dcp_parameter param0, "+ |
---|
2008 | "ether.dcp_parameter param1, "+ |
---|
2009 | "ether.dcp_parameter param2, "+ |
---|
2010 | "ether.dcp_unit unit0, "+ |
---|
2011 | "ether.dcp_unit unit1, "+ |
---|
2012 | "ether.dcp_parameter param3, "+ |
---|
2013 | "ether.dcp_unit unit2, "+ |
---|
2014 | "ether.dcp_unit unit3 "+ |
---|
2015 | "where "+ |
---|
2016 | "param0.par_id = dcp_transformation.par_orig "+ |
---|
2017 | "and param3.par_id=dcp_transformation.par_final "+ |
---|
2018 | "and param1.par_id=dcp_transformation.par_aux0 "+ |
---|
2019 | "and unit0.unit_id=dcp_transformation.unit_orig "+ |
---|
2020 | "and unit3.unit_id=dcp_transformation.unit_final "+ |
---|
2021 | "and unit1.unit_id=dcp_transformation.unit_aux0 "+ |
---|
2022 | "and unit2.unit_id=dcp_transformation.unit_aux1 "+ |
---|
2023 | "and param2.par_id=dcp_transformation.par_aux1 "+ |
---|
2024 | "and trf_id= "+trf_id, |
---|
2025 | columns); |
---|
2026 | if( _list==null || _list.size()<1 ){ |
---|
2027 | return "-1"; |
---|
2028 | }else{ |
---|
2029 | for(int i=0;i<_list.size();i++) |
---|
2030 | list+=_list.get(i).toString()+"%"; |
---|
2031 | } |
---|
2032 | return list; |
---|
2033 | } |
---|
2034 | |
---|
2035 | String getCombin(String combin_id,send_request req){ |
---|
2036 | String list=""; |
---|
2037 | |
---|
2038 | String[] cols1={"trf_id"}; |
---|
2039 | ArrayList _list=req.get_list( |
---|
2040 | "select trf_id from ether.dcp_transf_comb where id="+combin_id+" order by trf_order", |
---|
2041 | cols1); |
---|
2042 | if( _list==null || _list.size()<1 ){ |
---|
2043 | return "999"; |
---|
2044 | }else{ |
---|
2045 | for(int i=0;i<_list.size();i++) |
---|
2046 | list+=_list.get(i).toString()+"%"; |
---|
2047 | } |
---|
2048 | return list; |
---|
2049 | } |
---|
2050 | |
---|
2051 | /******************************************************/ |
---|
2052 | String convert(String date){ |
---|
2053 | String[] ddt=(new stringSplit()).split(date,"-"); |
---|
2054 | String[] dates=(new stringSplit()).split(ddt[0],"/"); |
---|
2055 | String[] times=(new stringSplit()).split(ddt[1],":"); |
---|
2056 | return dates[0]+dates[1]+dates[2]+times[0]+times[1]+times[2]; |
---|
2057 | } |
---|
2058 | |
---|
2059 | |
---|
2060 | /*******************************************************/ |
---|
2061 | |
---|
2062 | // Traitement des combinaisons de transformations unitaires |
---|
2063 | String treat_cbn(String cbn_id, String sel_tpl_id, int count, String origin_unit, String selected_unit,send_request req){ |
---|
2064 | String varX="", more_varid="", Xtransfo="", AUX0transfo="", AUX1transfo=""; |
---|
2065 | int num_aux0=999, num_aux1=999; |
---|
2066 | // Liste des transformations unitaires \340 appliquer |
---|
2067 | String list=getCombin(cbn_id,req); |
---|
2068 | System.err.println(" LIST CBN : "+list); |
---|
2069 | String[] cblist=(new stringSplit()).split(list,"%"); |
---|
2070 | int len=cblist.length; |
---|
2071 | if( cblist[cblist.length-1].equals("") )len=len-1; |
---|
2072 | for(int i=0;i<len;i++){ |
---|
2073 | String trf_id=cblist[i]; |
---|
2074 | boolean testUnit=false; |
---|
2075 | if(i==cblist.length-1 )testUnit=true; |
---|
2076 | String result=treat_trf(trf_id, sel_tpl_id, count, origin_unit, selected_unit, true, testUnit,req); |
---|
2077 | String[] spl=(new stringSplit()).split(result,"%"); |
---|
2078 | // Seule la variable origine de la 1ere transformation est retenue |
---|
2079 | if(i==0 )varX+=spl[0]; |
---|
2080 | // Ajout d'une commande de transformation en bout de ligne |
---|
2081 | if( i>0 ){ |
---|
2082 | Xtransfo=Xtransfo.substring(0,Xtransfo.length()-2)+","; |
---|
2083 | spl[1]=spl[1].substring(9); |
---|
2084 | } |
---|
2085 | Xtransfo+=spl[1]; |
---|
2086 | AUX0transfo=spl[2]; |
---|
2087 | AUX1transfo=spl[3]; |
---|
2088 | count=Integer.parseInt(spl[4]); |
---|
2089 | more_varid+=spl[5]; |
---|
2090 | } |
---|
2091 | |
---|
2092 | return varX+"%"+Xtransfo+"%"+AUX0transfo+"%"+AUX1transfo+"%"+count+"%"+more_varid; |
---|
2093 | } |
---|
2094 | |
---|
2095 | |
---|
2096 | // Recherche des fichiers associ\351s au tuple tpl_id |
---|
2097 | String[] scanAssociates(String type, String tpl_id, String file,send_request req){ |
---|
2098 | |
---|
2099 | String[] retour=null; |
---|
2100 | String sfile=new File(file).getName(); |
---|
2101 | // |
---|
2102 | String columns[]={"type", "command"}; |
---|
2103 | ArrayList _list=req.get_list( |
---|
2104 | "select * from ether.dcp_associate "+ |
---|
2105 | "where type='"+type+"' and tpl_id="+tpl_id, |
---|
2106 | columns); |
---|
2107 | if( _list==null || _list.size()<1 ){ |
---|
2108 | return retour; |
---|
2109 | }else{ |
---|
2110 | int nrow=_list.size()/columns.length; |
---|
2111 | retour=new String[nrow]; |
---|
2112 | int k=0; |
---|
2113 | for(int j=0;j<nrow;j++){ |
---|
2114 | String stype=_list.get(k).toString(); |
---|
2115 | String command=_list.get(k+1).toString(); |
---|
2116 | String new_command=(new stringReplace(command,"%",sfile)).newstring; |
---|
2117 | new_command=(new stringReplace(new_command,"$","'")).newstring; |
---|
2118 | String cols[]={"eth_tar_file"}; |
---|
2119 | String cols1[]={"eth_tar_file", "eth_parameter", "eth_subparameter", "src"}; |
---|
2120 | ArrayList _list0=null; |
---|
2121 | if( type.equals("info" ) ) |
---|
2122 | _list0=req.get_list(new_command,cols); |
---|
2123 | else |
---|
2124 | _list0=req.get_list(new_command,cols1); |
---|
2125 | if( _list0==null || _list0.size()<1 ){ |
---|
2126 | retour=null; |
---|
2127 | return retour; |
---|
2128 | }else{ |
---|
2129 | if( type.equals("info") )retour[j]="/doc/data"+_list0.get(0).toString(); |
---|
2130 | else retour[j]="/doc/data"+_list0.get(0).toString()+"%"+_list0.get(1).toString()+"%"+_list0.get(2).toString()+"%"+_list0.get(3).toString(); |
---|
2131 | |
---|
2132 | } |
---|
2133 | k+=columns.length; |
---|
2134 | } |
---|
2135 | } |
---|
2136 | return retour; |
---|
2137 | } |
---|
2138 | |
---|
2139 | boolean isDef(String valeur) { |
---|
2140 | if (valeur==null || valeur.equals("") || valeur.equals("null")) return false; |
---|
2141 | else return true; |
---|
2142 | } |
---|
2143 | |
---|
2144 | int occurence(String string, String search){ |
---|
2145 | int z=0, zcount=0; |
---|
2146 | while( true ){ |
---|
2147 | z=string.indexOf(search,z); |
---|
2148 | if( z>=0 ){ |
---|
2149 | zcount++; |
---|
2150 | z+=search.length(); |
---|
2151 | }else{ |
---|
2152 | break; |
---|
2153 | } |
---|
2154 | } |
---|
2155 | return zcount; |
---|
2156 | } |
---|
2157 | |
---|
2158 | |
---|
2159 | String treat_trf(String trf_id, String sel_tpl_id, int count, String origin_unit, |
---|
2160 | String selected_unit, boolean testUnit0, boolean testUnit1 ,send_request req){ |
---|
2161 | String more_varid="", Xtransfo="", AUX0transfo="", AUX1transfo=""; |
---|
2162 | int num_aux0=999, num_aux1=999; |
---|
2163 | String list=getTransform(trf_id,req); |
---|
2164 | String[] tlist=(new stringSplit()).split(list,"%"); //(0:par_id,1:par_acr,2:unit_id,3:unit_acr) |
---|
2165 | String natx=getField(sel_tpl_id,"src_acronym",tlist[1],req); |
---|
2166 | // String varX=",{variable:'"+tlist[1]+"', nature:'"+natx+ |
---|
2167 | // "', subvariable:'.', unite:'"+tlist[3]+"'}"; |
---|
2168 | String varX=tlist[1]+","+natx+",.,"+tlist[3]; |
---|
2169 | |
---|
2170 | // V\351rification de l'unit\351 de la variable origine : est-ce la m\352me que celle requise par la transformation |
---|
2171 | String before_trf=""; |
---|
2172 | if( testUnit0 && !origin_unit.equals(tlist[3]) ){ |
---|
2173 | String ids=get_conv("acr", origin_unit, tlist[3],req); |
---|
2174 | String cnv_id=(new stringSplit()).split(ids,"%")[0]; |
---|
2175 | before_trf="conv"+cnv_id+",999,999#"; |
---|
2176 | } |
---|
2177 | // V\351rification de l'unit\351 de la variable finale / s\351lectionn\351e |
---|
2178 | String more_trf=""; |
---|
2179 | if( testUnit1 && !selected_unit.equals(tlist[7]) ){ |
---|
2180 | String ids=get_conv("acr", tlist[7], selected_unit,req); |
---|
2181 | String cnv_id=(new stringSplit()).split(ids,"%")[0]; |
---|
2182 | more_trf="#conv"+cnv_id+",999,999"; |
---|
2183 | } |
---|
2184 | |
---|
2185 | // Il y a une variable auxiliaire (0) |
---|
2186 | AUX0transfo=""; |
---|
2187 | if( tlist.length>3 && !tlist[8].equals("999") ){ |
---|
2188 | String nat=getField(sel_tpl_id,"src_acronym",tlist[9],req); |
---|
2189 | String unit_id=getField(sel_tpl_id,"unit_id",tlist[9],req); |
---|
2190 | more_varid+="&"+tlist[9]+","+nat+","+".,"+tlist[11]; |
---|
2191 | count++; |
---|
2192 | num_aux0=count; |
---|
2193 | // Changement d'unit\351 pour la variable auxiliaire 0 |
---|
2194 | if( !unit_id.equals("-1") && !unit_id.equals(tlist[10]) ){ |
---|
2195 | String ids0=get_conv("id", unit_id, tlist[10],req); |
---|
2196 | String cnv_id0=(new stringSplit()).split(ids0,"%")[0]; |
---|
2197 | if( !Xtransfo.equals("") )Xtransfo+=","; |
---|
2198 | AUX0transfo="conv"+cnv_id0+",999,999"; |
---|
2199 | }else{ |
---|
2200 | AUX0transfo="t999,999,999"; |
---|
2201 | } |
---|
2202 | } |
---|
2203 | // Il y a une autre variable auxiliaire (1) |
---|
2204 | AUX1transfo=""; |
---|
2205 | if( tlist.length>7 && !tlist[12].equals("999") ){ |
---|
2206 | String nat=getField(sel_tpl_id,"src_acronym",tlist[13],req); |
---|
2207 | String unit_id=getField(sel_tpl_id,"unit_id",tlist[13],req); |
---|
2208 | more_varid+="&"+tlist[13]+","+nat+","+".,"+tlist[15]; |
---|
2209 | |
---|
2210 | count++; |
---|
2211 | num_aux1=count; |
---|
2212 | // Changement d'unit\351 pour la variable auxiliaire 1 |
---|
2213 | if( !unit_id.equals("-1") && !unit_id.equals(tlist[14]) ){ |
---|
2214 | String ids1=get_conv("id", unit_id, tlist[14],req); |
---|
2215 | String cnv_id1=(new stringSplit()).split(ids1,"%")[0]; |
---|
2216 | |
---|
2217 | AUX1transfo="conv"+cnv_id1+",999,999"; |
---|
2218 | }else{ |
---|
2219 | AUX1transfo="t999,999,999"; |
---|
2220 | } |
---|
2221 | } |
---|
2222 | |
---|
2223 | Xtransfo=before_trf+"t"+trf_id+","+num_aux0+","+num_aux1+more_trf; |
---|
2224 | // |
---|
2225 | return varX+"%"+Xtransfo+"%"+AUX0transfo+"%"+AUX1transfo+"%"+count+"%"+more_varid; |
---|
2226 | } |
---|
2227 | |
---|
2228 | String getField(String tpl_id, String field, String parameter,send_request req){ |
---|
2229 | String list=""; |
---|
2230 | String columns[]={field}; |
---|
2231 | ArrayList _list=req.get_list( |
---|
2232 | "select "+field+" from ether.dcp_descripteur where (tpl_id="+tpl_id+ |
---|
2233 | " or tpl_id=(select tpl_id from ether.dcp_file_class where associate="+tpl_id+ |
---|
2234 | ")) and par_acronym='"+parameter+"'",columns); |
---|
2235 | if( _list==null || _list.size()<1 ){ |
---|
2236 | //_list="select "+field+" from ether.dcp_descripteur where (tpl_id="+tpl_id; |
---|
2237 | //_list+=" or tpl_id=(select tpl_id from ether.dcp_file_class where associate="+tpl_id; |
---|
2238 | //_list+=")) and par_acronym='"+parameter+"'"; |
---|
2239 | return "-1"; |
---|
2240 | }else{ |
---|
2241 | list=_list.get(0).toString(); |
---|
2242 | } |
---|
2243 | return list; |
---|
2244 | } |
---|
2245 | |
---|
2246 | |
---|
2247 | |
---|
2248 | |
---|
2249 | String get_conv(String type, String unit_orig, String unit_final,send_request req){ |
---|
2250 | String cnv_id="", trf_id=""; |
---|
2251 | String unit_id_orig="", unit_id_final=""; |
---|
2252 | ArrayList _list; |
---|
2253 | if( type.equals("acr") ){ |
---|
2254 | String columns[]={"unit_id"}; |
---|
2255 | _list=req.get_list( |
---|
2256 | "SELECT * FROM ether.dcp_unit where unit_acronym='"+unit_orig+"'",columns); |
---|
2257 | if( _list==null || _list.size()!=1 ){ |
---|
2258 | return "-1%-1"; |
---|
2259 | } |
---|
2260 | unit_id_orig=_list.get(0).toString(); |
---|
2261 | _list=req.get_list( |
---|
2262 | "SELECT * FROM ether.dcp_unit where unit_acronym='"+unit_final+"'",columns); |
---|
2263 | if( _list==null || _list.size()!=1 ){ |
---|
2264 | return "-1%-1"; |
---|
2265 | } |
---|
2266 | unit_id_final=_list.get(0).toString(); |
---|
2267 | }else if( type.equals("id") ){ |
---|
2268 | unit_id_orig=unit_orig; |
---|
2269 | unit_id_final=unit_final; |
---|
2270 | } |
---|
2271 | String cols[]={"cnv_id", "trf_id"}; |
---|
2272 | _list=req.get_list( |
---|
2273 | "SELECT * FROM ether.dcp_conversion where unit_orig="+unit_id_orig+ |
---|
2274 | " and unit_final="+unit_id_final,cols); |
---|
2275 | if( _list==null || _list.size()!=cols.length ){ |
---|
2276 | return "-1%-1"; |
---|
2277 | }else{ |
---|
2278 | cnv_id=_list.get(0).toString(); |
---|
2279 | trf_id=_list.get(1).toString(); |
---|
2280 | } |
---|
2281 | return cnv_id+"%"+trf_id; |
---|
2282 | } |
---|
2283 | |
---|
2284 | |
---|
2285 | /**********************************/ |
---|
2286 | |
---|
2287 | String file_reader(String sel_tpl_id, send_request req) { |
---|
2288 | |
---|
2289 | String rd_function=""; |
---|
2290 | String columns[]={"rd_function"}; |
---|
2291 | |
---|
2292 | ArrayList _list=req.get_list("SELECT * from ether.dcp_reader, ether.dcp_file_class where dcp_file_class.rd_acronym=dcp_reader.rd_acronym and tpl_id="+sel_tpl_id,columns); |
---|
2293 | if(_list==null || _list.size()<1 ) return "-1"; |
---|
2294 | else rd_function=_list.get(0).toString(); |
---|
2295 | |
---|
2296 | return rd_function; |
---|
2297 | } |
---|
2298 | %> |
---|
2299 | |
---|
2300 | <form name="thisForm" method="POST"> |
---|
2301 | <p class="gros"> <b><u>DATA SET SELECTION</u></b></p> |
---|
2302 | <table border="0" cellpadding="2" cellspacing="5" width="800"> |
---|
2303 | <tr> |
---|
2304 | <td colspan=4> |
---|
2305 | <input type="hidden" name="map_information_level" value="<%=map_information_level%>"> |
---|
2306 | <input type="hidden" name="map_filling" value="<%=map_filling%>"> |
---|
2307 | <input type="hidden" name="map_axes_type" value="<%=map_axes_type%>"> |
---|
2308 | <input type="hidden" name="grid_linestyle" value="<%=grid_linestyle%>"> |
---|
2309 | <input type="hidden" name="latitude_posting" value="<%=latitude_posting%>"> |
---|
2310 | <input type="hidden" name="longitude_posting" value="<%=longitude_posting%>"> |
---|
2311 | <input type="hidden" name="colour_bar_nb_value" value="<%=colour_bar_nb_value%>"> |
---|
2312 | <input type="hidden" name="colour_bar_grid" value="<%=colour_bar_grid%>"> |
---|
2313 | <input type="hidden" name="modei" value="<%=modei%>"> |
---|
2314 | <input type="hidden" name="pageMode" value="<%=pageMode%>"> |
---|
2315 | <input type="hidden" name="contour_default_label_flag" value="<%=contour_default_label_flag%>"> |
---|
2316 | <input type="hidden" name="idl_colour_table_id" value="<%=idl_colour_table_id%>"> |
---|
2317 | <input type="hidden" name="cemail" value="<%=cemail%>"> |
---|
2318 | <input type="hidden" name="download_auth" value="<%=download_auth%>"> |
---|
2319 | <input type="hidden" name="email" value="<%=email%>"> |
---|
2320 | <input type="hidden" name="login" value="<%=login%>"> |
---|
2321 | <input type="hidden" name="passu" value="<%=passu%>"> |
---|
2322 | <input type="hidden" name="name" value="<%=name%>"> |
---|
2323 | <input type="hidden" name="first_name" value="<%=first_name%>"> |
---|
2324 | <input type="hidden" name="onlydata" value="<%=onlydata%>"> |
---|
2325 | <input type="hidden" name="continuer" value="<%=continuer%>"> |
---|
2326 | <input type="hidden" name="id_session" value="<%=id_session%>"> |
---|
2327 | <input type="hidden" name="contour_display_mode" value="<%=contour_display_mode%>"> |
---|
2328 | <input type="hidden" name="contour_default_colour_flag" value="<%=contour_default_colour_flag%>"> |
---|
2329 | <input type="hidden" name="contour_default_colour" value="<%=contour_default_colour%>"> |
---|
2330 | <input type="hidden" name="contour_default_linestyle" value="<%=contour_default_linestyle%>"> |
---|
2331 | <input type="hidden" name="contour_default_line_thickness" value="<%=contour_default_line_thickness%>"> |
---|
2332 | <input type="hidden" name="lib_meta_type" value="<%=lib_meta_type%>"> |
---|
2333 | <input type="hidden" name="lib_param" value="<%=lib_param%>"> |
---|
2334 | <input type="hidden" name="form_par_ord" value="<%=form_par_ord%>"> |
---|
2335 | <input type="hidden" name="lib_tpl_id" value="<%=lib_tpl_id%>"> |
---|
2336 | <input type="hidden" name="meta_type" value="<%=meta_type%>"> |
---|
2337 | <input type="hidden" name="flag_extrapolate_auth" value="<%=flag_extrapolate_auth%>"> |
---|
2338 | <input type="hidden" name="uniqueid" value="<%=uniqueid%>"> |
---|
2339 | <input type="hidden" name="mode" value="<%=mode%>"> |
---|
2340 | <input type="hidden" name="lance" value="<%=lance%>" |
---|
2341 | <input type="hidden" name="exp_alt_min" value="<%=exp_alt_min%>" |
---|
2342 | <input type="hidden" name="exp_alt_max" value="<%=exp_alt_max%>" |
---|
2343 | <input type="hidden" name="ssel_tpl_name" value="<%=sel_tpl_name%>"> |
---|
2344 | <input type="hidden" name="graph_sel" value="<%=graph_sel%>"> |
---|
2345 | <input type="hidden" name="afficheTrace" value=""> |
---|
2346 | <input type="hidden" name="interpolatormethod1d" value="0"> |
---|
2347 | <input type="hidden" name="spacing1d" value="0"> |
---|
2348 | <input type="hidden" name="nmin1d" value="50"> |
---|
2349 | <input type="hidden" name="nmax1d" value="500"> |
---|
2350 | <input type="hidden" name="reg_grid_method" value="0"> |
---|
2351 | <input type="hidden" name="irreg_grid_method" value="0"> |
---|
2352 | <input type="hidden" name="xspacing2d" value="0"> |
---|
2353 | <input type="hidden" name="nxmin2d" value="50"> |
---|
2354 | <input type="hidden" name="nxmax2d" value="500"> |
---|
2355 | <input type="hidden" name="yspacing2d" value="0"> |
---|
2356 | <input type="hidden" name="nymin2d" value="50"> |
---|
2357 | <input type="hidden" name="nymax2d" value="500"> |
---|
2358 | <input type="hidden" name="flag_validity_mask" value="1"> |
---|
2359 | <input type="hidden" name="form_par_abs" value="<%=form_par_abs%>"> |
---|
2360 | <input type="hidden" name="userLevels" value="<%=userLevels%>"> |
---|
2361 | <input type="hidden" name="dot_plot_dot_style" value="<%=dot_plot_dot_style%>"> |
---|
2362 | <input type="hidden" name="dot_plot_colour_flag" value="<%=dot_plot_colour_flag%>"> |
---|
2363 | <input type="hidden" name="dot_plot_dotcolour" value="<%=dot_plot_dotcolour%>"> |
---|
2364 | <input type="hidden" name="dot_plot_dotsize" value="<%=dot_plot_dotsize%>"> |
---|
2365 | <input type="hidden" name="DSMinDate_file" value="<%=DSMinDate_file%>"> |
---|
2366 | <input type="hidden" name="DSMaxDate_file" value="<%=DSMaxDate_file%>"> |
---|
2367 | <input type="hidden" name="lonmin_file" value="<%=lonmin_file%>"> |
---|
2368 | <input type="hidden" name="lonmax_file" value="<%=lonmax_file%>"> |
---|
2369 | <input type="hidden" name="latmin_file" value="<%=latmin_file%>"> |
---|
2370 | <input type="hidden" name="latmax_file" value="<%=latmax_file%>"> |
---|
2371 | <input type="hidden" name="file_type_abs" value="<%=file_type_abs%>"> |
---|
2372 | |
---|
2373 | <input type="hidden" name="sel_tpl_name" value="<%=sel_tpl_name%>"> |
---|
2374 | </td> |
---|
2375 | </tr> |
---|
2376 | |
---|
2377 | <tr> |
---|
2378 | <td valign="bottom" width="100%" class="normal">Mission-Version-Level-Sublevel-File format</td> |
---|
2379 | <td valign="bottom" class="normal" align="right" nowrap colspan=1><b>Vizualisation mode :</b> <%=modeTexte%></td> |
---|
2380 | <td valign="bottom" class="normal" align="right" nowrap colspan=2><a href="#" onClick="return lancerTrace('<%=file_type_abs%>','<%=is_batch%>');"><img src="Icons/create_graphic.gif" width="120" height="25" border="0"></a></td> |
---|
2381 | |
---|
2382 | </tr> |
---|
2383 | <tr> |
---|
2384 | <td valign="top" width=100% rowspan=2> |
---|
2385 | <SELECT class="contenuN" NAME="sel_tpl_id" SIZE=3 onChange="if (document.thisForm.lance.value!='') document.thisForm.lance.value='0';return blocForm();"> |
---|
2386 | <%=exp_options%> |
---|
2387 | </SELECT> |
---|
2388 | </td> |
---|
2389 | <td valign="middle" width="100%" class="normal" colspan=2> |
---|
2390 | |
---|
2391 | <%if (!lance.equals("")) { |
---|
2392 | |
---|
2393 | %> |
---|
2394 | <table border=1> |
---|
2395 | <%if (rightTexte.equals("")) {//if ((email.equals("") && cemail.equals("")) || !(!rightTexte.equals(""))) %> |
---|
2396 | <tr> |
---|
2397 | |
---|
2398 | <td valign="middle" class="normal"> </td> |
---|
2399 | </tr> |
---|
2400 | <%} |
---|
2401 | else {%> |
---|
2402 | <% |
---|
2403 | if (!name.equals("")) { |
---|
2404 | %> |
---|
2405 | <tr> |
---|
2406 | <td valign="top" nowrap align="right" class="normal"><b>Login</b></td> |
---|
2407 | <td valign="top" nowrap class="normal"><%=name%> <%=first_name%></td> |
---|
2408 | </tr> |
---|
2409 | <% |
---|
2410 | } |
---|
2411 | %> |
---|
2412 | |
---|
2413 | <% |
---|
2414 | if (is_batch.equals("1")) { |
---|
2415 | if (!email.equals("")) { |
---|
2416 | %> |
---|
2417 | <tr> |
---|
2418 | <td valign="top" nowrap align="right" class="normal"><b>Email</b></td> |
---|
2419 | <td valign="top" width="100%" class="normal"><%=email%></td> |
---|
2420 | </tr> |
---|
2421 | <% |
---|
2422 | } |
---|
2423 | else if (!cemail.equals("")) { |
---|
2424 | %> |
---|
2425 | <tr> |
---|
2426 | <td valign="top" nowrap align="right" class="normal"><b>Email</b></td> |
---|
2427 | <td valign="top" width="100%" class="normal"><%=cemail%></td> |
---|
2428 | </tr> |
---|
2429 | <% |
---|
2430 | } |
---|
2431 | else { |
---|
2432 | %> |
---|
2433 | <tr> |
---|
2434 | <td valign="top" nowrap align="right" class="normal"><b>Email</b></td> |
---|
2435 | <td valign="top" width="100%" class="normal">No email !</td> |
---|
2436 | </tr> |
---|
2437 | |
---|
2438 | <% |
---|
2439 | } |
---|
2440 | } |
---|
2441 | %> |
---|
2442 | <tr> |
---|
2443 | <td valign="top" nowrap align="right" class="normal"><b>Rights</b></td> |
---|
2444 | <td valign="top" width="100%" class="normal"><%=rightTexte%></td> |
---|
2445 | </tr> |
---|
2446 | |
---|
2447 | <tr> |
---|
2448 | <td valign="top" align="center" nowrap class="normal" colspan=2><a href=# onClick="return changeEmail(<%=is_batch%>);"><img src="Icons/modify.gif" width="75" height="25" border=0></a></td> |
---|
2449 | </tr> |
---|
2450 | <%}%> |
---|
2451 | </table> |
---|
2452 | <% |
---|
2453 | } |
---|
2454 | else if (is_private.equals("1")){ |
---|
2455 | %> |
---|
2456 | <table border=0> |
---|
2457 | <tr> |
---|
2458 | <td valign="top" nowrap align="right" class="normal"><b>Rights :</b></td> |
---|
2459 | <td valign="top" width="100%" class="normal">Data and download</td> |
---|
2460 | |
---|
2461 | </tr> |
---|
2462 | </table> |
---|
2463 | |
---|
2464 | <%}%> |
---|
2465 | </td> |
---|
2466 | </tr> |
---|
2467 | |
---|
2468 | <tr> |
---|
2469 | <td valign="middle" class="normal" colspan=2> </td> |
---|
2470 | |
---|
2471 | </tr> |
---|
2472 | </table> |
---|
2473 | |
---|
2474 | <img src="Icons/line.gif" width="730" height="5"> |
---|
2475 | |
---|
2476 | <p class="gros"> <b><u>PARAMETERS SELECTION</u></b></p> |
---|
2477 | |
---|
2478 | <p class="normal"> ATMOSPHERIC PARAMETER SELECTION</p> |
---|
2479 | |
---|
2480 | <table border="0" cellpadding="2" cellspacing="0" width="730"> |
---|
2481 | <tr> |
---|
2482 | <td class="normal" nowrap align="right">Available Parameters</td> |
---|
2483 | <td align="left" width="100%"> |
---|
2484 | <select name="sel_par_abs" onChange="if (document.thisForm.lance.value!='') document.thisForm.lance.value='0';document.thisForm.sel_unit_abs.value='';document.thisForm.colour_bar_title.value='';return blocForm();"> |
---|
2485 | <%=par_options_abs%> |
---|
2486 | </select> |
---|
2487 | </td> |
---|
2488 | <td valign="top" nowrap class="normal" rowspan=3 colspan=1>Data calculated come from ECMWF data or from a model<br> |
---|
2489 | Mes = measured data<br> |
---|
2490 | Cal = calculated data<br> |
---|
2491 | Errtot_mes = Total measured error</td> |
---|
2492 | |
---|
2493 | </tr> |
---|
2494 | <tr> |
---|
2495 | <td class="normal" nowrap align="right">Units</td> |
---|
2496 | <td align="left" width="100%"> |
---|
2497 | <select name="sel_unit_abs" onChange="updateLegend()"> |
---|
2498 | <%=unit_options_abs%> |
---|
2499 | </select> |
---|
2500 | </td> |
---|
2501 | </tr align="left"> |
---|
2502 | <tr> |
---|
2503 | <td class="normal" nowrap align="right">Sub-parameter</td> |
---|
2504 | <td align="left" width="100%"><select name="sel_sspar_abs"><%=sspar_options%></select></td> |
---|
2505 | </tr> |
---|
2506 | </table> |
---|
2507 | |
---|
2508 | <img src="Icons/line.gif" width="730" height="5"> |
---|
2509 | <%if (!file_type_abs.equals("densite")) {%> |
---|
2510 | |
---|
2511 | <p class="gros"> <b><u>VERTICAL SCALE DEFINITION</u></b></p |
---|
2512 | |
---|
2513 | <table border="0" cellpadding="2 cellspacing="0"> |
---|
2514 | <tr> |
---|
2515 | <td class="normal" align="right">Available parameters</td> |
---|
2516 | <td align="left"> |
---|
2517 | <select name="sel_par_ord" onChange="if (document.thisForm.lance.value!='') document.thisForm.lance.value='0';document.thisForm.ftitle.value='';blocForm();"> |
---|
2518 | <%=par_options_ord%> |
---|
2519 | </select> |
---|
2520 | </td> |
---|
2521 | <td class="normal" align="right">Units</td> |
---|
2522 | <td align="left"> |
---|
2523 | <select name="sel_unit_ord" onChange="document.thisForm.unit_observation_height.value=document.thisForm.sel_unit_ord.value;updateTitle();updateOverview();"> |
---|
2524 | <%=unit_options_ord%> |
---|
2525 | </select> |
---|
2526 | </td> |
---|
2527 | </tr> |
---|
2528 | </table> |
---|
2529 | |
---|
2530 | <img src="Icons/line.gif" width="730" height="5"> |
---|
2531 | <%}else {%> |
---|
2532 | <p class="gros"> <b><u><span color=red>NO VERTICAL SCALE DEFINITION (DENSITY DATA)</span></u></b></p> |
---|
2533 | <input type=hidden value=<%=sel_par_ord%> name="sel_par_ord"> |
---|
2534 | <input type=hidden value=<%=sel_unit_ord%> name="sel_unit_ord"> |
---|
2535 | |
---|
2536 | <%}%> |
---|
2537 | |
---|
2538 | <% if (graph_sel.equals("13")) {%> |
---|
2539 | <p class="gros"> <b><u>CONTOUR PLOT SET-UP</u></b></p> |
---|
2540 | |
---|
2541 | <table border="0" cellpadding="2" cellspacing="0" width="450"> |
---|
2542 | <tr> |
---|
2543 | <td align="right"><input type="radio" name="levels" value="0" <%if (levels.equals("0")) out.write("checked");%>></td> |
---|
2544 | <td class="normal" align="left">Use Default levels</td> |
---|
2545 | <td class="normal" align="right">Number of Default levels</td> |
---|
2546 | <td align="left"><input disabled type="text" name="level_value" value="5" size="5" onChange="checkValue(document.thisForm.level_value.value,'Level value','5');"></td> |
---|
2547 | </tr> |
---|
2548 | <tr> |
---|
2549 | <td align="right"><input type="radio" name="levels" value="1" <%if (levels.equals("1")) out.write("checked");%>></td> |
---|
2550 | <td class="normal" align="left">Use User Defined levels <a href="Javascript:document.thisForm.levels[1].checked=true;Newfen('pop_up2.jsp','pop_up2','775','450')"><img src="Icons/infos.gif" width="17" height="17" border="0" align="absmiddle"></a></td> |
---|
2551 | <td colspan="2"> </td> |
---|
2552 | </tr> |
---|
2553 | <tr> |
---|
2554 | <td class="normal" colspan="2" align="left"> Advanced settings <a href="Javascript:Newfen('pop_up3.jsp','Contour_Set_up','775','450')"><img src="Icons/infos.gif" width="17" height="17" border="0" align="absmiddle"></td> |
---|
2555 | <td colspan="2"> </td> |
---|
2556 | </tr> |
---|
2557 | </table> |
---|
2558 | <%}%> |
---|
2559 | |
---|
2560 | <% if (graph_sel.equals("3")) {%> |
---|
2561 | <p class="gros"><b><u>DOT DISTRIBUTION PLOT SET-UP</u></b></p> |
---|
2562 | |
---|
2563 | <p class="normal">Advanced Settings <a href="Javascript:Newfen('pop_up7.jsp','pop_up7','775','450')"> |
---|
2564 | <img src="Icons/infos.gif" width="17" height="17" border="0" align="absmiddle"></a></p> |
---|
2565 | </ul> |
---|
2566 | <%}%> |
---|
2567 | |
---|
2568 | <img src="Icons/line.gif" width="730" height="5"> |
---|
2569 | |
---|
2570 | <p class="gros"> <b><u>GRAPHIC SET-UP</u></b></p> |
---|
2571 | |
---|
2572 | <p class="normal"> GEOGRAPHIC PROJECTION</p> |
---|
2573 | |
---|
2574 | <table border="0" cellpadding="2" cellspacing="0"> |
---|
2575 | <tr> |
---|
2576 | <td align="right"><input type="radio" onClick="document.thisForm.hemisphere.disabled=true;" name="map_projection" value="0" <%if (map_projection.equals("0")) out.write("checked");%>></td> |
---|
2577 | <td class="normal" align="left">Standard (latitude/longitude grid)</td> |
---|
2578 | <td width="40"> </td> |
---|
2579 | <td align="right"><input type="radio" onClick="document.thisForm.hemisphere.disabled=false;" name="map_projection" value="1" <%if (map_projection.equals("1")) out.write("checked");%>></td> |
---|
2580 | <td class="normal" align="left">Stereopolar (</td> |
---|
2581 | <td align="left"> |
---|
2582 | <select name="hemisphere" <%if (map_projection.equals("0")) {out.write("disabled");} else {out.write("");}%>> |
---|
2583 | <option value="1" <%if (hemisphere.equals("1")) out.write("selected");%>>North</option> |
---|
2584 | <option value="2" <%if (hemisphere.equals("2")) out.write("selected");%>>South</option> |
---|
2585 | </select></td> |
---|
2586 | <td class="normal"> Pole)</td> |
---|
2587 | </tr> |
---|
2588 | </table> |
---|
2589 | |
---|
2590 | <p class="normal">LOCALIZATION RANGE</p> |
---|
2591 | |
---|
2592 | <table border="0" cellpadding="2" cellspacing="0"> |
---|
2593 | <tr> |
---|
2594 | <td class="normal">Minimum Latitude</td> |
---|
2595 | <td><input onChange=checkLatitude('<%=latmin_file%>','<%=latmax_file%>') type="text" name="latmin" size="10" value="<%=latmin%>"></td> |
---|
2596 | <td class="normal">Maximum Latitude</td> |
---|
2597 | <td><input onChange=checkLatitude('<%=latmin_file%>','<%=latmax_file%>') type="text" name="latmax" size="10" value="<%=latmax%>"></td> |
---|
2598 | </tr> |
---|
2599 | <tr> |
---|
2600 | <td class="normal">Minimum Longitude</td> |
---|
2601 | <td><input onChange=checkLongitude('<%=lonmin_file%>','<%=lonmax_file%>') type="text" name="lonmin" size="10" value="<%=lonmin%>"></td> |
---|
2602 | <td class="normal">Maximum Longitude</td> |
---|
2603 | <td><input onChange=checkLongitude('<%=lonmin_file%>','<%=lonmax_file%>') type="text" name="lonmax" size="10" value="<%=lonmax%>"></td> |
---|
2604 | </tr> |
---|
2605 | </table> |
---|
2606 | |
---|
2607 | <p class="normal">TIME RANGE</p> |
---|
2608 | |
---|
2609 | <table border="0" cellpadding="2" cellspacing="0"> |
---|
2610 | <tr> |
---|
2611 | <td class="normal">Start Date</td> |
---|
2612 | <td><input onChange=checkDate('<%=DSMinDate_file%>','<%=DSMaxDate_file%>') type="text" name="mindate" size="25" value="<%=DSMinDate%>"></td> |
---|
2613 | <td class="normal">End Date</td> |
---|
2614 | <td><input onChange=checkDate('<%=DSMinDate_file%>','<%=DSMaxDate_file%>') type="text" name="maxdate" size="25" value="<%=DSMaxDate%>"></td> |
---|
2615 | </tr> |
---|
2616 | </table> |
---|
2617 | <%if (file_type_abs.equals("profil")) {%> |
---|
2618 | <p class="normal">HEIGHT OBSERVATION <%=heightTexte%></p> |
---|
2619 | <table border="0" cellpadding="2" cellspacing="0"> |
---|
2620 | <tr> |
---|
2621 | <td class="normal">Select Vertical Scale</td> |
---|
2622 | <td><input type="text" name="par_observation_height" value="<%=par_observation_height%>" size="45" disabled></td> |
---|
2623 | <td class="normal">Units</td> |
---|
2624 | <td><input type="text" name="unit_observation_height" value="<%=sel_unit_ord%>" size="10" disabled></td> |
---|
2625 | <td class="normal">Value</td> |
---|
2626 | <td><input type="text" name="observation_height" size="10" value="<%=observation_height%>" onChange="return checkValue(document.thisForm.observation_height.value,'The height observation','');"></td> |
---|
2627 | </tr> |
---|
2628 | <tr> |
---|
2629 | <td colspan="5" class="normal" align="left">Fine Range Settings <img src="Icons/infos.gif" width="17" height="17" border="0" align="absmiddle"></td> |
---|
2630 | </tr> |
---|
2631 | </table> |
---|
2632 | <%}%> |
---|
2633 | |
---|
2634 | <img src="Icons/line.gif" width="730" height="5"> |
---|
2635 | |
---|
2636 | <p class="gros"> <b><u>LEGENDS SET-UP</u></b></p> |
---|
2637 | <table border="0" cellpadding="2" cellspacing="0" width="800"> |
---|
2638 | <tr> |
---|
2639 | <td class="normal" nowrap align="left"> Title</td> |
---|
2640 | <td width="100%"><input type="text" name="ftitle" size="70" maxsize="300" value="<%=ftitle%>" onChange="updateOverview();"></td> |
---|
2641 | </tr> |
---|
2642 | <tr> |
---|
2643 | <td class="normal" nowrap align="left"> Colour Bar Legend</td> |
---|
2644 | <td width="100%"><input type="text" name="colour_bar_title" size="70" maxsize="150" value="<%=colour_bar_title%>"></td> |
---|
2645 | </tr> |
---|
2646 | <tr> |
---|
2647 | <td class="normal" nowrap align="left" colspan="1"> Advanced Settings <a href="Javascript:Newfen('pop_up6.jsp','pop_up6','800','450')" ><img src="Icons/infos.gif" width="17" height="17" border="0" align="absmiddle"></a></td> |
---|
2648 | <td class="normal" align="right"><a href="#" onClick="return lancerTrace('<%=file_type_abs%>','<%=is_batch%>');"><img src="Icons/create_graphic.gif" width="120" height="25" border="0"></a></td> |
---|
2649 | </tr> |
---|
2650 | </table> |
---|
2651 | |
---|
2652 | <SCRIPT Language="javascript"> |
---|
2653 | updateOverview(); |
---|
2654 | updateCreation('<%=file_type_abs%>','<%=is_batch%>','<%=pageMode%>','<%=chainePageMode%>'); |
---|
2655 | testLoad('<%=file_type_abs%>','<%=is_batch%>','<%=pageMode%>','<%=chainePageMode%>'); |
---|
2656 | </SCRIPT> |
---|
2657 | </form> |
---|
2658 | </body> |
---|
2659 | </html> |
---|
2660 | |
---|