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