Changeset 551


Ignore:
Timestamp:
09/17/12 11:07:20 (12 years ago)
Author:
npipsl
Message:

Changement du spectral range en fonction de la base GEISA selectionnee

Location:
geisa
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • geisa/persistence/implementation/hibernate.cfg.xml

    r533 r551  
    2222                <prop key="hibernate.connection.driver_class">com.mysql.jdbc.Driver</prop> 
    2323                <prop key="hibernate.connection.url">jdbc:mysql://localhost/geisa</prop> 
     24                <!-- en local--> 
    2425                <prop key="hibernate.connection.username">root</prop> 
     26                <!-- sur naboo   --> 
     27               <!--  <prop key="hibernate.connection.username">geisa</prop>--> 
    2528                <prop key="hibernate.connection.password">geisa11</prop> 
    2629                <prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop> 
  • geisa/web/initGeisa.jsp

    r548 r551  
    115115                <div id="specTrans" class="specTrans"> 
    116116                    <div id="spectralRange" class="spectralRange"> 
    117                         <fieldset><legend><b>Choosing the spectral range from 0 to 35877.030506 cm<sup>-1</sup> :</b></legend> 
     117                        <!--<fieldset><legend><b>Choosing the spectral range from 0 to 35877.030506 cm<sup>-1</sup> :</b></legend>--> 
     118                        <fieldset><legend><b><div id="spectralRangeTitre"></div></b></legend> 
     119 
    118120                            <div id="spectralRangeLower" class="spectralRangeLower"></div> 
    119121                            <div id="spectralRangeUpper" class="spectralRangeUpper"></div> 
  • geisa/web/initGeisa_script.jsp

    r548 r551  
    496496 
    497497                //Zone texte  SpectralRange 
     498                //Titre général (qui changera en fonction de la base geisa choisie) 
     499                document.getElementById('spectralRangeTitre').innerHTML = ""; 
     500                document.getElementById('spectralRangeTitre').innerHTML = "Choosing the spectral range from 0 to 35877.030506 cm<sup>-1</sup>"; 
     501 
    498502                //Titre 
    499503                var titleSpectralRangeLower = document.createTextNode("Lower Bound :"); 
     
    865869                switch (this.selectDatabase.getValue()) { 
    866870                    case 'GEISA2003': 
    867                         //paramBase = "EEE-dirinEEE"+this.pathProcess+"EEE-diroutEEE"+this.LongPathImages+"EEE-fileinEEE"+this.pathProcess+"line_GEISA2003_asc_gs03_v1.0EEE-input_formatEEEascEEE-database_nameEEEGEISA2003EEE-database_typeEEEgs03"; 
    868                         paramBase = "EEE-dirinEEE"+this.pathProcess+"EEE-fileinEEE"+this.pathProcess+"line_GEISA2003_asc_gs03_v1.0EEE-input_formatEEEascEEE-database_nameEEEGEISA2003EEE-database_typeEEEgs03"; 
     871                        paramBase = " -dirin "+this.pathProcess+" -dirout "+this.LongPathImages+" -filein "+this.pathProcess+"line_GEISA2003_asc_gs03_v1.0 -input_format asc -database_name GEISA2003 -database_type gs03"; 
    869872                        break; 
    870873                    case 'GEISA2011': 
    871                         paramBase = "EEE-dirinEEE"+this.pathProcess+"EEE-diroutEEE"+this.LongPathImages+"EEE-fileinEEE"+this.pathProcess+"line_GEISA2009_binEEE-database_nameEEEGEISA2011EEE-database_typeEEEgs08"; 
    872                         //paramBase = "EEE-dirinEEE"+this.pathProcess+"EEE-fileinEEE"+this.pathProcess+"line_GEISA2009_binEEE-database_nameEEEGEISA2011EEE-database_typeEEEgs08"; 
     874                        paramBase = " -dirin "+this.pathProcess+" -dirout "+this.LongPathImages+" -filein "+this.pathProcess+"line_GEISA2009_bin -database_name GEISA2011 -database_type gs08"; 
    873875                        break; 
    874876                    case 'GEISAIASI2003': 
    875                         paramBase = "EEE-dirinEEE"+this.pathProcess+"EEE-diroutEEE"+this.LongPathImages+"EEE-fileinEEE"+this.pathProcess+"line_GEISAIASI2003_asc_gsi03_v1.0EEE-input_formatEEEascEEE-database_nameEEEGEISAIASI2003EEE-database_typeEEEgsi03"; 
    876                         //paramBase = "EEE-dirinEEE"+this.pathProcess+"EEE-fileinEEE"+this.pathProcess+"line_GEISAIASI2003_asc_gsi03_v1.0EEE-input_formatEEEascEEE-database_nameEEEGEISAIASI2003EEE-database_typeEEEgsi03"; 
     877                        paramBase = " -dirin "+this.pathProcess+" -dirout "+this.LongPathImages+" -filein "+this.pathProcess+"line_GEISAIASI2003_asc_gsi03_v1.0 -input_format asc -database_name GEISAIASI2003 -database_type gsi03"; 
    877878                        break; 
    878879                    case 'GEISAIASI2011': 
    879                         paramBase = "EEE-dirinEEE"+this.pathProcess+"EEE-diroutEEE"+this.LongPathImages+"EEE-fileinEEE"+this.pathProcess+"line_GEISAIASI2011_bin_gsi08_v1.0EEE-database_nameEEEGEISAIASI2011EEE-database_typeEEEgsi08"; 
    880                         //paramBase = "EEE-dirinEEE"+this.pathProcess+"EEE-fileinEEE"+this.pathProcess+"line_GEISAIASI2011_bin_gsi08_v1.0EEE-database_nameEEEGEISAIASI2011EEE-database_typeEEEgsi08"; 
     880                        paramBase = " -dirin "+this.pathProcess+" -dirout "+this.LongPathImages+" -filein "+this.pathProcess+"line_GEISAIASI2011_bin_gsi08_v1.0 -database_name GEISAIASI2011 -database_type gsi08"; 
    881881                        break; 
    882882                } 
     
    904904                        var molN=input.value; 
    905905                        var molN1=molN.replace("_", ":"); 
    906                         // exemple : -moleisotEEEh2o:161EEE-moleisotEEEh2o:162EEE-moleisotEEEco2:626EEE-moleisotEEEco2:627EEE-moleisotEEEo3:666EEE-moleisotEEEo3:668 
    907                         isotopesSelectedName = isotopesSelectedName+"-moleisotEEE"+molN1+"EEE"; 
     906                        // exemple : -moleisot h2o:161 -moleisot h2o:162 -moleisot co2:626 -moleisot co2:627 -moleisot o3:666 -moleisot o3:668 
     907                        isotopesSelectedName = isotopesSelectedName+"-moleisot "+molN1+" "; 
    908908                    } 
    909909                    //récupération du nombre de molécules sélectionnées 
     
    929929                switch (this.SelectNbCourbes.getValue()) { 
    930930                    case 'cm': 
    931                         nbCourbes = "-separate_molEEE-same_graphEEE"; 
     931                        nbCourbes = "-separate_mol -same_graph "; 
    932932                        this.nbGraph = 1; 
    933933                        this.nbCourbe =  this.nbMolecules; 
     
    938938                        break; 
    939939                    case 'ci': 
    940                         nbCourbes = "-separate_isoEEE-same_graphEEE"; 
     940                        nbCourbes = "-separate_iso -same_graph "; 
    941941                        this.nbGraph = 1; 
    942942                        this.nbCourbe =  this.nbIsotopes; 
     
    947947                        break; 
    948948                    case 'gm': 
    949                         nbCourbes = "-separate_molEEE"; 
     949                        nbCourbes = "-separate_mol "; 
    950950                        this.nbGraph = this.nbMolecules; 
    951951                        if (this.nbGraph > 20) { 
     
    955955                        break; 
    956956                    case 'gi': 
    957                         nbCourbes = "-separate_isoEEE"; 
     957                        nbCourbes = "-separate_iso "; 
    958958                        this.nbGraph = this.nbIsotopes; 
    959959                        if (this.nbGraph > 20) { 
     
    970970 
    971971                //Spectral range 
    972                 var rangeLower="-wavenb_minEEE"+$("#RangeLower").val(); 
    973                 var rangeUpper="-wavenb_maxEEE"+$("#RangeUpper").val(); 
     972                var rangeLower="-wavenb_min "+$("#RangeLower").val(); 
     973                var rangeUpper="-wavenb_max "+$("#RangeUpper").val(); 
    974974 
    975975                //controle des valeurs entrées par l'utilisateur 
    976                 //isNaN = n'est pas un nombre 
    977                 if(isNaN($("#RangeLower").val()) == true ||   $("#RangeLower").val() < 0  ) 
    978                 { 
    979                     alert("Error: Invalid value for lower spectral range area"); 
    980                     return; 
    981                 } 
     976 
     977                switch (this.selectDatabase.getValue()) { 
     978                    case 'GEISA2003': 
     979                        //isNaN = n'est pas un nombre 
     980                        if(isNaN($("#RangeLower").val()) == true ||   parseInt($("#RangeLower").val()) < 0  || parseInt($("#RangeLower").val()) > 35877.030506) 
     981                        { 
     982                            alert("Error: Invalid value for lower spectral range area"); 
     983                            return; 
     984                        } 
     985 
     986                        if(isNaN($("#RangeUpper").val()) == true ||   parseInt( $("#RangeUpper").val()) == 0 || parseInt( $("#RangeUpper").val()) < 0  || parseInt($("#RangeUpper").val()) > 35877.030506) 
     987                        { 
     988                            alert("Error: Invalid value for upper spectral range area"); 
     989                            return; 
     990                        } 
     991                        break; 
     992                    case 'GEISA2011': 
     993                        //isNaN = n'est pas un nombre 
     994                        if(isNaN($("#RangeLower").val()) == true ||   parseInt($("#RangeLower").val()) < 0  || parseInt($("#RangeLower").val()) > 35877.030506) 
     995                        { 
     996                            alert("Error: Invalid value for lower spectral range area"); 
     997                            return; 
     998                        } 
     999 
     1000                        if(isNaN($("#RangeUpper").val()) == true ||   parseInt( $("#RangeUpper").val()) == 0 || parseInt( $("#RangeUpper").val()) < 0  || parseInt($("#RangeUpper").val()) > 35877.030506) 
     1001                        { 
     1002                            alert("Error: Invalid value for upper spectral range area"); 
     1003                            return; 
     1004                        } 
     1005                        break; 
     1006                    case 'GEISAIASI2003': 
     1007                        //isNaN = n'est pas un nombre 
     1008                        if(isNaN($("#RangeLower").val()) == true ||   parseInt($("#RangeLower").val()) < 0 || parseInt($("#RangeLower").val()) < 599.000793 || parseInt($("#RangeLower").val()) > 3000.998767) 
     1009                        { 
     1010                            alert("Error: Invalid value for lower spectral range area"); 
     1011                            return; 
     1012                        } 
     1013 
     1014                        if(isNaN($("#RangeUpper").val()) == true ||   parseInt( $("#RangeUpper").val()) == 0 || parseInt( $("#RangeUpper").val()) < 0  ||  parseInt($("#RangeUpper").val()) < 599.000793 || parseInt($("#RangeUpper").val()) > 3000.998767) 
     1015                        { 
     1016                            alert("Error: Invalid value for upper spectral range area"); 
     1017                            return; 
     1018                        } 
     1019                        break; 
     1020                    case 'GEISAIASI2011': 
     1021                        //isNaN = n'est pas un nombre 
     1022                        if(isNaN($("#RangeLower").val()) == true ||   parseInt($("#RangeLower").val()) < 0 || parseInt($("#RangeLower").val()) < 599.000793 || parseInt($("#RangeLower").val()) > 3000.998767) 
     1023                        { 
     1024                            alert("Error: Invalid value for lower spectral range area"); 
     1025                            return; 
     1026                        } 
     1027 
     1028                        if(isNaN($("#RangeUpper").val()) == true ||   parseInt( $("#RangeUpper").val()) == 0 || parseInt( $("#RangeUpper").val()) < 0  ||  parseInt($("#RangeUpper").val()) < 599.000793 || parseInt($("#RangeUpper").val()) > 3000.998767) 
     1029                        { 
     1030                            alert("Error: Invalid value for upper spectral range area"); 
     1031                            return; 
     1032                        } 
     1033                        break; 
     1034                } 
     1035 
     1036 
    9821037                if ($("#RangeLower").val() == ""  ) 
    9831038                { 
    9841039                    rangeLower=""; 
    9851040                } 
    986                 if(isNaN($("#RangeUpper").val()) == true ||  parseInt( $("#RangeUpper").val()) < 0  || parseInt($("#RangeUpper").val()) > 35877.030506) 
    987                 { 
    988                     alert("Error: Invalid value for upper spectral range area"); 
    989                     return; 
    990                 } 
     1041 
    9911042                if ($("#RangeUpper").val() == ""  ) 
    9921043                { 
     
    10001051 
    10011052 
    1002                  //Transitions  to do 
     1053                //Transitions  to do 
    10031054                //exemple de requete avec transition 
    1004                   //./all -filein line_GEISA2009_bin -moleisot h2o:161 -wavenb_min 1 -wavenb_max 1000 -database_name "GEISA2011" -vib_ident_lower '[000]' 
    1005                 //var TransitionUpper ="-vib_ident_upperEEE'[EEE"+this.selectTransitionUpper.getValue()+"EEE]'"; 
    1006  
    1007                   var TransitionUp=document.getElementById('transition1').options[document.getElementById('transition1').selectedIndex].value; 
    1008                  //Enlever les espaces blancs 
     1055                //./all -filein line_GEISA2009_bin -moleisot h2o:161 -wavenb_min 1 -wavenb_max 1000 -database_name "GEISA2011" -vib_ident_lower '[000]' 
     1056                //var TransitionUpper ="-vib_ident_upper '[ "+this.selectTransitionUpper.getValue()+" ]'"; 
     1057                var TransitionUp=document.getElementById('transition1').options[document.getElementById('transition1').selectedIndex].value; 
     1058                //Enlever les espaces blancs 
    10091059                TransitionUp= TransitionUp.replace(/ /g,""); 
    1010                   var TransitionUpper ="-vib_ident_upperEEE["+TransitionUp+"]"; 
    1011                  // var TransitionUpper ="-vib_ident_upperEEE'["+document.getElementById('transition1').options[document.getElementById('transition1').selectedIndex].value+"]'"; 
    1012                // var TransitionLower ="-vib_ident_lowerEEE'[EEE"+this.selectTransitionLower.getValue()+"EEE]'"; 
    1013  
    1014  
     1060                var TransitionUpper ="-vib_ident_upper ["+TransitionUp+"]"; 
     1061 
     1062                // var TransitionLower ="-vib_ident_lower '[ "+this.selectTransitionLower.getValue()+" ]'"; 
    10151063                  var TransitionLo=document.getElementById('transition2').options[document.getElementById('transition2').selectedIndex].value; 
    10161064                  TransitionLo= TransitionLo.replace(/ /g,""); 
    1017                   var TransitionLower ="-vib_ident_lowerEEE["+TransitionLo+"]"; 
    1018                  // var TransitionLower ="-vib_ident_lowerEEE'["+document.getElementById('transition2').options[document.getElementById('transition2').selectedIndex].value+"]'"; 
    1019                 //pas de transition sélectionnée 
     1065                  var TransitionLower ="-vib_ident_lower ["+TransitionLo+"]"; 
     1066 
     1067                 //pas de transition sélectionnée 
    10201068                // if (( this.selectTransitionUpper.getValue()== -1) ||  (this.selectTransitionUpper.getValue() == "transition" )) 
    10211069                // { 
     
    10411089 
    10421090                //Intensity range 
    1043                 var intensityLower="-int_minEEE"+$("#intensityLo").val(); 
    1044                 var intensityUpper="-int_maxEEE"+$("#intensityUp").val(); 
     1091                var intensityLower="-int_min "+$("#intensityLo").val(); 
     1092                var intensityUpper="-int_max "+$("#intensityUp").val(); 
    10451093 
    10461094                //controle des valeurs entrées par l'utilisateur 
     
    10741122 
    10751123                //Valeur de mean value 
    1076                 var meanValue = "-stepEEE"+$("#meanValue2").val(); 
     1124                var meanValue = "-step "+$("#meanValue2").val(); 
    10771125                //controle des valeurs entrées par l'utilisateur 
    10781126                //Si ce n'est pas un nombre ou si il est négatif 
     
    10891137 
    10901138                //sélection du premier choix pour l'axe des Y 
    1091                 var field="-fieldEEE"+this.selectTraceAxeY1.getValue(); 
     1139                var field="-field "+this.selectTraceAxeY1.getValue(); 
    10921140 
    10931141 
     
    11031151 
    11041152                //sélection du type de tracé pour Y1 
    1105                 var lineType="-line_typeEEE"+this.selectTypeTraceY1.getValue(); 
     1153                var lineType="-line_type "+this.selectTypeTraceY1.getValue(); 
    11061154 
    11071155 
     
    11131161                else 
    11141162                { 
    1115                     var field2 = "-field2EEE"+this.selectTraceAxeY2.getValue(); 
     1163                    var field2 = "-field2 "+this.selectTraceAxeY2.getValue(); 
    11161164                } 
    11171165 
     
    11341182                else 
    11351183                { 
    1136                     var lineType2 = "-line_type2EEE"+this.selectTypeTraceY2.getValue(); 
     1184                    var lineType2 = "-line_type2 "+this.selectTypeTraceY2.getValue(); 
    11371185                } 
    11381186 
     
    11451193 
    11461194                //construction de la requête Fortran 
    1147                 var parameters = "&fortranRequest="+paramBase+"EEE"+isotopesSelectedName+"EEE"+rangeLower+"EEE"+rangeUpper+"EEE"+TransitionUpper+"EEE"+TransitionLower+"EEE"+intensityLower+"EEE"+intensityUpper+"EEE"+ 
    1148                                        meanValue+"EEE"+nbCourbes+"EEE"+field+"EEE"+logScale+"EEE"+lineType+"EEE"+field2+"EEE"+logScale2+"EEE"+lineType2; 
    1149  
    1150                 // var chaine=" 111 25 3 6  "; 
    1151                 // alert("chaine1="+chaine); 
    1152                 // chaine=chaine.replace(/ /g,"EEE"); 
    1153                 // alert("chaine2="+chaine); 
     1195                var parameters = "&fortranRequest="+paramBase+" "+isotopesSelectedName+" "+rangeLower+" "+rangeUpper+" "+TransitionUpper+" "+TransitionLower+" "+intensityLower+" "+intensityUpper+" "+ 
     1196                                       meanValue+" "+nbCourbes+" "+field+" "+logScale+" "+lineType+" "+field2+" "+logScale2+" "+lineType2; 
     1197 
     1198 
     1199                //remplacement de espace par "EEE" pour que le shell script ne voit qu'un seul argument en entrée 
    11541200                parameters=parameters.replace(/ /g,"EEE"); 
    1155                 //alert(parameters); 
     1201                alert(parameters); 
    11561202 
    11571203                //envoie de la requête au controller 
     
    15161562 
    15171563 
    1518             //affichage du bloc des molecules en fonction de la base de donnees selectionnee 
     1564            //affichage de la valeur du spectral range et affichage du bloc des molecules en fonction de la base de donnees selectionnee 
    15191565            onClickSelectDatabase: function(value) 
    15201566            { 
     
    15221568                if  ('GEISA2011' == value) 
    15231569                { 
     1570                    document.getElementById('spectralRangeTitre').innerHTML = ""; 
     1571                    document.getElementById('spectralRangeTitre').innerHTML = "Choosing the spectral range from 0 to 35877.030506 cm<sup>-1</sup>"; 
     1572                    $("#RangeLower").val(0); 
     1573                    $("#RangeUpper").val(35877.030506); 
     1574 
    15241575                    document.getElementById( "BDD-GEISA2011" ).style.display = ""; 
    15251576                    document.getElementById( "BDD-GEISAIASI2011" ).style.display = "none"; 
     
    15301581                if  ('GEISAIASI2011' == value) 
    15311582                { 
     1583                    document.getElementById('spectralRangeTitre').innerHTML = ""; 
     1584                    document.getElementById('spectralRangeTitre').innerHTML = "Choosing spectral range (599.000793 to 3000.998767 cm<sup>-1</sup>)"; 
     1585                    $("#RangeLower").val(599.000793); 
     1586                    $("#RangeUpper").val(3000.998767); 
     1587 
    15321588                    document.getElementById( "BDD-GEISA2011" ).style.display = "none"; 
    15331589                    document.getElementById( "BDD-GEISAIASI2011" ).style.display = ""; 
     
    15381594                if  ('GEISA2003' == value) 
    15391595                { 
     1596                    document.getElementById('spectralRangeTitre').innerHTML = ""; 
     1597                    document.getElementById('spectralRangeTitre').innerHTML = "Choosing the spectral range from 0 to 35877.030506 cm<sup>-1</sup>"; 
     1598                    $("#RangeLower").val(0); 
     1599                    $("#RangeUpper").val(35877.030506); 
     1600 
    15401601                    document.getElementById( "BDD-GEISA2011" ).style.display = "none"; 
    15411602                    document.getElementById( "BDD-GEISAIASI2011" ).style.display = "none"; 
     
    15451606                if  ('GEISAIASI2003' == value) 
    15461607                { 
     1608                    document.getElementById('spectralRangeTitre').innerHTML = ""; 
     1609                    document.getElementById('spectralRangeTitre').innerHTML = "Choosing spectral range (599.000793 to 3000.998767 cm<sup>-1</sup>)"; 
     1610                    $("#RangeLower").val(599.000793); 
     1611                    $("#RangeUpper").val(3000.998767); 
     1612 
    15471613                    document.getElementById( "BDD-GEISA2011" ).style.display = "none"; 
    15481614                    document.getElementById( "BDD-GEISAIASI2011" ).style.display = "none"; 
  • geisa/web/src/com/ether/Controller.java

    r542 r551  
    208208    public static final String PATH_IMAGES = "resources/images/graphGeisa/"; 
    209209    public static final String LONG_PATH_IMAGES = "/home_local/npipsl/workspaces/GEISA/web/resources/images/graphGeisa/"; 
     210     //  naboo 
     211     // public static final String LONG_PATH_IMAGES = "/usr/local/apache-tomcat/webapps/geisa/resources/images/graphGeisa/"; 
    210212    public static final String PATH_PROCESS = "/home/npipsl/Desktop/geisa-Graphique/prog-ether/"; 
     213    //naboo 
     214   // public static final String PATH_PROCESS = "/home/www/GEISA/"; 
    211215    private static final String VIEW_INIT = "init"; 
    212216    private static final String VIEW_INIT2 = "initGeisa"; 
Note: See TracChangeset for help on using the changeset viewer.