<%@ page import="fr.acri.norm.*" %> <%@ page import="java.io.*" %> <%@ page import="java.util.*" %> <%@ page import="java.lang.*" %> <%@ include file="declarations.jsp" %> <%@ include file="affectations.jsp" %> <%@ include file="conf_visu.jsp" %> <% /******************************** LISTE DES EXPERIENCES ***********************************************************/ sql="SELECT distinct exp_name"; sql+=" FROM ether.dcp_file_class, ether.ether_experiment, ether.dcp_descripteur, ether.dcp_parameter "; sql+="WHERE ether_experiment.exp_id=dcp_file_class.exp_id and dcp_descripteur.tpl_id=dcp_file_class.tpl_id "; sql+="and dcp_parameter.par_acronym = ether.dcp_descripteur.par_acronym and (isord=0 or isord=2) and associate=-1 and active=1"; if (sel_temp_name!=null && !sel_temp_name.equals("")) sql+="and exp_name like '%"+sel_temp_name+"%' "; sql+=" and dcp_file_class.tpl_id NOT IN (1332,1333) "; sql+="and exp_name not like '%SMR_OF%' and exp_name not like '%LIDAR.AND%' and exp_name not like '%LIDAR.REU%'"; sql+="ORDER BY exp_name"; exp_list=req.get_list(sql,exp_columns0); if (exp_list==null || exp_list.size()==0) { error_msg="No file class found in the database"; } else { nexp=exp_list.size()/exp_columns0.length; exp_options0=""; if (nexp>0) { k=0; for(i=0;i"+exp_list.get(k); exp_options0+=""; k+=exp_columns0.length; } } nexp=0; exp_list=null; } if (graph_sel.equals(VERTICAL_ANALYSIS) || graph_sel.equals(TIME_ANALYSIS) || graph_sel.equals(XY_PLOT) || graph_sel.equals(_2D_TRAJECTORY)) { observation_height="40"; } if (!graph_sel.equals("") && graph_sel!="") { //LISTE DES DIFFERENTES VERSION ET NIVEAUX DE L'EXPERIENCE CHOISIE /*sql="SELECT distinct ether_experiment.exp_id,exp_name,exp_mission,set_dataset_version,set_ceos_level,set_ceos_sublevel,set_format"; sql+=",dcp_file_class.tpl_id,exp_public,exp_alt_min,exp_alt_max FROM ether.dcp_file_class, ether.ether_experiment "; sql+="WHERE ether_experiment.exp_id=dcp_file_class.exp_id "; sql+="and dcp_file_class.tpl_id in (select dcp_file_class.tpl_id from ether.ether_experiment, ether.dcp_file_class "; sql+="where ether_experiment.exp_id=dcp_file_class.exp_id and exp_name='"+sel_tpl_name+"' and set_format='ETHER') "; sql+="ORDER BY exp_name, set_dataset_version"; out.write(sql);*/ if (!graph_sel.equals(_2D_TRAJECTORY)) { sql="SELECT distinct ether_experiment.exp_id,exp_name,exp_mission,set_dataset_version,set_ceos_level,set_ceos_sublevel,set_format"; 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 "; sql+="WHERE ether_experiment.exp_id=dcp_file_class.exp_id and dcp_descripteur.tpl_id=dcp_file_class.tpl_id "; sql+="and dcp_parameter.par_acronym = ether.dcp_descripteur.par_acronym and (isord=0 or isord=2) and associate=-1 "; sql+="and dcp_file_class.tpl_id NOT IN (1332,1333,1331) "; sql+="and dcp_file_class.tpl_id in (select dcp_file_class.tpl_id from ether.ether_experiment, ether.dcp_file_class "; sql+="where ether_experiment.exp_id=dcp_file_class.exp_id and exp_name='"+sel_tpl_name+"') "; } else { sql="SELECT distinct ether_experiment.exp_id,exp_name,exp_mission,set_dataset_version,set_ceos_level,set_ceos_sublevel,set_format"; sql+=",dcp_file_class.tpl_id,exp_public,exp_alt_min,exp_alt_max FROM ether.dcp_file_class, ether.ether_experiment "; sql+="WHERE ether_experiment.exp_id=dcp_file_class.exp_id and set_format='ETHER' "; sql+="and dcp_file_class.tpl_id in (select dcp_file_class.tpl_id from ether.ether_experiment, ether.dcp_file_class "; sql+="where ether_experiment.exp_id=dcp_file_class.exp_id and exp_name='"+sel_tpl_name+"' ) "; } sql+="ORDER BY exp_name, set_dataset_version"; nreq=-1; exp_list=req.get_list(sql,exp_columns); if (exp_list==null || exp_list.size()==0) { error_msg="No file class found in the database"; } else{ nreq=exp_list.size()/exp_columns.length; exp_options=""; if (nreq>0) { k=0; sel_tpl=""; for (i=0 ; i < nreq ; i++) { if(exp_list.get(k+7).toString().equals(sel_tpl_id) ){ selected="selected"; sel_tpl=exp_list.get(k+7).toString(); sel_exp_id=exp_list.get(k).toString(); sel_version=exp_list.get(k+3).toString(); sel_level=exp_list.get(k+4).toString(); sel_sublevel=exp_list.get(k+5).toString(); sel_format=exp_list.get(k+6).toString(); sel_exp_public=exp_list.get(k+8).toString(); exp_alt_min=exp_list.get(k+9).toString(); exp_alt_max=exp_list.get(k+10).toString(); heightTexte=""; //"(Between "+exp_alt_min+" km and "+exp_alt_max+" km in altitude)"; lib_mission=exp_list.get(k+2).toString(); lib_version=exp_list.get(k+3).toString(); lib_level=exp_list.get(k+4).toString(); lib_sublevel=exp_list.get(k+5).toString(); if (lib_sublevel.equals(".")) lib_sublevel="None"; lib_fileformat=exp_list.get(k+6).toString(); 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(); } else selected=""; exp_options+=""; k+=exp_columns.length; } } exp_list=null; } } exp_list=null; if (!sel_tpl_id.equals("") && !sel_tpl_id.equals("null")) { sel_par_abs="Coordinates"; listAbscisses absExp = new listAbscisses(sel_tpl_id, sel_exp_id, sel_par_abs,""); absExp.recupList(); error_msg=absExp.error_msg; isParAbs=absExp.isParAbs; file_par_abs=absExp.file_par_abs; file_unit_abs=absExp.file_unit_abs; out.write("file_unit_abs="+file_unit_abs); file_nature_abs=absExp.file_nature_abs; file_type_abs=absExp.file_type_abs; form_par_abs=absExp.form_par_abs; form_legend=absExp.form_legend; form_par_id=absExp.form_par_id; lib_param=absExp.lib_param; par_options_abs=absExp.par_options_abs; idl_colour_table_id=absExp.idl_colour_table_id; imported_colour_table=absExp.imported_colour_table; val_min_bd=absExp.val_min_bd; val_max_bd=absExp.val_max_bd; unite_bd=absExp.unite_bd; if (graph_sel.equals(_2D_TRAJECTORY)) file_par_abs="Coordinates"; /* LISTE DES SOUS-PARAMETRES ABSCISSE */ if(isParAbs || graph_sel.equals(_2D_TRAJECTORY)) {// && !sel_par_abs.equals("") && !sel_par_abs.equals("null")) { nreq=-1; sel_par=""; if (graph_sel.equals(_2D_TRAJECTORY)) sel_par="Coordinates"; else if (sel_par_abs!=null) sel_par=(new stringSplit()).split(sel_par_abs,"%")[0]; // BORNES DE DATES sql="SELECT DISTINCT set_first_date,set_last_date,set_lon_min,set_lon_max,set_lat_min,set_lat_max "; sql+="FROM ether.ether_dataset,ether.dcp_file_class,set_parameter=par_acronym and set_id_experiment=exp_id and "; 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='"; sql+=sel_par+"' and ether_dataset.set_dataset_version='"+sel_version+"' "+ " and ether_dataset.set_ceos_level='"+sel_level+"' "; sql+=" and ether_dataset.set_ceos_sublevel='"+sel_sublevel+"' "+" and ether_dataset.set_format='"+sel_format+"' "; sspar_list=req.get_list(sql,sspar_columns1); if (sspar_list!=null && sspar_list.size()>0) { mindate_ms=Long.parseLong(sspar_list.get(0).toString()); maxdate_ms=Long.parseLong(sspar_list.get(1).toString()); DSMinDate=(new calDate(mindate_ms)).date_cal; DSMaxDate=(new calDate(maxdate_ms)).date_cal; date_time=DSMinDate.substring(0,10); lonmin=sspar_list.get(2).toString(); lonmax=sspar_list.get(3).toString(); latmin=sspar_list.get(4).toString(); latmax=sspar_list.get(5).toString(); } //LISTE DES SOUS-PARAMETRES PROPREMENT DIT sql="select distinct subvariable from ether.dcp_descripteur, ether.dcp_file_class where par_acronym='"+sel_par+"'"; 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; sql+=" or exp_id=( select exp_id from ether.dcp_file_class where associate= "+sel_tpl_id+"))"; out.write(sql); sql="select distinct ether.dcp_descripteur.subvariable from ether.dcp_descripteur,ether.dcp_parameter param, ether.dcp_unit unit, ether.ether_dataset ds "; sql+="WHERE param.par_acronym=dcp_descripteur.par_acronym and unit.unit_id=dcp_descripteur.unit_id " ; sql+="and ds.set_parameter=dcp_descripteur.par_acronym and param.par_acronym='"+sel_par+"' "; 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+"')) "; sql+=" and (isord=0 or isord=2) and (tpl_id='"+sel_tpl_id+"' or tpl_id=(select tpl_id from ether.dcp_file_class "; sql+="where associate='"+sel_tpl_id+"')) and par_name not like '%Temp%'"; sspar_list=req.get_list(sql,sspar_columns); if (sspar_list==null || sspar_list.size()==0) isSspar=false; else { isSspar=true; nreq=sspar_list.size()/sspar_columns.length; sspar_options=""; if (nreq>0) { k=0; 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(); for (i=0;i"; if (sspar_list.get(k).toString().equals(".")) sspar_options+="None"; else sspar_options+=sspar_list.get(k); sspar_options+=""; form_sspar_abs=sspar_list.get(k).toString(); k+=sspar_columns.length; } } } } /*LISTE DES PARAMETRES EN ORDONNEES*/ if( isFile && isParAbs && sel_par_abs!=null && !sel_par_abs.equals("null") && !sel_par_abs.equals("")) { if (graph_sel.equals(XY_PLOT)) { listAbscisses ordExp = new listAbscisses(sel_tpl_id, sel_exp_id, sel_par_ord,sel_par_abs); ordExp.recupList(); error_msg=ordExp.error_msg; isParOrd=ordExp.isParAbs; file_par_ord=ordExp.file_par_abs; file_unit_ord=ordExp.file_unit_abs; file_nature_ord=ordExp.file_nature_abs; form_par_ord=ordExp.form_par_abs; par_options_ord=ordExp.par_options_abs; if (isParOrd && sel_par_ord!=null && sel_par_ord!="" && !sel_par_ord.equals("null") ) { nreq=-1; sel_par=""; if (sel_par_ord!=null) sel_par=(new stringSplit()).split(sel_par_ord,"%")[0]; // LISTE DES SOUS-PARAMETRES PROPREMENT DIT sql="select distinct subvariable from ether.dcp_descripteur, ether.dcp_file_class where par_acronym='"+sel_par+"'"; 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; sql+=" or exp_id=( select exp_id from ether.dcp_file_class where associate= "+sel_tpl_id+"))"; sspar_list=req.get_list(sql,sspar_columns); if (sspar_list==null || sspar_list.size()==0) isSspar=false; else { isSspar=true; nreq=sspar_list.size()/sspar_columns.length; ssparord_options=""; if (nreq>0) { k=0; 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(); for (i=0;i"; if (sspar_list.get(k).toString().equals(".")) ssparord_options+="None"; else ssparord_options+=sspar_list.get(k); ssparord_options+=""; k+=sspar_columns.length; } } } } } else if (!graph_sel.equals(_2D_TRAJECTORY)) { from=" from "; TRF=new Transform(sel_tpl_id, sel_exp_id,lang, file_type_abs); isParOrd=TRF.isPar; par_options_ord=""; if( !isParOrd ) error_msg=""; else{ _parameters=new ArrayList(); for(i=0;i"+TRF.parameter[i]; if (TRF.nature[i].equals("Mes")) par_options_ord+=" (Measured)"; else par_options_ord+=" ("+TRF.nature[i]+")"; if (!TRF.ssparameter[i].equals(".")) par_options_ord+=" (subparameter : "+TRF.ssparameter[i]+")"; //else par_options_ord+=" - "+TRF.ssparameter[i]+""; //if (selected.equals("selected")) par_observation_height=TRF.parameter[i]+" - "+TRF.nature[i]+" - "+TRF.ssparameter[i]; if (selected.equals("selected")) { par_observation_height=TRF.parameter[i]+" - "; if (TRF.nature[i].equals("Mes")) par_observation_height+=" (Measured)"; else par_observation_height+=" ("+TRF.nature[i]+")"; if (!TRF.ssparameter[i].equals(".")) par_options_ord+="- (subparameter : "+TRF.ssparameter[i]+")"; } _parameters.add(TRF.par_acr[i]); } } // PARAMETRES OBTENUS PAR TRANSFORMATIONS SIMPLES if( file_type_abs.equals("profil") && TRF.cal_parameter!=null ) { for(i=0;i"; par_options_ord+=TRF.cal_parameter[i]+from+TRF.cal_parameter_orig[i]+" (Calculated)"; if (selected.equals("selected")) par_observation_height=TRF.cal_parameter[i]+from+TRF.cal_parameter_orig[i]+" (Calculated)"; } _parameters.add(TRF.cal_par_acr[i]); } } } // PARAMETRES OBTENUS PAR TRANSFORMATIONS COMBINEES /* if( file_type_abs.equals("profil") && TRF.cbn_parameter!=null ){ for(i=0;i"; par_options_ord+=TRF.cbn_parameter[i][TRF.cbn_parameter[i].length-1]+from; par_options_ord+=TRF.cbn_parameter_orig[i][0]; par_options_ord+=" (Calculated)"; if (selected.equals("selected")) par_observation_height=TRF.cbn_parameter[i][TRF.cbn_parameter[i].length-1]+from+TRF.cbn_parameter_orig[i][0]+" (Cal culated)"; _parameters.add(TRF.cbn_par_acr[i][TRF.cbn_parameter[i].length-1]); } } }*/ } } } //UNITES nunit_abs=-1; nunit_ord=-1; if (isFile) { sql="select unit2.unit_acronym from ether.dcp_unit,ether.dcp_parameter,ether.dcp_unit unit2,ether.dcp_conversion "; sql+="where par_acronym = '"+file_par_abs+"' and dcp_unit.unit_acronym = '"+file_unit_abs+"'"; sql+="and dcp_parameter.cls_acronym = dcp_unit.cls_acronym "; sql+="and dcp_unit.unit_id = dcp_conversion.unit_orig and dcp_conversion.unit_final = unit2.unit_id"; unit_list_abs=req.get_list(sql,unit_columns); isUnitAbs=true; Object obs1=new Object(); obs1=file_unit_abs; unit_list_abs.add(0,obs1); nunit_abs=unit_list_abs.size()/unit_columns.length; unit_options_abs=""; if( nunit_abs>0 ){ k=0; if (!(sel_unit_abs!=null && !sel_unit_abs.equals("")) && sel_par_abs!=null && !sel_par_abs.equals("")) sel_unit_abs=unit_list_abs.get(0).toString(); for(i=0;i"+unit_list_abs.get(k)+""; k+=unit_columns.length; } } if( isParOrd && file_par_ord!=null && !file_par_ord.equals("null") && file_unit_ord!=null && !file_unit_ord.equals("null") && !file_unit_ord.equals("") ) { sql="select unit2.unit_acronym from ether.dcp_unit, ether.dcp_parameter, ether.dcp_unit unit2,"; sql+="ether.dcp_conversion where par_acronym = '"+file_par_ord+"' and dcp_unit.unit_acronym = '"+file_unit_ord+"' "; sql+="and dcp_parameter.cls_acronym = dcp_unit.cls_acronym and dcp_unit.unit_id = dcp_conversion.unit_orig "; sql+="and dcp_conversion.unit_final = unit2.unit_id"; unit_list_ord=req.get_list(sql,unit_columns); // RAJOUT DE L'UNITE DU FICHIER Object obs=new Object(); obs=file_unit_ord; unit_list_ord.add(0,obs); isUnitOrd=true; nunit_ord=unit_list_ord.size()/unit_columns.length; unit_options_ord=""; if( nunit_ord>0 ){ k=0; // ON FORCE LA SELECTION DE L'UNITE EN ORDONNEE A CELLE DU FICHIER PAR DEFAUT issel=false; for(i=0;i"; unit_options_ord+=unit_list_ord.get(k)+""; k+=unit_columns.length; } } } } if (!afficheTrace.equals("null") && afficheTrace.equals("1")) { count=1; //UNITE DIFFERENTE //POUR L'ABSCISSE if( sel_unit_abs!=null && !sel_unit_abs.equals("") && !file_unit_abs.equals(sel_unit_abs) ){ ids=get_conv("acr", file_unit_abs, sel_unit_abs,req); cnv_id=(new stringSplit()).split(ids,"%")[0]; trf_id=(new stringSplit()).split(ids,"%")[1]; // EST-CE UNE CONVERSION OU/ET UNE TRANSFORMATION (EN ABSCISSE SEULE UNE TRANFO NON COMBINEE PEUT AVOIR LIEU if( !trf_id.equals("999") ){ // LA CONVERSION POINTE VERS UNE TRANSFORMATION: ATTENTION DANS CE CAS LA VARIABLE N'EST PAS TRANSFORMEE // CELA RESTE UN CHANGEMENT D'UNITE // DONC LA VARIABLE A LIRE RESTE LA MEME (CONTRAIREMENT A L'ORDONNEE OU CELLE A LIRE EST // LA VARIABLE ORIGINE DE LA TRANSFORMATION ET NON PAS LA VARIABLE CHOISIE PAR L'UTILISATEUR // QUI N'EXISTE PAS DANS LE FICHIER DE MESURE PUISQUE CALCULEE) result=treat_trf(trf_id, sel_tpl_id, count,"",sel_unit_abs,false,true,req); spl=(new stringSplit()).split(result,"%"); Xtransfo=spl[1]; AUX0transfo=spl[2]; AUX1transfo=spl[3]; count=Integer.parseInt(spl[4]); more_varid+=spl[5]; } else if( !cnv_id.equals("-1") ){ // C'EST UNE CONVERSION SIMPLE Xtransfo="conv"+cnv_id+",999,999"; } else{ sel_unit_abs=file_unit_abs; Xtransfo="t999,999,999"; } } else{ Xtransfo="t999,999,999"; } //POUR ORDONNEE if(sel_unit_ord!=null && !sel_unit_ord.equals("")) { if (graph_sel.equals(XY_PLOT)) { if(!file_unit_ord.equals(sel_unit_ord) ){ ids=get_conv("acr", file_unit_ord, sel_unit_ord,req); cnv_id=(new stringSplit()).split(ids,"%")[0]; trf_id=(new stringSplit()).split(ids,"%")[1]; // EST-CE UNE CONVERSION OU/ET UNE TRANSFORMATION (EN ABSCISSE SEULE UNE TRANFO NON COMBINEE PEUT AVOIR LIEU if( !trf_id.equals("999") ){ // LA CONVERSION POINTE VERS UNE TRANSFORMATION: ATTENTION DANS CE CAS LA VARIABLE N'EST PAS TRANSFORMEE // CELA RESTE UN CHANGEMENT D'UNITE // DONC LA VARIABLE A LIRE RESTE LA MEME (CONTRAIREMENT A L'ORDONNEE OU CELLE A LIRE EST // LA VARIABLE ORIGINE DE LA TRANSFORMATION ET NON PAS LA VARIABLE CHOISIE PAR L'UTILISATEUR // QUI N'EXISTE PAS DANS LE FICHIER DE MESURE PUISQUE CALCULEE) result=treat_trf(trf_id, sel_tpl_id, count,"",sel_unit_ord,false,true,req); spl=(new stringSplit()).split(result,"%"); Ytransfo=spl[1]; AUY0transfo=spl[2]; AUY1transfo=spl[3]; count=Integer.parseInt(spl[4]); more_varid+=spl[5]; } else if( !cnv_id.equals("-1") ){ // C'EST UNE CONVERSION SIMPLE Ytransfo="conv"+cnv_id+",999,999"; } else{ sel_unit_ord=file_unit_ord; Ytransfo="t999,999,999"; } } else{ Ytransfo="t999,999,999"; } varY=file_par_ord+","+file_nature_ord+","+sel_sspar_ord+","+sel_unit_ord; } else { ordonnee=file_par_ord; sspar_ordonnee=file_sspar_ord; numY_aux0=999; numY_aux1=999; isTransform=false; // LA VARIABLE DEMANDEE EN ORDONNEE N'EST PAS DISPONIBLE DANS LE FICHIER // ON CREE DE LA DONNEE VIA UNE TRANSFORMATION DE VARIABLE if( !display_type.equals("available") ){ isTransform=true; auxiliary=file_par_aux; auxiliary_nature=file_nature_aux; auxiliary1=file_par_aux1; auxiliary_nature1="file_nature_aux1"; origin="file_par_orig"; origin_unit=file_unit_orig; origin_nature=file_nature_orig; // 2 POSSIBILITES : // 1/ ON TRANSFORME LA VARIABLE INITIALE PAR UNE TRANSFORMATION SIMPLE if( display_type.equals("transformed") ){ if( !file_trf_id.equals("999") ){ //LA CONVERSION POINTE VERS UNE TRANSFORMATION result=treat_trf(file_trf_id, sel_tpl_id, count,origin_unit,sel_unit_ord,true,true,req); spl=(new stringSplit()).split(result,"%"); varY=spl[0]; Ytransfo=spl[1]; AUY0transfo=spl[2]; //AUY0transfo=spl[2]; AUY1transfo=spl[3]; count=Integer.parseInt(spl[4]); more_varid+=spl[5]; }else{ sel_unit_ord=file_unit_ord; Ytransfo="t999,999,999"; } // 2/ ON TRANSFORME LA VARIABLE INITIALE PAR UNE TRANSFORMATION COMBINEE } else if( display_type.equals("combined") ){ if( !file_trf_id.equals("999") ){ //La conversion pointe vers une transformation result=treat_cbn(file_trf_id, sel_tpl_id, count,origin_unit,sel_unit_ord,req); spl=(new stringSplit()).split(result,"%"); varY=spl[0]; Ytransfo=spl[1]; AUY0transfo=spl[2]; AUY1transfo=spl[3]; count=Integer.parseInt(spl[4]); more_varid+=spl[5]; }else { sel_unit_ord=file_unit_ord; Ytransfo="t999,999,999"; } } }else{ // PAS DE TRANSFORMATION MAIS PEUT-ETRE UNE CONVERSION nature_ord=file_nature_ord; //varY=",{variable:'"+ordonnee+"', nature:'"+nature_ord+"', subvariable:'"+sspar_ordonnee+"', unite:'"+sel_unit_ord+"'}"; varY=ordonnee+","+nature_ord+","+sspar_ordonnee+","+sel_unit_ord; if( !file_unit_ord.equals(sel_unit_ord) ){ ids=get_conv("acr", file_unit_ord, sel_unit_ord,req); cnv_id=(new stringSplit()).split(ids,"%")[0]; trf_id=(new stringSplit()).split(ids,"%")[1]; //EST-CE UNE CONVERSION OU/ET UNE TRANSFORMATION (EN ORDONNEE TRANFO OU COMBINEE PEUVENT //AVOIR LIEU if( !trf_id.equals("999") ){ //LA CONVERSION POINTE VERS UNE TRANSFORMATION result=treat_trf(trf_id, sel_tpl_id, count, "", sel_unit_ord,false,true,req); spl=(new stringSplit()).split(result,"%"); varY=spl[0]; Ytransfo=spl[1]; AUY0transfo=spl[2]; AUY1transfo=spl[3]; count=Integer.parseInt(spl[4]); more_varid+=spl[5]; } else if( !cnv_id.equals("-1") ){ //C'EST UNE CONVERSION SIMPLE Ytransfo="conv"+cnv_id+",999,999"; }else{ sel_unit_ord=file_unit_ord; Ytransfo="t999,999,999"; } }else{ Ytransfo="t999,999,999"; } } } } TRANSFO=""; TRANSFO+=Xtransfo+"&"+Ytransfo; if( !AUX0transfo.equals("") )TRANSFO+="&"+AUX0transfo; if( !AUX1transfo.equals("") )TRANSFO+="&"+AUX1transfo; if( !AUY0transfo.equals("") )TRANSFO+="&"+AUY0transfo; if( !AUY1transfo.equals("") )TRANSFO+="&"+AUY1transfo; } nfile=-1; if ((isParAbs && sel_par_abs!=null && isParOrd) || (graph_sel.equals(_2D_TRAJECTORY) && sel_tpl_id!=null) ) { if ((sel_par_ord!=null && sel_par_ord!="") || graph_sel.equals(_2D_TRAJECTORY)) { sel_par=""; if (graph_sel.equals(_2D_TRAJECTORY)) sel_par="Coordinates"; else if (sel_par_abs!=null) sel_par=(new stringSplit()).split(sel_par_abs,"%")[0]; //DETERMINATION DES BORNES SPATIO-TEMPROELLES if ((sel_mindate==null || sel_mindate.equals("") || sel_mindate.equals("null") || sel_maxdate==null || sel_maxdate.equals("") || sel_maxdate.equals("null") || lonmin==null || lonmin.equals("") || lonmin.equals("null") || lonmax==null || lonmax.equals("") || lonmax.equals("null") || latmin==null || latmin.equals("") || latmin.equals("null") || latmax==null || latmax.equals("") || latmax.equals("null")) && sel_exp_id!=null && sel_sspar_abs!=null) { sql="SELECT min(eth_first_date) as mindate, max(eth_last_date) as maxdate,min(eth_lon_min) as lonmin"; 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"; sql+=",max(eth_alt_max) as altmax "; sql+="FROM ether.ether_file where (eth_id_experiment="+sel_exp_id; sql+=" or eth_id_experiment=(select exp_id from ether.dcp_file_class where associate="+sel_tpl_id+")) "; sql+=" and (eth_subparameter='"+sel_sspar_abs+"' or eth_subparameter='.') and eth_parameter='"+sel_par+"'"; sql+=" and eth_dataset_version='"+sel_version+"' "; sql+=" and eth_ceos_level='"+sel_level+"' "; //sql+=" and eth_ceos_sublevel='"+sel_sublevel+"' "; sql+=" and eth_format='"+sel_format+"'"; al1=req.get_list(sql,cols); exp_alt_min=al1.get(6).toString(); exp_alt_max=al1.get(7).toString(); if(al1!=null && al1.size()>0) { if (exp_alt_min!=null && !exp_alt_min.equals("") && exp_alt_max!=null && !exp_alt_min.equals("")) { heightTexte="(Between "+exp_alt_min+" km and "+exp_alt_max+" km in altitude)"; } if (sel_mindate==null || sel_mindate.equals("") || sel_mindate.equals("null")) { mindate_ms=Long.parseLong(al1.get(0).toString()); DSMinDate=(new calDate(mindate_ms)).date_cal; } else { DSMinDate=sel_mindate; mindate_ms=(new calDate()).invers(sel_mindate); } if (sel_maxdate==null || sel_maxdate.equals("") || sel_maxdate.equals("null")) { maxdate_ms=Long.parseLong(al1.get(1).toString()); DSMaxDate=(new calDate(maxdate_ms)).date_cal; } else { DSMaxDate=sel_maxdate; maxdate_ms=(new calDate()).invers(sel_maxdate); } if (lonmin==null || lonmin.equals("") || lonmin.equals("null")) lonmin=al1.get(2).toString(); if (lonmax==null || lonmax.equals("") || lonmax.equals("null")) lonmax=al1.get(3).toString(); if (latmin==null || latmin.equals("") || latmin.equals("null")) latmin=al1.get(4).toString(); if (latmax==null || latmax.equals("") || latmax.equals("null")) latmax=al1.get(5).toString(); DSMinDate_file=DSMinDate; DSMaxDate_file=DSMaxDate; if (file_type_abs.equals("densite")) { sel_date_time=DSMinDate.substring(0,10); } lonmin_file=lonmin; lonmax_file=lonmax; latmin_file=latmin; latmax_file=latmax; } if (!all_data.equals("1") && !exp_nrecouv.equals("-1") && exp_nrecouv!=null) { calNRecouv pnrecouv = new calNRecouv((new calDate()).invers(DSMinDate),Integer.parseInt(exp_nrecouv),"jour"); DSMaxDate=pnrecouv.date_cal; if ((new calDate()).invers(DSMaxDate) > (new calDate()).invers(DSMaxDate_file)) DSMaxDate=DSMaxDate_file; } } else if ((sel_mindate!=null && sel_maxdate!=null)) { DSMinDate=sel_mindate; DSMaxDate=sel_maxdate; if (!file_type_abs.equals("densite")) { mindate_ms=(new calDate()).invers(sel_mindate); maxdate_ms=(new calDate()).invers(sel_maxdate); } else { mindate_ms=(new calDate()).invers(sel_date_time+"-00:00:00:000"); maxdate_ms=(new calDate()).invers(sel_date_time+"-23:59:59:000"); } } } } // LISTE DES FICHIERS diSponibles sel_file=""; file_list=null; nfile=0; sql="select is_batch, exp_nrecouv from sil_experiment_attribut where exp_id='"+sel_exp_id+"'"; exp_attribut_list=req.get_list(sql,exp_attribut_columns); if (exp_attribut_list==null || exp_attribut_list.size()==0) { is_batch="0"; exp_nrecouv="-1"; } else{ nreq=exp_attribut_list.size()/exp_attribut_columns.length; if( nreq>0 ){ k=0; is_batch=exp_attribut_list.get(k).toString(); 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(); else exp_nrecouv="-1"; } } if (sel_exp_public.equals("1")) { is_private="1"; private_data_flag="1"; } else { is_private="0"; private_data_flag="0"; } if (is_private.equals("1")) { if (is_batch.equals("0")) { droit="1"; modei="none"; } else { modei="email"; if (cemail.equals("") || cemail.equals("null")) { droit="0"; } else { droit="1"; } } download_auth="0"; } if (is_private.equals("0")) { // email=""; modei="loginu"; if (onlydata.equals("1")) { download_auth="1"; droit="1"; rightTexte="Only data"; } else { if (is_batch.equals("1")) { if (!cemail.equals("") && !cemail.equals("null")) { download_auth="1"; email=cemail; droit="1"; continuer="0"; } else continuer="1"; } else continuer="1"; if (continuer.equals("1")) { if (!login.equals("") && !passu.equals("")) { //recherche donnees utilisateur sql="select id,email,name,first_name from ether_user where login='"+login+"' and password='"+passu+"'"; user_list=req.get_list(sql,user_columns); if (user_list==null || user_list.size()==0) { droit="0"; login=""; passu=""; lance="0"; name="Login non-existent in Ether base"; modei="err"; } else{ nreq=user_list.size()/user_columns.length; if( nreq>0 ){ k=0; userid=user_list.get(k).toString(); email=user_list.get(k+1).toString(); name=user_list.get(k+2).toString(); first_name=user_list.get(k+3).toString(); } } //recherche group_id de l'experience sql="select eri_group_id from ether_experiment_right where eri_experiment_id='"+sel_exp_id+"'"; group_list=req.get_list(sql,group_columns); if (group_list==null || group_list.size()==0) { } else{ nreq=group_list.size()/group_columns.length; if( nreq>0 ){ k=0; group=group_list.get(k).toString(); } } //recherche droit utilisateur sql="select id from ether_group_user where user_id='"+userid+"' and group_id='"+group+"'"; priv_list=req.get_list(sql,priv_columns); if (priv_list==null || priv_list.size()==0) { download_auth="1"; login=""; passu=""; } else{ nreq=priv_list.size()/priv_columns.length; if( nreq>0 ){ droit="1"; download_auth="0"; } else { download_auth="1"; } } } droit="1"; } if (download_auth.equals("0")) rightTexte="Data and download"; else rightTexte="Only data"; } } if (download_auth.equals("0")) rightTexte="Data and download"; else rightTexte="Only data"; if (is_batch.equals("1")) modeTexte="BATCH"; else modeTexte="DIRECT"; ftitle=request.getParameter("ftitle"); if (ftitle==null || ftitle.equals("") || ftitle.equals("null")) { ftitle=""; } if (colour_bar_title==null || colour_bar_title.equals("") || colour_bar_title.equals("null")) { colour_bar_title=form_legend; } if (droit.equals("1") && !afficheTrace.equals("null") && afficheTrace.equals("1")) { sql="SELECT * "; sql+="FROM ether.ether_file where (eth_id_experiment="+sel_exp_id; sql+=" or eth_id_experiment=(select exp_id from ether.dcp_file_class where associate="+sel_tpl_id+")) "; sql+=" and (eth_subparameter='"+sel_sspar_abs+"' or eth_subparameter='.') and eth_parameter='"+file_par_abs+"'"; sql+=" and eth_dataset_version='"+sel_version+"' "; sql+=" and eth_ceos_level='"+sel_level+"' "; //sql+=" and eth_ceos_sublevel='"+sel_sublevel+"' "; sql+=" and eth_format='"+sel_format+"' and "; sql+=" (eth_last_date>="+mindate_ms+" and eth_first_date<="+maxdate_ms+") "; sql+="and (eth_lon_max>="+lonmin+" and eth_lon_min<="+lonmax+") and (eth_lat_max>="+latmin+" and eth_lat_min<="+latmax+") "; out.write(sql); file_list=req.get_list(sql,file_columns2); if (file_list==null || file_list.size()==0) { out.write(""); isFile=false; }else{ isFile=true; nfile=file_list.size()/file_columns2.length; if( nfile>0 ){ if (is_batch.equals("1")) mode="BATCH"; else mode="DIRECT"; k=0; for(i=0;i"; k+=file_columns2.length; } } } pageMode=""; if (sel_tpl_id!=null && !sel_tpl_id.equals("") && isFile==true) { pageMode=""; reader=file_reader(sel_tpl_id,req); if (sel_file!=null && !sel_file.equals("")) { files=sel_file; varid="[{variable:'"+file_par_abs+"', nature:'"+file_nature_abs+"', subvariable:'"+sel_sspar_abs+"', unite:'"+sel_unit_abs+"'}"+varY; varid+=more_varid; varid+="]"; typeOrdonnee=file_par_ord; reader_param_varid=file_par_abs+","+file_nature_abs+","+sel_sspar_abs+","+sel_unit_abs; reader_param_varid+="&"; reader_param_varid+=varY+more_varid; tt=(new stringSplit()).split(files,"&"); len=tt.length; if( tt[len-1].equals("")) len=len-1; filename=new String[len]; auxfile=new String[len]; infofile=""; for(i=0; i0 ){ infofile+=assoc[0]; }else{ infofile+="none"; } if (i0 ){ for(int p=0;p0) tab_paux+=","+nassoc[0]; else tab_paux+=",."; auxstruct+=tab_paux; if( p0) { k=0; docXML.meta_type=file_list.get(k).toString(); } } docXML.transfo=TRANSFO; docXML.dot_plot_dot_style=dot_plot_dot_style; if (dot_plot_colour_flag.equals("0")) docXML.dot_plot_colour_flag="1"; else docXML.dot_plot_colour_flag=dot_plot_colour_flag; docXML.dot_plot_dotcolour=dot_plot_dotcolour; docXML.dot_plot_dotsize=dot_plot_dotsize; if (levels.equals("1") && !userLevels.equals("") && !userLevels.equals("null")) { docXML.userLevels=userLevels; docXML.contour_level_setting_mode=levels; } else { docXML.userLevels=""; docXML.contour_level_setting_mode="0"; } if (file_par_ord.equals("Press")) { docXML.y_scale_format="2"; } String ret=docXML.generate(); if (mode.equals("BATCH")) { pageMode="lanceEnTacheDeFond.jsp"; if (!login.equals("") && !passu.equals("")) { chainePageMode="?id="+id_session+"&uniqueid="+uniqueid+"&mode="+mode+"&email="+email; } else { chainePageMode="?id="+id_session+"&uniqueid="+uniqueid+"&mode="+mode+"&email="+cemail; } } else { pageMode="lanceAppletEtherVisu.html"; chainePageMode="?id="+id_session+"&uniqueid="+uniqueid+"&mode="+mode+"&email="; } } } } par_options_abs+=""; par_options_abs0+=""; par_options_ord+=""; unit_options_abs+=""; //if (sspar_options.equals("") || sspar_options.equals("null") || sspar_options=="" || sspar_options==null) sspar_options=""; sspar_options+=""; ssparord_options+=""; unit_options_ord+=""; exp_options+=""; req.close_connection(); %> setAttribute et tableaux <%! boolean isUnitIdentique(String param1, String param2, String isord,send_request req) { String list=""; String[] cols1={"cls_acronym"}; ArrayList _list1=req.get_list("select cls_acronym from ether.dcp_parameter where par_acronym='"+param1+"' and (isord=2 or isord=1)",cols1); if( _list1==null || _list1.size()<1 ) return false; else { String[] cols2={"cls_acronym"}; ArrayList _list2=req.get_list("select cls_acronym from ether.dcp_parameter where par_acronym='"+param2+"' and (isord=2 or isord=1)",cols2); if( _list2==null || _list2.size()<1 ) return false; else { if (_list1.get(0).equals(_list2.get(0))) return true; else return false; } } } String getTransform(String trf_id,send_request req){ String list=""; 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"}; ArrayList _list=req.get_list( "select "+ "par_orig, "+ "param0.par_acronym as par_acr_orig, "+ "unit_orig, "+ "unit0.unit_acronym as unit_acr_orig, "+ "par_final, "+ "param3.par_acronym as par_acr_final, "+ "unit_final, "+ "unit3.unit_acronym as unit_acr_final, "+ "par_aux0, "+ "param1.par_acronym as par_acr_aux0, "+ "unit_aux0, "+ "unit1.unit_acronym as unit_acr_aux0, "+ "par_aux1, "+ "param2.par_acronym as par_acr_aux1, "+ "unit_aux1, "+ "unit2.unit_acronym as unit_acr_aux1 "+ "from "+ "ether.dcp_transformation, "+ "ether.dcp_parameter param0, "+ "ether.dcp_parameter param1, "+ "ether.dcp_parameter param2, "+ "ether.dcp_unit unit0, "+ "ether.dcp_unit unit1, "+ "ether.dcp_parameter param3, "+ "ether.dcp_unit unit2, "+ "ether.dcp_unit unit3 "+ "where "+ "param0.par_id = dcp_transformation.par_orig "+ "and param3.par_id=dcp_transformation.par_final "+ "and param1.par_id=dcp_transformation.par_aux0 "+ "and unit0.unit_id=dcp_transformation.unit_orig "+ "and unit3.unit_id=dcp_transformation.unit_final "+ "and unit1.unit_id=dcp_transformation.unit_aux0 "+ "and unit2.unit_id=dcp_transformation.unit_aux1 "+ "and param2.par_id=dcp_transformation.par_aux1 "+ "and trf_id= "+trf_id, columns); if( _list==null || _list.size()<1 ){ return "-1"; }else{ for(int i=0;i<_list.size();i++) list+=_list.get(i).toString()+"%"; } return list; } String getCombin(String combin_id,send_request req){ String list=""; String[] cols1={"trf_id"}; ArrayList _list=req.get_list( "select trf_id from ether.dcp_transf_comb where id="+combin_id+" order by trf_order", cols1); if( _list==null || _list.size()<1 ){ return "999"; }else{ for(int i=0;i<_list.size();i++) list+=_list.get(i).toString()+"%"; } return list; } /******************************************************/ String convert(String date){ String[] ddt=(new stringSplit()).split(date,"-"); String[] dates=(new stringSplit()).split(ddt[0],"/"); String[] times=(new stringSplit()).split(ddt[1],":"); return dates[0]+dates[1]+dates[2]+times[0]+times[1]+times[2]; } /*******************************************************/ // Traitement des combinaisons de transformations unitaires String treat_cbn(String cbn_id, String sel_tpl_id, int count, String origin_unit, String selected_unit, send_request req){ String varX="", more_varid="", Xtransfo="", AUX0transfo="", AUX1transfo=""; int num_aux0=999, num_aux1=999; // Liste des transformations unitaires \340 appliquer String list=getCombin(cbn_id,req); System.err.println(" LIST CBN : "+list); String[] cblist=(new stringSplit()).split(list,"%"); String mess="",result=""; int len=cblist.length; if( cblist[cblist.length-1].equals("") )len=len-1; mess=""; for(int i=0;isel_tpl_id="+sel_tpl_id+"->count="+count+"->origin_unit="+origin_unit+"->selected_unit="+selected_unit+"->testUnit="+testUnit; result=treat_trf(trf_id, sel_tpl_id, count, origin_unit, selected_unit, true, testUnit,req); //mess+="
"; //mess+=result; String[] spl=(new stringSplit()).split(result,"%"); // Seule la variable origine de la 1ere transformation est retenue if(i==0 ) { varX+=spl[0]; } // Ajout d'une commande de transformation en bout de ligne if( i>0 ){ Xtransfo=Xtransfo.substring(0,Xtransfo.length()-2)+","; //spl[1]=spl[1].substring(9); } Xtransfo+=spl[1]; //mess+="@@"+spl[1]; AUX0transfo=spl[2]; AUX1transfo=spl[3]; count=Integer.parseInt(spl[4]); more_varid+=spl[5]; } return varX+"%"+Xtransfo+"%"+AUX0transfo+"%"+AUX1transfo+"%"+count+"%"+more_varid; } // Recherche des fichiers associ\351s au tuple tpl_id String[] scanAssociates(String type, String tpl_id, String file, String rep_data,send_request req) { String[] retour=null; String sfile=new File(file).getName(); String columns[]={"type", "command"}; ArrayList _list=req.get_list( "select * from ether.dcp_associate "+ "where type='"+type+"' and tpl_id="+tpl_id, columns); if( _list==null || _list.size()<1 ){ return retour; } else{ int nrow=_list.size()/columns.length; retour=new String[nrow]; int k=0; for(int j=0;j=0 ){ zcount++; z+=search.length(); }else{ break; } } return zcount; } String treat_trf(String trf_id, String sel_tpl_id, int count, String origin_unit, String selected_unit, boolean testUnit0, boolean testUnit1 ,send_request req){ String more_varid="", Xtransfo="", AUX0transfo="", AUX1transfo=""; int num_aux0=999, num_aux1=999; String list=getTransform(trf_id,req); String[] tlist=(new stringSplit()).split(list,"%"); //(0:par_id,1:par_acr,2:unit_id,3:unit_acr) String natx=getField(sel_tpl_id,"src_acronym",tlist[1],req); String sspar0=getField(sel_tpl_id,"subvariable",tlist[1],req); //return "tlist1="+tlist[1]+"--> natx="+natx; // String varX=",{variable:'"+tlist[1]+"', nature:'"+natx+ // "', subvariable:'.', unite:'"+tlist[3]+"'}"; String varX=tlist[1]+","+natx+","+sspar0+","+tlist[3]; // V\351rification de l'unit\351 de la variable origine : est-ce la m\352me que celle requise par la transformation String before_trf=""; if( testUnit0 && !origin_unit.equals(tlist[3]) ){ String ids=get_conv("acr", origin_unit, tlist[3],req); String cnv_id=(new stringSplit()).split(ids,"%")[0]; before_trf="conv"+cnv_id+",999,999#"; } // V\351rification de l'unit\351 de la variable finale / s\351lectionn\351e String more_trf=""; if( testUnit1 && !selected_unit.equals(tlist[7]) ){ String ids=get_conv("acr", tlist[7], selected_unit,req); String cnv_id=(new stringSplit()).split(ids,"%")[0]; more_trf="#conv"+cnv_id+",999,999"; } // Il y a une variable auxiliaire (0) AUX0transfo=""; if( tlist.length>3 && !tlist[8].equals("999") ){ String nat=getField(sel_tpl_id,"src_acronym",tlist[9],req); String unit_id=getField(sel_tpl_id,"unit_id",tlist[9],req); String sspar1=getField(sel_tpl_id,"subvariable",tlist[9],req); more_varid+="&"+tlist[9]+","+nat+","+sspar1+","+tlist[11]; count++; num_aux0=count; // Changement d'unit\351 pour la variable auxiliaire 0 if( !unit_id.equals("-1") && !unit_id.equals(tlist[10]) ){ String ids0=get_conv("id", unit_id, tlist[10],req); String cnv_id0=(new stringSplit()).split(ids0,"%")[0]; if( !Xtransfo.equals("") )Xtransfo+=","; AUX0transfo="conv"+cnv_id0+",999,999"; }else{ AUX0transfo="t999,999,999"; } } // Il y a une autre variable auxiliaire (1) AUX1transfo=""; if( tlist.length>7 && !tlist[12].equals("999") ){ String nat=getField(sel_tpl_id,"src_acronym",tlist[13],req); String unit_id=getField(sel_tpl_id,"unit_id",tlist[13],req); String sspar2=getField(sel_tpl_id,"subvariable",tlist[13],req); more_varid+="&"+tlist[13]+","+nat+","+sspar2+","+tlist[15]; count++; num_aux1=count; // Changement d'unit\351 pour la variable auxiliaire 1 if( !unit_id.equals("-1") && !unit_id.equals(tlist[14]) ){ String ids1=get_conv("id", unit_id, tlist[14],req); String cnv_id1=(new stringSplit()).split(ids1,"%")[0]; AUX1transfo="conv"+cnv_id1+",999,999"; }else{ AUX1transfo="t999,999,999"; } } Xtransfo=before_trf+"t"+trf_id+","+num_aux0+","+num_aux1+more_trf; // return varX+"%"+Xtransfo+"%"+AUX0transfo+"%"+AUX1transfo+"%"+count+"%"+more_varid; } String getField(String tpl_id, String field, String parameter,send_request req){ String list=""; String columns[]={field}; ArrayList _list=req.get_list( "select "+field+" from ether.dcp_descripteur where (tpl_id="+tpl_id+ " or tpl_id=(select tpl_id from ether.dcp_file_class where associate="+tpl_id+ ")) and par_acronym='"+parameter+"'",columns); if( _list==null || _list.size()<1 ){ //_list="select "+field+" from ether.dcp_descripteur where (tpl_id="+tpl_id; //_list+=" or tpl_id=(select tpl_id from ether.dcp_file_class where associate="+tpl_id; //_list+=")) and par_acronym='"+parameter+"'"; return "-1"; }else{ list=_list.get(0).toString(); } return list; } String get_conv(String type, String unit_orig, String unit_final,send_request req){ String cnv_id="", trf_id=""; String unit_id_orig="", unit_id_final=""; ArrayList _list; if( type.equals("acr") ){ String columns[]={"unit_id"}; _list=req.get_list( "SELECT * FROM ether.dcp_unit where unit_acronym='"+unit_orig+"'",columns); if( _list==null || _list.size()!=1 ){ return "-1%-1"; } unit_id_orig=_list.get(0).toString(); _list=req.get_list( "SELECT * FROM ether.dcp_unit where unit_acronym='"+unit_final+"'",columns); if( _list==null || _list.size()!=1 ){ return "-1%-1"; } unit_id_final=_list.get(0).toString(); }else if( type.equals("id") ){ unit_id_orig=unit_orig; unit_id_final=unit_final; } String cols[]={"cnv_id", "trf_id"}; _list=req.get_list( "SELECT * FROM ether.dcp_conversion where unit_orig="+unit_id_orig+ " and unit_final="+unit_id_final,cols); if( _list==null || _list.size()!=cols.length ){ return "-1%-1"; }else{ cnv_id=_list.get(0).toString(); trf_id=_list.get(1).toString(); } return cnv_id+"%"+trf_id; } /**********************************/ String file_reader(String sel_tpl_id, send_request req) { String rd_function=""; String columns[]={"rd_function"}; 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); if(_list==null || _list.size()<1 ) return "-1"; else rd_function=_list.get(0).toString(); return rd_function; } String getValueParam(String nameParam, String defaultValueParam, ServletRequest request) { String var=request.getParameter(nameParam); if (var==null || var.equals("") || var.equals("null")) { var=defaultValueParam; } return var; } %>
<%@ include file="form_parameters.jsp" %> <%@ include file="form_location.jsp" %> <%@ include file="form_ho.jsp" %>
<%@ include file="hidden_values.jsp" %>
DATA SETTINGS
<%@ include file="form_data_selection.jsp" %>
 
<%@ include file="form_interpolation.jsp" %> <%@ include file="form_projection.jsp" %> <%@ include file="form_graph_sel.jsp" %> <%@ include file="form_legends.jsp" %>
GRAPHIC SETTINGS