Changeset 825
- Timestamp:
- 07/31/15 16:26:38 (9 years ago)
- Location:
- tapas
- Files:
-
- 6 added
- 13 edited
- 3 copied
Legend:
- Unmodified
- Added
- Removed
-
tapas/Tapas.iml
r419 r825 4 4 <facet type="hibernate" name="Hibernate"> 5 5 <configuration> 6 <datasource-map /> 6 <datasource-map> 7 <unit-entry name="hibernate-domain.cfg.xml" /> 8 </datasource-map> 7 9 <deploymentDescriptor name="hibernate.cfg.xml" url="file://$MODULE_DIR$/persistence/implementation/hibernate-domain.cfg.xml" /> 8 10 </configuration> -
tapas/common/Common.iml
r816 r825 21 21 </library> 22 22 </orderEntry> 23 <orderEntry type="library" exported=""name="lib_common" level="project" />23 <orderEntry type="library" name="lib_common" level="project" /> 24 24 <orderEntry type="library" name="lib_spring" level="project" /> 25 25 <orderEntry type="library" name="lib_hibernate" level="project" /> -
tapas/domain/interface/com/ether/tapas/FileRequest.java
r816 r825 7 7 * @date 08 march 2012 8 8 */ 9 public class Request9 public class FileRequest 10 10 { 11 11 12 @NotNull 12 13 public Long getId() … … 21 22 22 23 @NotNull 23 public Preference getPreference()24 public String getName() 24 25 { 25 return _ preference;26 return _cxml; 26 27 } 27 28 28 public void set Preference( @NotNull final Preference preference)29 public void setName( @NotNull final String cxml ) 29 30 { 30 _preference = preference; 31 } 32 33 @NotNull 34 public Observation getObservation() 35 { 36 return _observation; 37 } 38 39 public void setObservation( @NotNull final Observation observation ) 40 { 41 _observation = observation; 42 } 43 44 @NotNull 45 public Atmosphere getAtmosphere() 46 { 47 return _atmosphere; 48 } 49 50 public void setAtmosphere( @NotNull final Atmosphere atmosphere ) 51 { 52 _atmosphere = atmosphere; 53 } 54 55 public int getValid() 56 { 57 return _isValid; 58 } 59 60 public void setValid( final int valid ) 61 { 62 _isValid = valid; 31 _cxml = cxml; 63 32 } 64 33 65 34 @NotNull 66 35 private Long _id; 67 private int _isValid;68 36 @NotNull 69 private Preference _preference; 70 @NotNull 71 private Observation _observation; 72 @NotNull 73 private Atmosphere _atmosphere; 37 private String _cxml; 38 39 74 40 } -
tapas/domain/interface/com/ether/tapas/Request.java
r816 r825 9 9 public class Request 10 10 { 11 @NotNull 11 12 12 public Long getId() 13 13 { … … 20 20 } 21 21 22 @NotNull 22 23 23 public Preference getPreference() 24 24 { … … 26 26 } 27 27 28 public void setPreference( @NotNullfinal Preference preference )28 public void setPreference( final Preference preference ) 29 29 { 30 30 _preference = preference; 31 31 } 32 32 33 @NotNull 33 34 34 public Observation getObservation() 35 35 { … … 37 37 } 38 38 39 public void setObservation( @NotNullfinal Observation observation )39 public void setObservation( final Observation observation ) 40 40 { 41 41 _observation = observation; 42 42 } 43 43 44 @NotNull 44 45 45 public Atmosphere getAtmosphere() 46 46 { … … 48 48 } 49 49 50 public void setAtmosphere( @NotNullfinal Atmosphere atmosphere )50 public void setAtmosphere( final Atmosphere atmosphere ) 51 51 { 52 52 _atmosphere = atmosphere; … … 63 63 } 64 64 65 @NotNull 65 public String getcXml() 66 { 67 return _cXml; 68 } 69 70 public void setcXml( final String cXml ) 71 { 72 _cXml = cXml; 73 } 74 75 66 76 private Long _id; 67 77 private int _isValid; 68 @NotNull 78 69 79 private Preference _preference; 70 @NotNull 80 71 81 private Observation _observation; 72 @NotNull 82 73 83 private Atmosphere _atmosphere; 84 85 private String _cXml; 74 86 } -
tapas/domain/interface/com/ether/tapas/Tapas.java
r400 r825 11 11 public class Tapas 12 12 { 13 13 14 @NotNull 14 15 public String getId() … … 17 18 } 18 19 20 19 21 public void setId( @NotNull final String id ) 20 22 { … … 22 24 } 23 25 24 @NotNull 26 25 27 public List<Request> getRequests() 26 28 { 27 29 return _requests; 28 30 } 31 29 32 30 33 public void setRequests( @NotNull final List<Request> requests ) … … 33 36 } 34 37 38 35 39 @NotNull 36 40 private String _id; 37 @NotNull 41 38 42 private List<Request> _requests; 43 44 45 39 46 } -
tapas/service/implementation/com/ether/TapasServiceImpl.java
r817 r825 54 54 final String dataPath = prop.getProperty( "data_path" ); 55 55 56 //final String fichier = servicePath + "/" + "request.xml"; 57 final Element tapas = new Element( "tapas" ); 58 final List<Element> listRequest = new ArrayList<Element>( fTapas.getRequests().size() ); 59 60 //On crée un nouveau Document JDOM basé sur la racine que l'on vient de créer 61 final Document document = new Document( tapas ); 62 63 //recuperation valeur id requete (bdd table tapas_request) 64 fTapas.setId( "Ether_TAPAS_" + String.valueOf( getNumRequest() ) ); 65 66 final Attribute id = new Attribute( "Id", fTapas.getId() ); 67 tapas.setAttribute( id ); 68 69 //a terme devient une boucle 70 final List<Request> requests = fTapas.getRequests(); 71 Request xRequest, nRequest; 72 73 String iname; 74 75 Iterator<Request> iter = requests.iterator(); 76 77 int iii = requests.size(); 78 int inr = 0; 79 int indice = 1; 80 //Request xRequest = iter.next(); 81 String oneTransmission; 82 83 while ( indice <= iii ) 84 { 85 nRequest = iter.next(); 86 nRequest.setValid( 1 ); 87 88 oneTransmission = nRequest.getPreference().getOneTransmission().getSecondValue(); 89 90 if( oneTransmission.equalsIgnoreCase( "NO" ) ) 91 { 92 nRequest.setValid( -1 ); 93 if( nRequest.getPreference().getH2oExtinction().getSecondValue().equalsIgnoreCase( "Yes" ) ) 56 57 final String xmlStringContent = fTapas.getRequests().get( 0 ).getcXml(); 58 59 if (xmlStringContent == null) 60 { 61 //if ( fTapas.getRequests().get( 1 ).getcXml() ) 62 //{ 63 64 //final String fichier = servicePath + "/" + "request.xml"; 65 final Element tapas = new Element( "tapas" ); 66 final List<Element> listRequest = new ArrayList<Element>( fTapas.getRequests().size() ); 67 68 //On crée un nouveau Document JDOM basé sur la racine que l'on vient de créer 69 final Document document = new Document( tapas ); 70 71 //recuperation valeur id requete (bdd table tapas_request) 72 fTapas.setId( "Ether_TAPAS_" + String.valueOf( getNumRequest() ) ); 73 74 final Attribute id = new Attribute( "Id", fTapas.getId() ); 75 tapas.setAttribute( id ); 76 77 //a terme devient une boucle 78 final List<Request> requests = fTapas.getRequests(); 79 Request nRequest; 80 81 String iname; 82 83 Iterator<Request> iter = requests.iterator(); 84 85 int iii = requests.size(); 86 int inr = 0; 87 int indice = 1; 88 89 String oneTransmission; 90 91 while ( indice <= iii ) 92 { 93 nRequest = iter.next(); 94 nRequest.setValid( 1 ); 95 96 oneTransmission = nRequest.getPreference().getOneTransmission().getSecondValue(); 97 98 if( oneTransmission.equalsIgnoreCase( "NO" ) ) 94 99 { 95 requests.add( addNewRequest( nRequest, (iii+inr+1), "H2O") ); 96 inr = inr + 1; 97 iter = requests.iterator(); 98 /*for ( int i=1 ; i <= (iii+inr) ; i++ ) 99 { 100 nRequest = iter.next(); 101 }*/ 100 nRequest.setValid( -1 ); 101 if( nRequest.getPreference().getH2oExtinction().getSecondValue().equalsIgnoreCase( "Yes" ) ) 102 { 103 requests.add( addNewRequest( nRequest, (iii+inr+1), "H2O") ); 104 inr = inr + 1; 105 iter = requests.iterator(); 106 /*for ( int i=1 ; i <= (iii+inr) ; i++ ) 107 { 108 nRequest = iter.next(); 109 }*/ 110 } 111 112 113 if( nRequest.getPreference().getCh4Extinction().getSecondValue().equalsIgnoreCase( "Yes" ) ) 114 { 115 requests.add( addNewRequest( nRequest, (iii+inr+1), "CH4" ) ); 116 inr = inr + 1; 117 iter = requests.iterator(); 118 /*for ( int i=1 ; i <= (iii+inr) ; i++ ) 119 { 120 nRequest = iter.next(); 121 }*/ 122 } 123 124 125 if( nRequest.getPreference().getCo2Extinction().getSecondValue().equalsIgnoreCase( "Yes" ) ) 126 { 127 requests.add( addNewRequest( nRequest, (iii+inr+1), "CO2" ) ); 128 inr = inr + 1; 129 iter = requests.iterator(); 130 /*for ( int i=1 ; i <= (iii+inr) ; i++ ) 131 { 132 nRequest = iter.next(); 133 }*/ 134 } 135 136 137 if( nRequest.getPreference().getN2oExtinction().getSecondValue().equalsIgnoreCase( "Yes" ) ) 138 { 139 requests.add( addNewRequest( nRequest, (iii+inr+1), "N2O" ) ); 140 inr = inr + 1; 141 iter = requests.iterator(); 142 /*for ( int i=1 ; i <= (iii+inr) ; i++ ) 143 { 144 nRequest = iter.next(); 145 }*/ 146 } 147 148 149 if( nRequest.getPreference().getO2Extinction().getSecondValue().equalsIgnoreCase( "Yes" ) ) 150 { 151 requests.add( addNewRequest( nRequest, (iii+inr+1), "O2" ) ); 152 iter = requests.iterator(); 153 inr = inr + 1; 154 iter = requests.iterator(); 155 /*for ( int i=1 ; i <= (iii+inr) ; i++ ) 156 { 157 nRequest = iter.next(); 158 }*/ 159 } 160 161 162 if( nRequest.getPreference().getO3Extinction().getSecondValue().equalsIgnoreCase( "Yes" ) ) 163 { 164 requests.add( addNewRequest( nRequest, (iii+inr+1), "O3" ) ); 165 iter = requests.iterator(); 166 inr = inr + 1; 167 iter = requests.iterator(); 168 /*for ( int i=1 ; i <= (iii+inr) ; i++ ) 169 { 170 nRequest = iter.next(); 171 }*/ 172 } 102 173 } 103 174 104 105 if( nRequest.getPreference().getCh4Extinction().getSecondValue().equalsIgnoreCase( "Yes" ) ) 175 iter = requests.iterator(); 176 indice=indice+1; 177 for (int i = 1 ; i < indice ; i++) 106 178 { 107 requests.add( addNewRequest( nRequest, (iii+inr+1), "CH4" ) ); 108 inr = inr + 1; 109 iter = requests.iterator(); 110 /*for ( int i=1 ; i <= (iii+inr) ; i++ ) 111 { 112 nRequest = iter.next(); 113 }*/ 179 nRequest = iter.next(); 114 180 } 115 116 117 if( nRequest.getPreference().getCo2Extinction().getSecondValue().equalsIgnoreCase( "Yes" ) ) 181 } 182 183 184 indice=1; 185 186 //// 187 for( final Request iRequest : requests ) 188 { 189 if (iRequest.getValid() != -1) 118 190 { 119 requests.add( addNewRequest( nRequest, (iii+inr+1), "CO2" ) ); 120 inr = inr + 1; 121 iter = requests.iterator(); 122 /*for ( int i=1 ; i <= (iii+inr) ; i++ ) 123 { 124 nRequest = iter.next(); 125 }*/ 191 final Element request = new Element( "request" ); 192 // Id de la request 193 //final Attribute idR = new Attribute( "Id", (Long) iRequest.getId().toString() ); 194 final Attribute idR = new Attribute( "Id", String.valueOf(indice) ); 195 request.setAttribute( idR ); 196 197 // PREFERENCES 198 final Element preferences = new Element( "preferences" ); 199 200 201 //format 202 final Element format = new Element( "format" ); 203 //final Attribute validF = new Attribute( "valid", iRequest.getPreference().getFormat().getFirstValue() ); 204 final Attribute validF = new Attribute( "valid", "VO,ASCII,FITS,NETCDF" ); 205 format.setAttribute( validF ); 206 format.setText( iRequest.getPreference().getFormat().getSecondValue() ); 207 preferences.addContent( format ); 208 209 210 //rayleighExtinction 211 final Element rayleighExtinction = new Element( "rayleigh_extinction" ); 212 //final Attribute validR = new Attribute( "valid", iRequest.getPreference().getRayleighExtinction().getFirstValue() ); 213 Attribute validR = new Attribute( "valid", "YES,NO" ); 214 rayleighExtinction.setAttribute( validR ); 215 rayleighExtinction.setText( iRequest.getPreference().getRayleighExtinction().getSecondValue() ); 216 preferences.addContent( rayleighExtinction ); 217 218 //h2o 219 final Element h2oe = new Element( "h2o_extinction" ); 220 validR = new Attribute( "valid", "YES,NO" ); 221 h2oe.setAttribute( validR ); 222 h2oe.setText( iRequest.getPreference().getH2oExtinction().getSecondValue() ); 223 preferences.addContent( h2oe ); 224 225 226 //o3 227 final Element o3e = new Element( "o3_extinction" ); 228 validR = new Attribute( "valid", "YES,NO" ); 229 o3e.setAttribute( validR ); 230 o3e.setText( iRequest.getPreference().getO3Extinction().getSecondValue() ); 231 preferences.addContent( o3e ); 232 233 //o2 234 final Element o2e = new Element( "o2_extinction" ); 235 validR = new Attribute( "valid", "YES,NO" ); 236 o2e.setAttribute( validR ); 237 o2e.setText( iRequest.getPreference().getO2Extinction().getSecondValue() ); 238 preferences.addContent( o2e ); 239 240 241 //co2 242 final Element co2e = new Element( "co2_extinction" ); 243 validR = new Attribute( "valid", "YES,NO" ); 244 co2e.setAttribute( validR ); 245 co2e.setText( iRequest.getPreference().getCo2Extinction().getSecondValue() ); 246 preferences.addContent( co2e ); 247 248 //ch4 249 final Element ch4e = new Element( "ch4_extinction" ); 250 validR = new Attribute( "valid", "YES,NO" ); 251 ch4e.setAttribute( validR ); 252 ch4e.setText( iRequest.getPreference().getCh4Extinction().getSecondValue() ); 253 preferences.addContent( ch4e ); 254 255 //no2 256 final Element n2oe = new Element( "n2o_extinction" ); 257 validR = new Attribute( "valid", "YES,NO" ); 258 n2oe.setAttribute( validR ); 259 n2oe.setText( iRequest.getPreference().getN2oExtinction().getSecondValue() ); 260 preferences.addContent( n2oe ); 261 262 263 request.addContent( preferences ); 264 265 // OBSERVATORIES 266 final Element observation = new Element( "observation" ); 267 268 // date mesure 269 final Element mdate = new Element( "date" ); 270 final Calendar calendar = Calendar.getInstance(); 271 272 calendar.setTimeInMillis( Long.valueOf( iRequest.getObservation().getDate() ) ); 273 final String dateFormatFinal=DateHelper.formatDate( calendar.getTime(), DateHelper.DATE_UTC ); 274 275 mdate.setText( dateFormatFinal ); 276 277 //mdate.setText( iRequest.getObservation().getDate() ); 278 observation.addContent( mdate ); 279 280 //observatoire ou lieu libre en indiquant alt,lat,lon 281 final Element observatory = new Element( "observatory" ); 282 observation.addContent( observatory ); 283 284 //recuperation des coordonnées de l'observatoire 285 final Observatory obs; 286 try 287 { 288 //obs = _observatoryDAO.selectByPrimaryKey( iRequest.getObservation().getObservatory().getId() ); 289 obs = _observatoryDAO.getObservatoryByName( iRequest.getObservation().getObservatory().getName() ); 290 } 291 catch( PersistenceException e ) 292 { 293 throw new ServiceException( ServiceException.ServiceCode.OBSERVATORY_NOT_FOUND, e ); 294 } 295 296 ////// a tester //// 297 298 final Element name = new Element( "name" ); 299 300 final Element longitude = new Element( "longitude" ); 301 validR = new Attribute( "min", "-180" ); 302 longitude.setAttribute( validR ); 303 validR = new Attribute( "max", "180" ); 304 longitude.setAttribute( validR ); 305 306 final Element latitude = new Element( "latitude" ); 307 validR = new Attribute( "min", "-90" ); 308 latitude.setAttribute( validR ); 309 validR = new Attribute( "max", "90" ); 310 latitude.setAttribute( validR ); 311 312 final Element altitude = new Element( "altitude" ); 313 validR = new Attribute( "min", "0" ); 314 altitude.setAttribute( validR ); 315 validR = new Attribute( "max", "10000" ); 316 altitude.setAttribute( validR ); 317 318 String shortName=""; 319 320 if (null == obs) 321 { 322 //lieu libre 323 name.setText(iRequest.getObservation().getLocation().getName()); 324 altitude.setText( iRequest.getObservation().getLocation().getAltitude().toString() ); 325 latitude.setText( iRequest.getObservation().getLocation().getLatitude().toString() ); 326 longitude.setText( iRequest.getObservation().getLocation().getLongitude().toString() ); 327 shortName = iRequest.getObservation().getLocation().getName(); 328 } 329 else { 330 //observatoire connu de la bdd tapas 331 name.setText( obs.getName() ); 332 longitude.setText( obs.getLongitude().toString() ); 333 latitude.setText( obs.getLatitude().toString() ); 334 altitude.setText( obs.getAltitude().toString() ); 335 shortName = obs.getShortName().toString(); 336 } 337 338 339 observatory.addContent( name ); 340 observatory.addContent( latitude ); 341 observatory.addContent( longitude ); 342 observatory.addContent( altitude ); 343 344 345 //los addN 346 final Element los = new Element( "los" ); 347 observation.addContent( los ); 348 349 Los temp = iRequest.getObservation().getLos(); 350 if ( !temp.getRaJ2000().equals( "" )) { 351 final Element ra_j2000 = new Element( "ra_j2000" ); 352 ra_j2000.setText( iRequest.getObservation().getLos().getRaJ2000() ); 353 los.addContent( ra_j2000 ); 354 } 355 356 if ( !temp.getDecJ2000().equals( "" )) { 357 final Element dec_j2000 = new Element( "dec_j2000" ); 358 dec_j2000.setText( iRequest.getObservation().getLos().getDecJ2000() ); 359 los.addContent( dec_j2000 ); 360 } 361 362 363 if ( !temp.getZenithAngle().equals("") ) { 364 final Element zenith_angle = new Element( "zenith_angle" ); 365 366 Attribute a1 = new Attribute( "min", "0" ); 367 Attribute a2 = new Attribute( "max", "90" ); 368 369 zenith_angle.setAttribute( a1 ); 370 zenith_angle.setAttribute( a2 ); 371 zenith_angle.setText( temp.getZenithAngle() ); 372 373 los.addContent( zenith_angle ); 374 } 375 376 377 //instrument 378 final Element instrument = new Element( "instrument" ); 379 observation.addContent( instrument ); 380 381 final Element spectral_choice = new Element( "spectral_choice" ); 382 383 384 final String[] tabMess = iRequest.getObservation().getInstrument().getSpectralChoice().getFirstValue().split( "," ); 385 386 String chValid = ""; 387 int i; 388 389 for( i = 0; i <= tabMess.length - 1; i++ ) //final String mess : tabMess ) 390 { 391 if( i == tabMess.length - 1 ) 392 chValid += EtherHelper.getMessage( "label.spectralUnit." + tabMess[i], null ); 393 else chValid += EtherHelper.getMessage( "label.spectralUnit." + tabMess[i], null ) + ","; 394 } 395 396 397 Attribute a3 = new Attribute( "valid", chValid ); 398 399 spectral_choice.setAttribute( a3 ); 400 final String message = EtherHelper.getMessage( "label.spectralUnit." + iRequest.getObservation().getInstrument().getSpectralChoice().getSecondValue(), null ); 401 spectral_choice.setText( message ); 402 instrument.addContent( spectral_choice ); 403 404 final Element spectral_range = new Element( "spectral_range" ); 405 spectral_range.setText( iRequest.getObservation().getInstrument().getSpectralRange() ); 406 instrument.addContent( spectral_range ); 407 408 409 // 410 final Element ilsfChoice = new Element( "ilsf_choice" ); 411 validR = new Attribute( "valid", iRequest.getObservation().getInstrument().getIlsfChoice().getFirstValue() ); 412 ilsfChoice.setAttribute( validR ); 413 //selectInstrumentalFunctions 414 ilsfChoice.setText( String.valueOf( iRequest.getObservation().getInstrument().getIlsfChoice().getSecondValue() ) ); 415 instrument.addContent( ilsfChoice ); 416 417 418 final Element resolvingPower = new Element( "resolving_power" ); 419 validR = new Attribute( "min", "0" ); 420 resolvingPower.setAttribute( validR ); 421 resolvingPower.setText( String.valueOf( iRequest.getObservation().getInstrument().getResolvingPower().getSecondValue() ) ); 422 instrument.addContent( resolvingPower ); 423 424 final Element samplingRatio = new Element( "sampling_ratio" ); 425 validR = new Attribute( "min", "0" ); 426 samplingRatio.setAttribute( validR ); 427 samplingRatio.setText( String.valueOf( iRequest.getObservation().getInstrument().getSamplingRatio().getSecondValue() ) ); 428 instrument.addContent( samplingRatio ); 429 430 //berv correction 431 //final Element bervCorr = new Element( "berv_correction" ); 432 final Element bervCorr = new Element( "apply_berv" ); 433 validR = new Attribute( "valid", "YES,NO" ); 434 bervCorr.setAttribute( validR ); 435 bervCorr.setText( iRequest.getPreference().getBervCorrection().getSecondValue() ); 436 instrument.addContent( bervCorr ); 437 438 439 request.addContent( observation ); 440 441 //atmosphere 442 final Element atmosphere = new Element( "atmosphere" ); 443 request.addContent( atmosphere ); 444 445 //reference 446 final Element reference = new Element( "reference" ); 447 validR = new Attribute( "valid", "0,1,2,3,4,5,6" ); 448 reference.setAttribute( validR ); 449 reference.setText( String.valueOf( iRequest.getAtmosphere().getReference().getSecondValue() ) ); 450 atmosphere.addContent( reference ); 451 452 453 String fileArletty = "", fileECMWF = ""; 454 455 456 fileArletty = dataPath + "/" + createFileName( dateFormatFinal , "arletty", shortName ); 457 fileECMWF = dataPath + "/" + createFileName( dateFormatFinal, "ecmwf", shortName ); 458 459 final Element arlettyFile = new Element( "arletty_file" ); 460 arlettyFile.setText( fileArletty ); 461 atmosphere.addContent( arlettyFile ); 462 463 final Element ecmwfFile = new Element( "ecmwf_file" ); 464 ecmwfFile.setText( fileECMWF ); 465 atmosphere.addContent( ecmwfFile ); 466 467 listRequest.add( request ); 468 469 indice=indice+1; 126 470 } 127 128 129 if( nRequest.getPreference().getN2oExtinction().getSecondValue().equalsIgnoreCase( "Yes" ) ) 130 { 131 requests.add( addNewRequest( nRequest, (iii+inr+1), "N2O" ) ); 132 inr = inr + 1; 133 iter = requests.iterator(); 134 /*for ( int i=1 ; i <= (iii+inr) ; i++ ) 135 { 136 nRequest = iter.next(); 137 }*/ 138 } 139 140 141 if( nRequest.getPreference().getO2Extinction().getSecondValue().equalsIgnoreCase( "Yes" ) ) 142 { 143 requests.add( addNewRequest( nRequest, (iii+inr+1), "O2" ) ); 144 iter = requests.iterator(); 145 inr = inr + 1; 146 iter = requests.iterator(); 147 /*for ( int i=1 ; i <= (iii+inr) ; i++ ) 148 { 149 nRequest = iter.next(); 150 }*/ 151 } 152 153 154 if( nRequest.getPreference().getO3Extinction().getSecondValue().equalsIgnoreCase( "Yes" ) ) 155 { 156 requests.add( addNewRequest( nRequest, (iii+inr+1), "O3" ) ); 157 iter = requests.iterator(); 158 inr = inr + 1; 159 iter = requests.iterator(); 160 /*for ( int i=1 ; i <= (iii+inr) ; i++ ) 161 { 162 nRequest = iter.next(); 163 }*/ 164 } 165 } 166 167 iter = requests.iterator(); 168 indice=indice+1; 169 for (int i = 1 ; i < indice ; i++) 170 { 171 nRequest = iter.next(); 172 } 173 } 174 175 176 indice=1; 177 178 //// 179 for( final Request iRequest : requests ) 180 { 181 if (iRequest.getValid() != -1) { 182 183 final Element request = new Element( "request" ); 184 // Id de la request 185 //final Attribute idR = new Attribute( "Id", (Long) iRequest.getId().toString() ); 186 final Attribute idR = new Attribute( "Id", String.valueOf(indice) ); 187 request.setAttribute( idR ); 188 189 // PREFERENCES 190 final Element preferences = new Element( "preferences" ); 191 192 193 //format 194 final Element format = new Element( "format" ); 195 //final Attribute validF = new Attribute( "valid", iRequest.getPreference().getFormat().getFirstValue() ); 196 final Attribute validF = new Attribute( "valid", "VO,ASCII,FITS,NETCDF" ); 197 format.setAttribute( validF ); 198 format.setText( iRequest.getPreference().getFormat().getSecondValue() ); 199 preferences.addContent( format ); 200 201 202 //rayleighExtinction 203 final Element rayleighExtinction = new Element( "rayleigh_extinction" ); 204 //final Attribute validR = new Attribute( "valid", iRequest.getPreference().getRayleighExtinction().getFirstValue() ); 205 Attribute validR = new Attribute( "valid", "YES,NO" ); 206 rayleighExtinction.setAttribute( validR ); 207 rayleighExtinction.setText( iRequest.getPreference().getRayleighExtinction().getSecondValue() ); 208 preferences.addContent( rayleighExtinction ); 209 210 //h2o 211 final Element h2oe = new Element( "h2o_extinction" ); 212 validR = new Attribute( "valid", "YES,NO" ); 213 h2oe.setAttribute( validR ); 214 h2oe.setText( iRequest.getPreference().getH2oExtinction().getSecondValue() ); 215 preferences.addContent( h2oe ); 216 217 218 //o3 219 final Element o3e = new Element( "o3_extinction" ); 220 validR = new Attribute( "valid", "YES,NO" ); 221 o3e.setAttribute( validR ); 222 o3e.setText( iRequest.getPreference().getO3Extinction().getSecondValue() ); 223 preferences.addContent( o3e ); 224 225 //o2 226 final Element o2e = new Element( "o2_extinction" ); 227 validR = new Attribute( "valid", "YES,NO" ); 228 o2e.setAttribute( validR ); 229 o2e.setText( iRequest.getPreference().getO2Extinction().getSecondValue() ); 230 preferences.addContent( o2e ); 231 232 233 //co2 234 final Element co2e = new Element( "co2_extinction" ); 235 validR = new Attribute( "valid", "YES,NO" ); 236 co2e.setAttribute( validR ); 237 co2e.setText( iRequest.getPreference().getCo2Extinction().getSecondValue() ); 238 preferences.addContent( co2e ); 239 240 //ch4 241 final Element ch4e = new Element( "ch4_extinction" ); 242 validR = new Attribute( "valid", "YES,NO" ); 243 ch4e.setAttribute( validR ); 244 ch4e.setText( iRequest.getPreference().getCh4Extinction().getSecondValue() ); 245 preferences.addContent( ch4e ); 246 247 //no2 248 final Element n2oe = new Element( "n2o_extinction" ); 249 validR = new Attribute( "valid", "YES,NO" ); 250 n2oe.setAttribute( validR ); 251 n2oe.setText( iRequest.getPreference().getN2oExtinction().getSecondValue() ); 252 preferences.addContent( n2oe ); 253 254 255 request.addContent( preferences ); 256 257 // OBSERVATORIES 258 final Element observation = new Element( "observation" ); 259 260 // date mesure 261 final Element mdate = new Element( "date" ); 262 final Calendar calendar = Calendar.getInstance(); 263 264 calendar.setTimeInMillis( Long.valueOf( iRequest.getObservation().getDate() ) ); 265 final String dateFormatFinal=DateHelper.formatDate( calendar.getTime(), DateHelper.DATE_UTC ); 266 267 mdate.setText( dateFormatFinal ); 268 269 //mdate.setText( iRequest.getObservation().getDate() ); 270 observation.addContent( mdate ); 271 272 //observatoire ou lieu libre en indiquant alt,lat,lon 273 final Element observatory = new Element( "observatory" ); 274 observation.addContent( observatory ); 275 276 //recuperation des coordonnées de l'observatoire 277 final Observatory obs; 278 try 279 { 280 //obs = _observatoryDAO.selectByPrimaryKey( iRequest.getObservation().getObservatory().getId() ); 281 obs = _observatoryDAO.getObservatoryByName( iRequest.getObservation().getObservatory().getName() ); 282 } 283 catch( PersistenceException e ) 284 { 285 throw new ServiceException( ServiceException.ServiceCode.OBSERVATORY_NOT_FOUND, e ); 286 } 287 288 ////// a tester //// 289 290 final Element name = new Element( "name" ); 291 292 final Element longitude = new Element( "longitude" ); 293 validR = new Attribute( "min", "-180" ); 294 longitude.setAttribute( validR ); 295 validR = new Attribute( "max", "180" ); 296 longitude.setAttribute( validR ); 297 298 final Element latitude = new Element( "latitude" ); 299 validR = new Attribute( "min", "-90" ); 300 latitude.setAttribute( validR ); 301 validR = new Attribute( "max", "90" ); 302 latitude.setAttribute( validR ); 303 304 final Element altitude = new Element( "altitude" ); 305 validR = new Attribute( "min", "0" ); 306 altitude.setAttribute( validR ); 307 validR = new Attribute( "max", "10000" ); 308 altitude.setAttribute( validR ); 309 310 String shortName=""; 311 312 if (null == obs) 313 { 314 //lieu libre 315 name.setText(iRequest.getObservation().getLocation().getName()); 316 altitude.setText( iRequest.getObservation().getLocation().getAltitude().toString() ); 317 latitude.setText( iRequest.getObservation().getLocation().getLatitude().toString() ); 318 longitude.setText( iRequest.getObservation().getLocation().getLongitude().toString() ); 319 shortName = iRequest.getObservation().getLocation().getName(); 320 } 321 else { 322 //observatoire connu de la bdd tapas 323 name.setText( obs.getName() ); 324 longitude.setText( obs.getLongitude().toString() ); 325 latitude.setText( obs.getLatitude().toString() ); 326 altitude.setText( obs.getAltitude().toString() ); 327 shortName = obs.getShortName().toString(); 328 } 329 330 331 observatory.addContent( name ); 332 observatory.addContent( latitude ); 333 observatory.addContent( longitude ); 334 observatory.addContent( altitude ); 335 336 337 //los addN 338 final Element los = new Element( "los" ); 339 observation.addContent( los ); 340 341 Los temp = iRequest.getObservation().getLos(); 342 if ( !temp.getRaJ2000().equals( "" )) { 343 final Element ra_j2000 = new Element( "ra_j2000" ); 344 ra_j2000.setText( iRequest.getObservation().getLos().getRaJ2000() ); 345 los.addContent( ra_j2000 ); 346 } 347 348 if ( !temp.getDecJ2000().equals( "" )) { 349 final Element dec_j2000 = new Element( "dec_j2000" ); 350 dec_j2000.setText( iRequest.getObservation().getLos().getDecJ2000() ); 351 los.addContent( dec_j2000 ); 352 } 353 354 355 if ( !temp.getZenithAngle().equals("") ) { 356 final Element zenith_angle = new Element( "zenith_angle" ); 357 358 Attribute a1 = new Attribute( "min", "0" ); 359 Attribute a2 = new Attribute( "max", "90" ); 360 361 zenith_angle.setAttribute( a1 ); 362 zenith_angle.setAttribute( a2 ); 363 zenith_angle.setText( temp.getZenithAngle() ); 364 365 los.addContent( zenith_angle ); 366 } 367 368 369 //instrument 370 final Element instrument = new Element( "instrument" ); 371 observation.addContent( instrument ); 372 373 final Element spectral_choice = new Element( "spectral_choice" ); 374 375 376 final String[] tabMess = iRequest.getObservation().getInstrument().getSpectralChoice().getFirstValue().split( "," ); 377 378 String chValid = ""; 379 int i; 380 381 for( i = 0; i <= tabMess.length - 1; i++ ) //final String mess : tabMess ) 382 { 383 if( i == tabMess.length - 1 ) 384 chValid += EtherHelper.getMessage( "label.spectralUnit." + tabMess[i], null ); 385 else chValid += EtherHelper.getMessage( "label.spectralUnit." + tabMess[i], null ) + ","; 386 } 387 388 389 Attribute a3 = new Attribute( "valid", chValid ); 390 391 spectral_choice.setAttribute( a3 ); 392 final String message = EtherHelper.getMessage( "label.spectralUnit." + iRequest.getObservation().getInstrument().getSpectralChoice().getSecondValue(), null ); 393 spectral_choice.setText( message ); 394 instrument.addContent( spectral_choice ); 395 396 final Element spectral_range = new Element( "spectral_range" ); 397 spectral_range.setText( iRequest.getObservation().getInstrument().getSpectralRange() ); 398 instrument.addContent( spectral_range ); 399 400 401 // 402 final Element ilsfChoice = new Element( "ilsf_choice" ); 403 validR = new Attribute( "valid", iRequest.getObservation().getInstrument().getIlsfChoice().getFirstValue() ); 404 ilsfChoice.setAttribute( validR ); 405 //selectInstrumentalFunctions 406 ilsfChoice.setText( String.valueOf( iRequest.getObservation().getInstrument().getIlsfChoice().getSecondValue() ) ); 407 instrument.addContent( ilsfChoice ); 408 409 410 final Element resolvingPower = new Element( "resolving_power" ); 411 validR = new Attribute( "min", "0" ); 412 resolvingPower.setAttribute( validR ); 413 resolvingPower.setText( String.valueOf( iRequest.getObservation().getInstrument().getResolvingPower().getSecondValue() ) ); 414 instrument.addContent( resolvingPower ); 415 416 final Element samplingRatio = new Element( "sampling_ratio" ); 417 validR = new Attribute( "min", "0" ); 418 samplingRatio.setAttribute( validR ); 419 samplingRatio.setText( String.valueOf( iRequest.getObservation().getInstrument().getSamplingRatio().getSecondValue() ) ); 420 instrument.addContent( samplingRatio ); 421 422 //berv correction 423 //final Element bervCorr = new Element( "berv_correction" ); 424 final Element bervCorr = new Element( "apply_berv" ); 425 validR = new Attribute( "valid", "YES,NO" ); 426 bervCorr.setAttribute( validR ); 427 bervCorr.setText( iRequest.getPreference().getBervCorrection().getSecondValue() ); 428 instrument.addContent( bervCorr ); 429 430 431 request.addContent( observation ); 432 433 //atmosphere 434 final Element atmosphere = new Element( "atmosphere" ); 435 request.addContent( atmosphere ); 436 437 //reference 438 final Element reference = new Element( "reference" ); 439 validR = new Attribute( "valid", "0,1,2,3,4,5,6" ); 440 reference.setAttribute( validR ); 441 reference.setText( String.valueOf( iRequest.getAtmosphere().getReference().getSecondValue() ) ); 442 atmosphere.addContent( reference ); 443 444 445 String fileArletty = "", fileECMWF = ""; 446 447 448 fileArletty = dataPath + "/" + createFileName( dateFormatFinal , "arletty", shortName ); 449 fileECMWF = dataPath + "/" + createFileName( dateFormatFinal, "ecmwf", shortName ); 450 451 final Element arlettyFile = new Element( "arletty_file" ); 452 arlettyFile.setText( fileArletty ); 453 atmosphere.addContent( arlettyFile ); 454 455 final Element ecmwfFile = new Element( "ecmwf_file" ); 456 ecmwfFile.setText( fileECMWF ); 457 atmosphere.addContent( ecmwfFile ); 458 459 listRequest.add( request ); 460 461 indice=indice+1; 462 } 463 } 464 465 466 467 ////////// 468 ///////// 469 /*for( final Request iRequest : requests ) 470 { 471 final Element request = new Element( "request" ); 472 // Id de la request 473 final Attribute idR = new Attribute( "Id", iRequest.getId().toString() ); 474 request.setAttribute( idR ); 475 476 // PREFERENCES 477 final Element preferences = new Element( "preferences" ); 478 479 480 //format 481 final Element format = new Element( "format" ); 482 //final Attribute validF = new Attribute( "valid", iRequest.getPreference().getFormat().getFirstValue() ); 483 final Attribute validF = new Attribute( "valid", "VO,ASCII,FITS,NETCDF" ); 484 format.setAttribute( validF ); 485 format.setText( iRequest.getPreference().getFormat().getSecondValue() ); 486 preferences.addContent( format ); 487 488 489 //rayleighExtinction 490 final Element rayleighExtinction = new Element( "rayleigh_extinction" ); 491 //final Attribute validR = new Attribute( "valid", iRequest.getPreference().getRayleighExtinction().getFirstValue() ); 492 Attribute validR = new Attribute( "valid", "YES,NO" ); 493 rayleighExtinction.setAttribute( validR ); 494 rayleighExtinction.setText( iRequest.getPreference().getRayleighExtinction().getSecondValue() ); 495 preferences.addContent( rayleighExtinction ); 496 497 //h2o 498 final Element h2oe = new Element( "h2o_extinction" ); 499 validR = new Attribute( "valid", "YES,NO" ); 500 h2oe.setAttribute( validR ); 501 h2oe.setText( iRequest.getPreference().getH2oExtinction().getSecondValue() ); 502 preferences.addContent( h2oe ); 503 504 505 //o3 506 final Element o3e = new Element( "o3_extinction" ); 507 validR = new Attribute( "valid", "YES,NO" ); 508 o3e.setAttribute( validR ); 509 o3e.setText( iRequest.getPreference().getO3Extinction().getSecondValue() ); 510 preferences.addContent( o3e ); 511 512 //o2 513 final Element o2e = new Element( "o2_extinction" ); 514 validR = new Attribute( "valid", "YES,NO" ); 515 o2e.setAttribute( validR ); 516 o2e.setText( iRequest.getPreference().getO2Extinction().getSecondValue() ); 517 preferences.addContent( o2e ); 518 519 520 //co2 521 final Element co2e = new Element( "co2_extinction" ); 522 validR = new Attribute( "valid", "YES,NO" ); 523 co2e.setAttribute( validR ); 524 co2e.setText( iRequest.getPreference().getCo2Extinction().getSecondValue() ); 525 preferences.addContent( co2e ); 526 527 //ch4 528 final Element ch4e = new Element( "ch4_extinction" ); 529 validR = new Attribute( "valid", "YES,NO" ); 530 ch4e.setAttribute( validR ); 531 ch4e.setText( iRequest.getPreference().getCh4Extinction().getSecondValue() ); 532 preferences.addContent( ch4e ); 533 534 //no2 535 final Element n2oe = new Element( "n2o_extinction" ); 536 validR = new Attribute( "valid", "YES,NO" ); 537 n2oe.setAttribute( validR ); 538 n2oe.setText( iRequest.getPreference().getN2oExtinction().getSecondValue() ); 539 preferences.addContent( n2oe ); 540 541 542 request.addContent( preferences ); 543 544 // OBSERVATORIES 545 final Element observation = new Element( "observation" ); 546 547 // date mesure 548 final Element mdate = new Element( "date" ); 549 final Calendar calendar = Calendar.getInstance(); 550 551 calendar.setTimeInMillis( Long.valueOf( iRequest.getObservation().getDate() ) ); 552 final String dateFormatFinal=DateHelper.formatDate( calendar.getTime(), DateHelper.DATE_UTC ); 553 554 mdate.setText( dateFormatFinal ); 555 556 // mdate.setText( iRequest.getObservation().getDate() ); 557 observation.addContent( mdate ); 558 559 //observatoire ou lieu libre en indiquant alt,lat,lon 560 final Element observatory = new Element( "observatory" ); 561 observation.addContent( observatory ); 562 563 //recuperation des coordonnées de l'observatoire 564 final Observatory obs; 565 try 566 { 567 //obs = _observatoryDAO.selectByPrimaryKey( iRequest.getObservation().getObservatory().getId() ); 568 obs = _observatoryDAO.getObservatoryByName( iRequest.getObservation().getObservatory().getName() ); 569 } 570 catch( PersistenceException e ) 571 { 572 throw new ServiceException( ServiceException.ServiceCode.OBSERVATORY_NOT_FOUND, e ); 573 } 574 575 ////// a tester //// 576 577 final Element name = new Element( "name" ); 578 579 final Element longitude = new Element( "longitude" ); 580 validR = new Attribute( "min", "-180" ); 581 longitude.setAttribute( validR ); 582 validR = new Attribute( "max", "180" ); 583 longitude.setAttribute( validR ); 584 585 final Element latitude = new Element( "latitude" ); 586 validR = new Attribute( "min", "-90" ); 587 latitude.setAttribute( validR ); 588 validR = new Attribute( "max", "90" ); 589 latitude.setAttribute( validR ); 590 591 final Element altitude = new Element( "altitude" ); 592 validR = new Attribute( "min", "0" ); 593 altitude.setAttribute( validR ); 594 validR = new Attribute( "max", "10000" ); 595 altitude.setAttribute( validR ); 596 597 String shortName=""; 598 599 if (null == obs) 600 { 601 //lieu libre 602 name.setText(iRequest.getObservation().getLocation().getName()); 603 altitude.setText( iRequest.getObservation().getLocation().getAltitude().toString() ); 604 latitude.setText( iRequest.getObservation().getLocation().getLatitude().toString() ); 605 longitude.setText( iRequest.getObservation().getLocation().getLongitude().toString() ); 606 shortName = iRequest.getObservation().getLocation().getName(); 607 } 608 else { 609 //observatoire connu de la bdd tapas 610 name.setText( obs.getName() ); 611 longitude.setText( obs.getLongitude().toString() ); 612 latitude.setText( obs.getLatitude().toString() ); 613 altitude.setText( obs.getAltitude().toString() ); 614 shortName = obs.getShortName().toString(); 615 } 616 617 618 observatory.addContent( name ); 619 observatory.addContent( latitude ); 620 observatory.addContent( longitude ); 621 observatory.addContent( altitude ); 622 623 624 //los addN 625 final Element los = new Element( "los" ); 626 observation.addContent( los ); 627 628 Los temp = iRequest.getObservation().getLos(); 629 if ( !temp.getRaJ2000().equals( "" )) { 630 final Element ra_j2000 = new Element( "ra_j2000" ); 631 ra_j2000.setText( iRequest.getObservation().getLos().getRaJ2000() ); 632 los.addContent( ra_j2000 ); 633 } 634 635 if ( !temp.getDecJ2000().equals( "" )) { 636 final Element dec_j2000 = new Element( "dec_j2000" ); 637 dec_j2000.setText( iRequest.getObservation().getLos().getDecJ2000() ); 638 los.addContent( dec_j2000 ); 639 } 640 641 642 if ( !temp.getZenithAngle().equals("") ) { 643 final Element zenith_angle = new Element( "zenith_angle" ); 644 645 Attribute a1 = new Attribute( "min", "0" ); 646 Attribute a2 = new Attribute( "max", "90" ); 647 648 zenith_angle.setAttribute( a1 ); 649 zenith_angle.setAttribute( a2 ); 650 zenith_angle.setText( temp.getZenithAngle() ); 651 652 los.addContent( zenith_angle ); 653 } 654 655 656 //instrument 657 final Element instrument = new Element( "instrument" ); 658 observation.addContent( instrument ); 659 660 final Element spectral_choice = new Element( "spectral_choice" ); 661 662 663 final String[] tabMess = iRequest.getObservation().getInstrument().getSpectralChoice().getFirstValue().split( "," ); 664 665 String chValid = ""; 666 int i; 667 668 for( i = 0; i <= tabMess.length - 1; i++ ) //final String mess : tabMess ) 669 { 670 if( i == tabMess.length - 1 ) 671 chValid += EtherHelper.getMessage( "label.spectralUnit." + tabMess[i], null ); 672 else chValid += EtherHelper.getMessage( "label.spectralUnit." + tabMess[i], null ) + ","; 673 } 674 675 676 Attribute a3 = new Attribute( "valid", chValid ); 677 678 spectral_choice.setAttribute( a3 ); 679 final String message = EtherHelper.getMessage( "label.spectralUnit." + iRequest.getObservation().getInstrument().getSpectralChoice().getSecondValue(), null ); 680 spectral_choice.setText( message ); 681 instrument.addContent( spectral_choice ); 682 683 final Element spectral_range = new Element( "spectral_range" ); 684 spectral_range.setText( iRequest.getObservation().getInstrument().getSpectralRange() ); 685 instrument.addContent( spectral_range ); 686 687 688 // 689 final Element ilsfChoice = new Element( "ilsf_choice" ); 690 validR = new Attribute( "valid", iRequest.getObservation().getInstrument().getIlsfChoice().getFirstValue() ); 691 ilsfChoice.setAttribute( validR ); 692 //selectInstrumentalFunctions 693 ilsfChoice.setText( String.valueOf( iRequest.getObservation().getInstrument().getIlsfChoice().getSecondValue() ) ); 694 instrument.addContent( ilsfChoice ); 695 696 697 final Element resolvingPower = new Element( "resolving_power" ); 698 validR = new Attribute( "min", "0" ); 699 resolvingPower.setAttribute( validR ); 700 resolvingPower.setText( String.valueOf( iRequest.getObservation().getInstrument().getResolvingPower().getSecondValue() ) ); 701 instrument.addContent( resolvingPower ); 702 703 final Element samplingRatio = new Element( "sampling_ratio" ); 704 validR = new Attribute( "min", "0" ); 705 samplingRatio.setAttribute( validR ); 706 samplingRatio.setText( String.valueOf( iRequest.getObservation().getInstrument().getSamplingRatio().getSecondValue() ) ); 707 instrument.addContent( samplingRatio ); 708 709 //berv correction 710 //final Element bervCorr = new Element( "berv_correction" ); 711 final Element bervCorr = new Element( "apply_berv" ); 712 validR = new Attribute( "valid", "YES,NO" ); 713 bervCorr.setAttribute( validR ); 714 bervCorr.setText( iRequest.getPreference().getBervCorrection().getSecondValue() ); 715 instrument.addContent( bervCorr ); 716 717 718 request.addContent( observation ); 719 720 //atmosphere 721 final Element atmosphere = new Element( "atmosphere" ); 722 request.addContent( atmosphere ); 723 724 //reference 725 final Element reference = new Element( "reference" ); 726 validR = new Attribute( "valid", "0,1,2,3,4,5,6" ); 727 reference.setAttribute( validR ); 728 reference.setText( String.valueOf( iRequest.getAtmosphere().getReference().getSecondValue() ) ); 729 atmosphere.addContent( reference ); 730 731 732 String fileArletty = "", fileECMWF = ""; 733 734 735 fileArletty = dataPath + "/" + createFileName( dateFormatFinal , "arletty", shortName ); 736 fileECMWF = dataPath + "/" + createFileName( dateFormatFinal, "ecmwf", shortName ); 737 738 final Element arlettyFile = new Element( "arletty_file" ); 739 arlettyFile.setText( fileArletty ); 740 atmosphere.addContent( arlettyFile ); 741 742 final Element ecmwfFile = new Element( "ecmwf_file" ); 743 ecmwfFile.setText( fileECMWF ); 744 atmosphere.addContent( ecmwfFile ); 745 746 listRequest.add( request ); 747 }*/ 748 749 750 751 752 ///// 753 /////// 754 755 756 757 tapas.addContent( listRequest ); 758 759 String commandePath = servicePath + "/" + fTapas.getId(); 760 createXMLFile( document, commandePath, prop ); 471 } 472 473 tapas.addContent( listRequest ); 474 475 String commandePath = servicePath + "/" + fTapas.getId(); 476 createXMLFile( document, commandePath, prop ); 477 } 478 else 479 { 480 fTapas.setId( "Ether_TAPAS_" + String.valueOf( getNumRequest() ) ); 481 String commandePath = servicePath + "/" + fTapas.getId(); 482 createXMLTextArea( xmlStringContent, commandePath, prop ); 483 } 761 484 } 762 485 … … 1063 786 { 1064 787 throw new ServiceException( ServiceException.ServiceCode.PERSISTENCE, e ); 788 } 789 } 790 791 public void createXMLTextArea( final String xmlContent, final String commandePath, final Properties prop ) 792 { 793 try 794 { 795 //creation repertoire commande 796 try 797 { 798 EtherHelper.execProcess( "mkdir -p " + commandePath ); 799 } 800 catch( FormattedException e ) 801 { 802 } 803 804 EtherHelper.pause( 5000 ); 805 806 807 final String fichier = commandePath + "/" + "request.xml"; 808 //Remarquez qu'il suffit simplement de créer une instance de FileOutputStream 809 810 FileOutputStream xmlTextArea = new FileOutputStream( fichier ); 811 //avec en argument le nom du fichier pour effectuer la sérialisation. 812 byte[] bString = xmlContent.getBytes(); 813 xmlTextArea.write(bString); 814 815 /*try 816 { 817 EtherHelper.execProcess( "chmod 755 "+commandePath+"/"+"request.xml" ); 818 } 819 catch( FormattedException e ) 820 { 821 822 } 823 824 EtherHelper.pause(7000); 825 */ 826 } 827 catch( IOException ignored ) 828 { 1065 829 } 1066 830 } -
tapas/web/project/formTapas.jsp
r816 r825 10 10 <%@ taglib prefix="ether" tagdir="/WEB-INF/tags" %> 11 11 12 13 12 14 <tiles:insert page="/resources/templates/templateEther.jsp" flush="true"> 13 15 … … 16 18 <ether:htmlCss cssFile="calendar/anytime"/> 17 19 <ether:htmlCss cssFile="jquery-ui-1.8.16.custom/jquery-ui-1.8.16.custom"/> 18 19 20 </tiles:put> 20 21 … … 71 72 tapasTexts["<%=YesNo.YES%>"] = "<spring:message code="app.YES"/>"; 72 73 tapasTexts["<%=YesNo.NO%>"] = "<spring:message code="app.NO"/>"; 73 74 74 75 75 tapasTexts["confirm"] = "<spring:message code="label.confirm"/>"; … … 129 129 130 130 tapasTexts["text.errcpydate"] = "<spring:message code="text.errcpydate"/>"; 131 tapasTexts["text.errcxml"] = "<spring:message code="text.errcxml"/>"; 131 132 132 133 tapasTexts["text.selectlocation"] = "<spring:message code="text.selectlocation"/>"; 134 133 135 134 136 var interfaceTapas = new InterfaceTapas( ${jSonFileFormats}, ${jSonYesNos}, ${jSonObservatories}, ${jSonSpectralUnits}, ${jSonInstrumentalFunctions}, ${jSonClimatoReferences} ); … … 139 141 140 142 </tiles:insert> 143 144 -
tapas/web/project/formTapas_script.jsp
r817 r825 41 41 this.tabActive = false; 42 42 this.numRequest = 1; 43 this.optionForm = 1; 43 44 44 45 … … 59 60 } 60 61 62 61 63 // Buttons 62 var submitButton = new Button( {value:tapasTexts["label.submitButton"], parent:this.containerCenter, id:"button_submit", className: "tapas1", classNameText:"tapas1_text", onClick:jQuery.proxy( this.onClickSubmit, this )} ); 64 //var submitButton = new Button( {value:tapasTexts["label.submitButton"], parent:this.containerCenter, id:"button_submit", className: "tapas1", classNameText:"tapas1_text", onClick:jQuery.proxy( this.onClickSubmit, this )} ); 65 this.execButton = new Button( {value:tapasTexts["label.submitButton"], parent:this.containerCenter, id:"button_submit", className: "tapas1", classNameText:"tapas1_text", onClick:jQuery.proxy( this.onClickSubmit, this )} ); 63 66 this.addRequestButton = new Button( {title:tapasTexts["label.title.add"],value:tapasTexts["label.addButton"], parent:this.containerCenter, id:"button_add", className: "positive", onClick:jQuery.proxy( this.onClickAdd, this )} ); 64 67 this.delRequestButton = new Button( {title:tapasTexts["label.title.del"],value:tapasTexts["label.delButton"], parent:this.containerCenter, id:"button_del", className: "negative", onClick:jQuery.proxy( this.onClickDel, this )} ); 65 68 this.delRequestButton.disable(); 69 this.execButton.enable(); 70 //this.addRequestButton.disable(); 71 this.optionButton = new Button( {title:"",value:"XML", parent:this.containerCenter, id:"button_opt", className: "option", onClick:jQuery.proxy( this.onClickOption, this )} ); 72 73 this.divX = $( document.createElement( "div" ) ); 74 this.divX.attr( {id:"divX", class:"xmlInfos"} ); 75 this.containerForm.append( this.divX ); 76 77 var img = $( document.createElement( "img" ) ); 78 var a = $( document.createElement( "a" ) ); 79 80 img.attr( "src", "resources/images/info.png" ); 81 img.attr( "width", "19" ); 82 a.attr( "style", "cursor:pointer" ); 83 84 img.bind( "click", ["xmlInfos",450,100,this], this.onClickInfos ); 85 a.append( img ); 86 this.divX.append( a ); 87 88 89 66 90 67 91 this.createForm(); 68 92 69 93 this.tabActive = this.createTab(); 94 70 95 this.divE = $( document.createElement( "div" ) ); 71 96 this.divE.attr( {id:"divErrors", class:"errorsForm"} ); … … 85 110 this.loadingRequest = new Loading( param ); 86 111 87 var nbr =1;88 89 $( '#select_iobservatory_' +this.nbRequest ).bind( 'focus', ["1"], jQuery.proxy(this.locationChoice,this));112 var nbr = 1; 113 114 $( '#select_iobservatory_' + this.nbRequest ).bind( 'focus', ["1"], jQuery.proxy( this.locationChoice, this ) ); 90 115 91 116 //this.loadingRequest.display(); … … 134 159 td4.attr( {colspan:5} ); 135 160 td4.append( inputDate2 ); 136 inputDate2.bind( "change", jQuery.proxy( this.checkDate,this));137 inputDate.bind( "focusin", jQuery.proxy( this.tempDate,this));138 inputDate.bind( "focusout", jQuery.proxy( this.emptyCpyDate,this));161 inputDate2.bind( "change", jQuery.proxy( this.checkDate, this ) ); 162 inputDate.bind( "focusin", jQuery.proxy( this.tempDate, this ) ); 163 inputDate.bind( "focusout", jQuery.proxy( this.emptyCpyDate, this ) ); 139 164 tr.append( td4 ); 140 165 containerCalendar.append( tr ); … … 208 233 209 234 235 createTrUploadFile: function( inputId, container, info ) 236 { 237 var tr = $( document.createElement( "tr" ) ); 238 var td1 = $( document.createElement( "td" ) ); 239 var input = $( document.createElement( "textarea") ); 240 241 input.attr( {id: inputId, class:"containerArea"} ); 242 243 td1.append( input ); 244 245 tr.append( td1 ); 246 container.append( tr ); 247 248 249 if( info ) 250 { 251 tapasTexts["label.delButton"] 252 //td1.append( texte ); 253 254 } 255 256 }, 257 258 210 259 createTr: function( texte, inputId, container, textesup, event, champ, ctnb, info ) 211 260 { … … 234 283 tr.append( td3 ); 235 284 container.append( tr ); 236 237 285 238 286 … … 258 306 tr.append( div ); 259 307 260 if (inputId.match( re2 )) { 261 input.css("backgroundColor", "#bfafd6"); 262 input.attr('disabled','disabled'); 308 if( inputId.match( re2 ) ) 309 { 310 input.css( "backgroundColor", "#bfafd6" ); 311 input.attr( 'disabled', 'disabled' ); 263 312 } 264 313 … … 376 425 input4.attr( {disabled: true} ); 377 426 378 input1.css( "backgroundColor", "#bfafd6");379 input2.css( "backgroundColor", "#bfafd6");380 input3.css( "backgroundColor", "#bfafd6");381 input4.css( "backgroundColor", "#bfafd6");382 383 input1.bind( "change", ["2"], jQuery.proxy( this.locationChoice,this));384 input2.bind( "change", ["2"], jQuery.proxy( this.locationChoice,this));385 input3.bind( "change", ["2"], jQuery.proxy( this.locationChoice,this));386 input4.bind( "change", ["2"], jQuery.proxy( this.locationChoice,this));427 input1.css( "backgroundColor", "#bfafd6" ); 428 input2.css( "backgroundColor", "#bfafd6" ); 429 input3.css( "backgroundColor", "#bfafd6" ); 430 input4.css( "backgroundColor", "#bfafd6" ); 431 432 input1.bind( "change", ["2"], jQuery.proxy( this.locationChoice, this ) ); 433 input2.bind( "change", ["2"], jQuery.proxy( this.locationChoice, this ) ); 434 input3.bind( "change", ["2"], jQuery.proxy( this.locationChoice, this ) ); 435 input4.bind( "change", ["2"], jQuery.proxy( this.locationChoice, this ) ); 387 436 388 437 td3.html( texte2 ); … … 392 441 393 442 394 395 443 /* 396 var img = $( document.createElement( "img" ) );397 var a = $( document.createElement( "a" ) );398 img.attr( "src", "resources/images/info.png" );399 img.attr( "width", "19" );400 a.attr( "style", "cursor:pointer" );401 img.bind( "click", ["spectral_range",450,100,this], this.onClickInfos );402 a.append( img );403 td1.append( a );*/444 var img = $( document.createElement( "img" ) ); 445 var a = $( document.createElement( "a" ) ); 446 img.attr( "src", "resources/images/info.png" ); 447 img.attr( "width", "19" ); 448 a.attr( "style", "cursor:pointer" ); 449 img.bind( "click", ["spectral_range",450,100,this], this.onClickInfos ); 450 a.append( img ); 451 td1.append( a );*/ 404 452 td1.append( texte1 ); 405 453 … … 412 460 td7.attr( {class:"containerLabel2"} ); 413 461 td9.attr( {class:"containerLabel2"} ); 414 415 462 416 463 … … 468 515 this.displaySelect( td2, inputId, index, this.jSonYesNos, this.select_ico2eList, false, "yesNos" ); 469 516 else if( (/^(ich4e_[1-9]+)$/.test( inputId ) ) ) 470 517 this.displaySelect( td2, inputId, index, this.jSonYesNos, this.select_ich4eList, false, "yesNos" ); 471 518 else if( (/^(in2oe_[1-9]+)$/.test( inputId ) ) ) 472 519 this.displaySelect( td2, inputId, index, this.jSonYesNos, this.select_in2oeList, false, "yesNos" ); 473 520 else if( (/^(iOneTransmission_[1-9]+)$/.test( inputId ) ) ) 521 { 474 522 this.displaySelect( td2, inputId, index, this.jSonYesNos, this.select_iOneTransmissionList, false, "yesNos" ); 523 info = true; 524 champ = inputId; 525 } 475 526 else if( (/^(irextinction_[1-9]+)$/.test( inputId ) ) ) 476 527 { … … 516 567 517 568 518 519 569 td1.attr( {class:"containerLabel"} ); 520 570 tr.append( td1 ); 521 522 523 571 524 572 … … 556 604 requestCreateXML: function() 557 605 { 558 var tapasForm = this.createTapasObject(); 606 if (this.optionForm == 1) 607 var tapasForm = this.createTapasObject(); 608 else 609 var tapasForm = this.createFileRequestObject(); 610 559 611 //passage de javascript a json grace au jquery 560 612 var jsonTapasForm = $.toJSON( tapasForm ); 561 562 613 563 614 if( jsonTapasForm ) … … 568 619 } ); 569 620 570 }, 621 622 }, 623 624 625 /* 626 requestCreateUploadFileRequest: function() 627 { 628 var tapasUploadFile = this.createFileRequestObject(); 629 var jsonTapasUploadFile = $.toJSON( tapasUploadFile ); 630 631 if( jsonTapasUploadFile ) 632 $.ajax( { 633 contentType: 'multipart/form-data', 634 dataType: 'html', 635 url: "data?methodName=uploadFile&jsonTapas=" + jsonTapasUploadFile, 636 type: 'POST'//, 637 } ); 638 }, 639 */ 571 640 572 641 … … 575 644 { 576 645 this.loadingRequest.hide(); 577 //this.loadingRequest.display(); 646 this.execButton.enable(); 647 this.optionButton.enable(); 578 648 579 649 var res = jQuery.parseJSON( result ).result; … … 748 818 width = 600; 749 819 height = 360; 820 } 821 } 822 823 824 var re = new RegExp( "xmlInfos" ); 825 if( parametre.match( re ) ) 826 { 827 var titre = "Requête XML"; 828 var pageInfo = "resources/doc/infosXml_fr.txt"; 829 width = 600; 830 height = 450; 831 if( "fr" != context.language ) 832 { 833 titre = "XML request"; 834 pageInfo = "resources/doc/infosXml_en.txt"; 835 width = 600; 836 height = 450; 837 } 838 } 839 840 var re = new RegExp( "iOneTransmission_" ); 841 if( parametre.match( re ) ) 842 { 843 var titre = "Sélection des composants atmosphériques"; 844 var pageInfo = "resources/doc/infosTransmission_fr.txt"; 845 width = 600; 846 height = 200; 847 if( "fr" != context.language ) 848 { 849 titre = "Selection of atmospheric constituents"; 850 pageInfo = "resources/doc/infosTransmission_en.txt"; 851 width = 600; 852 height = 200; 750 853 } 751 854 } … … 827 930 onClickSubmit: function() 828 931 { 932 var test = 12; 829 933 if( this.validFields() ) 830 934 { … … 833 937 { 834 938 this.loadingRequest.display(); 939 this.execButton.disable(); 940 this.optionButton.disable(); 835 941 this.requestCreateXML(); 836 942 } … … 854 960 855 961 this.updateButtons(); 962 }, 963 964 965 onClickOption: function() 966 { 967 968 if (this.optionForm == 1) 969 { 970 $( ".divObservation" ).hide(); 971 $( ".divPreference" ).hide(); 972 $( ".divUploadFile").show(); 973 $( "#button_opt" ).html('FORM') ; 974 this.optionForm=0; 975 this.addRequestButton.disable(); 976 this.delRequestButton.disable() 977 this.displayRequests(1); 978 $( "#tab_request" + this.numRequest ).html( "Request 1" ); 979 this.divE.hide(); 980 } 981 else 982 { 983 $( ".divObservation" ).show(); 984 $( ".divPreference" ).show(); 985 $( ".divUploadFile").hide(); 986 $( "#button_opt" ).html('XML') ; 987 this.optionForm=1; 988 this.addRequestButton.enable(); 989 if (this.nbRequest > 1) this.delRequestButton.enable(); 990 this.displayRequests(0); 991 $( "#icxml_"+this.numRequest ).val(""); 992 this.divE.hide(); 993 $( "#tab_request" + this.numRequest ).html( "Request " + this.numRequest ); 994 } 995 856 996 }, 857 997 … … 943 1083 AnyTime.noPicker( "iobservation_date_" + i ); 944 1084 945 if (!isEmpty($( "#iobservation_cpydate_" + i ).val())) { 1085 if( !isEmpty( $( "#iobservation_cpydate_" + i ).val() ) ) 1086 { 946 1087 var oldDate2 = this.calendarConverter.parse( $( "#iobservation_cpydate_" + i ).val() ); 947 1088 AnyTime.noPicker( "iobservation_cpydate_" + i ); … … 953 1094 $( "#iobservation_cpydate_" + i ).attr( {id:"iobservation_cpydate_" + z} ); 954 1095 this.createCalendar( $( "#tabObservation_" + z ), tapasTexts["label.datemesure"], tapasTexts["label.cpydatemesure"], "iobservation_date_" + z, "iobservation_cpydate_" + z, oldDate, false ); 955 956 1096 957 1097 … … 982 1122 983 1123 1124 displayRequests: function(flag) 1125 { 1126 1127 var numr = this.nbRequest; 1128 1129 if (numr > 1) 1130 { 1131 for( var numCurrent = 1; numCurrent <= this.nbRequest; numCurrent++ ) 1132 if (numCurrent != this.numRequest) 1133 { 1134 if (flag == 1) $( "#tab_request"+numCurrent.toString() ).hide(); 1135 else $( "#tab_request"+numCurrent.toString() ).show(); 1136 } 1137 } 1138 1139 }, 1140 1141 984 1142 onClickTab: function( event ) 985 1143 { … … 1027 1185 break; 1028 1186 case "instrumentalFunctions" : 1029 select.add( jsonElement.value, tapasTexts[jsonElement.text], jQuery.proxy(this.ifunctionChoice,this) ); // passe le gros this1187 select.add( jsonElement.value, tapasTexts[jsonElement.text], jQuery.proxy( this.ifunctionChoice, this ) ); // passe le gros this 1030 1188 break; 1031 1189 case "climatoReferences" : … … 1120 1278 createForm: function() 1121 1279 { 1122 1123 1280 var divAll = $( document.createElement( "div" ) ); 1124 1281 divAll.attr( {id:"all_" + this.nbRequest, class:"divAll"} ); 1125 1126 1282 1127 1283 //Creation div … … 1135 1291 tabObservation.attr( {id:"tabObservation_" + this.nbRequest, cellspacing:3} ); 1136 1292 1293 //Creation div 1294 var divUploadFile = $( document.createElement( "div" ) ); 1295 var tabUploadFile = $( document.createElement( "table" ) ); 1296 tabUploadFile.attr( {cellspacing:3} ); 1297 1137 1298 1138 1299 var divAtmosphere = $( document.createElement( "div" ) ); 1139 1300 var tabAtmosphere = $( document.createElement( "table" ) ); 1140 1141 1301 1142 1302 var fieldSetObservation = $( document.createElement( "fieldset" ) ); … … 1158 1318 legendPreference.addClass( "containerField" ); 1159 1319 1320 var fieldSetUploadFile = $( document.createElement( "fieldset" ) ); 1321 fieldSetUploadFile.addClass( "cfs4" ); 1322 divUploadFile.append( fieldSetUploadFile ); 1323 1324 var legendUploadFile = $( document.createElement( "legend" ) ); 1325 //legendUploadFile.html( tapasTexts["label.preferences"] ); 1326 //fieldSetPreference.append( legendPreference ); 1327 //legendPreference.addClass( "containerField" ); 1328 1160 1329 fieldSetObservation.append( tabObservation ); 1161 1330 divObservation.addClass( "divObservation" ); … … 1171 1340 divAll.append( divPreference ); 1172 1341 1342 fieldSetUploadFile.append( tabUploadFile ); 1343 divUploadFile.addClass( "divUploadFile" ); 1344 divAll.append( divUploadFile ); 1345 1173 1346 this.containerForm.append( divAll ); 1174 1347 this.containerForm.append( this.divE ); 1175 1348 //this.tabInput = new Array(3); 1176 1349 1177 this.createTrList( tapasTexts["label.format"], "iformat_" + this.nbRequest, this.nbRequest, tabPreference, 'format',false,"" ); 1178 this.createTrList( tapasTexts["label.berv"], "ibervC_" + this.nbRequest, this.nbRequest, tabPreference, 'yesno',false,"" ); 1179 this.createTrList( tapasTexts["label.era"], "irextinction_" + this.nbRequest, this.nbRequest, tabPreference, 'yesno',false,"" ); 1180 this.createTrList( tapasTexts["label.eh2o"], "ih2oe_" + this.nbRequest, this.nbRequest, tabPreference, 'yesno',false,"" ); 1181 this.createTrList( tapasTexts["label.eo3"], "io3e_" + this.nbRequest, this.nbRequest, tabPreference, 'yesno',false,"" ); 1182 this.createTrList( tapasTexts["label.eo2"], "io2e_" + this.nbRequest, this.nbRequest, tabPreference, 'yesno',false,"" ); 1183 this.createTrList( tapasTexts["label.eco2"], "ico2e_" + this.nbRequest, this.nbRequest, tabPreference, 'yesno',false,"" ); 1184 this.createTrList( tapasTexts["label.ech4"], "ich4e_" + this.nbRequest, this.nbRequest, tabPreference, 'yesno',false,"" ); 1185 this.createTrList( tapasTexts["label.en2o"], "in2oe_" + this.nbRequest, this.nbRequest, tabPreference, 'yesno',false,"" ); 1186 this.createTrList( tapasTexts["label.onetransmission"], "iOneTransmission_" + this.nbRequest, this.nbRequest, tabPreference, 'yesno',false,"" ); 1187 1350 this.createTrUploadFile( "icxml_"+this.nbRequest, tabUploadFile, false ); 1351 1352 this.createTrList( tapasTexts["label.format"], "iformat_" + this.nbRequest, this.nbRequest, tabPreference, 'format', false, "" ); 1353 this.createTrList( tapasTexts["label.berv"], "ibervC_" + this.nbRequest, this.nbRequest, tabPreference, 'yesno', false, "" ); 1354 this.createTrList( tapasTexts["label.era"], "irextinction_" + this.nbRequest, this.nbRequest, tabPreference, 'yesno', false, "" ); 1355 this.createTrList( tapasTexts["label.eh2o"], "ih2oe_" + this.nbRequest, this.nbRequest, tabPreference, 'yesno', false, "" ); 1356 this.createTrList( tapasTexts["label.eo3"], "io3e_" + this.nbRequest, this.nbRequest, tabPreference, 'yesno', false, "" ); 1357 this.createTrList( tapasTexts["label.eo2"], "io2e_" + this.nbRequest, this.nbRequest, tabPreference, 'yesno', false, "" ); 1358 this.createTrList( tapasTexts["label.eco2"], "ico2e_" + this.nbRequest, this.nbRequest, tabPreference, 'yesno', false, "" ); 1359 this.createTrList( tapasTexts["label.ech4"], "ich4e_" + this.nbRequest, this.nbRequest, tabPreference, 'yesno', false, "" ); 1360 this.createTrList( tapasTexts["label.en2o"], "in2oe_" + this.nbRequest, this.nbRequest, tabPreference, 'yesno', false, "" ); 1361 this.createTrList( tapasTexts["label.onetransmission"], "iOneTransmission_" + this.nbRequest, this.nbRequest, tabPreference, 'yesno', false, "" ); 1188 1362 1189 1363 1190 1364 this.createTrList( tapasTexts["label.observatory"], "iobservatory_" + this.nbRequest, this.nbRequest, tabObservation, 'observatories', true, "" ); 1191 1365 this.createTrTxt( tapasTexts["label.or"], tabObservation ); 1192 this.createTr3Input( tapasTexts["label.locality"], tapasTexts["label.altitude"], tapasTexts["label.latitude"], tapasTexts["label.longitude"],"ilocality_" + this.nbRequest, "ialtitude_" + this.nbRequest, "ilatitude_" + this.nbRequest, "ilongitude_" + this.nbRequest , tabObservation, "[decimal]"," <b>m</b>" );1366 this.createTr3Input( tapasTexts["label.locality"], tapasTexts["label.altitude"], tapasTexts["label.latitude"], tapasTexts["label.longitude"], "ilocality_" + this.nbRequest, "ialtitude_" + this.nbRequest, "ilatitude_" + this.nbRequest, "ilongitude_" + this.nbRequest, tabObservation, "[decimal]", " <b>m</b>" ); 1193 1367 1194 1368 this.createCalendar( tabObservation, tapasTexts["label.datemesure"], tapasTexts["label.cpydatemesure"], "iobservation_date_" + this.nbRequest, "iobservation_cpydate_" + this.nbRequest, false, true ); … … 1200 1374 1201 1375 //fonction instrumentale 1202 this.createTrList( tapasTexts["label.ifunction"], "ifunction_" + this.nbRequest, this.nbRequest, tabObservation, "ilsf", false, "select" );1376 this.createTrList( tapasTexts["label.ifunction"], "ifunction_" + this.nbRequest, this.nbRequest, tabObservation, "ilsf", false, "select" ); 1203 1377 //reference climato 1204 1378 //this.createTrList( tapasTexts["label.climato"], "icr", tabAtmosphere, "climatoReference" ); 1205 this.createTrList( tapasTexts["label.climato"], "icr_" + this.nbRequest, this.nbRequest, tabObservation, "climatoReference", false, "" );1379 this.createTrList( tapasTexts["label.climato"], "icr_" + this.nbRequest, this.nbRequest, tabObservation, "climatoReference", false, "" ); 1206 1380 1207 1381 this.createTr( tapasTexts["label.resolution"], "irp_" + this.nbRequest, tabObservation, "", "", "", "", true ); … … 1214 1388 this.createTr( tapasTexts["label.iza"], "iza_" + this.nbRequest, tabObservation, "[0,90] °", "keypress", "za", "2", true ); 1215 1389 1390 1216 1391 this.createAutoCompleteMenuForRegions(); 1217 1392 1218 1393 this.initRequestFields(); 1219 1394 1220 1221 1222 1395 $( ".divUploadFile").hide(); 1396 1397 //divAll.attr("style", "visibility: hidden"); 1223 1398 //jQuery.proxy permet d'envoyer le contexte this courant 1224 1399 … … 1226 1401 1227 1402 1228 1229 createTapasObject: function() 1403 createFileRequestObject: function() 1230 1404 { 1231 1405 … … 1233 1407 var i = 1; 1234 1408 1235 1409 /*for( var i = 1; i <= this.nbRequest; i++ ) 1410 { */ 1411 1412 // REQUEST 1413 var fileRequest = new Object(); 1414 fileRequest.id = 1; 1415 fileRequest.cXml = $( "#icxml_"+this.nbRequest).val(); 1416 1417 requests[0] = fileRequest; 1418 //} 1419 1420 // TAPAS 1421 var tapas = new Object(); 1422 tapas.requests = requests; 1423 return tapas; 1424 }, 1425 1426 1427 1428 createTapasObject: function() 1429 { 1430 1431 var requests = new Array(); 1432 var i = 1; 1236 1433 1237 1434 for( var i = 1; i <= this.nbRequest; i++ ) … … 1337 1534 var observation = new Object(); 1338 1535 1339 if (!isEmpty($( "#iobservation_cpydate_" + i ).val()) && isDate($("#iobservation_cpydate_" + i ).val()) )1536 if( !isEmpty( $( "#iobservation_cpydate_" + i ).val() ) && isDate( $( "#iobservation_cpydate_" + i ).val() ) ) 1340 1537 { 1341 1538 observation.date = this.calendarConverter.parse( $( "#iobservation_cpydate_" + i ).val() ).getTime(); … … 1345 1542 observation.date = this.calendarConverter.parse( $( "#iobservation_date_" + i ).val() ).getTime(); 1346 1543 } 1544 1545 1546 /*observation.uploadRequest = new Object(); 1547 observation.uploadRequest.firstValue = "0"; 1548 observation.uploadRequest.secondValue = $( "#icxml_" + i ).val();*/ 1347 1549 1348 1550 … … 1353 1555 observation.los = los; 1354 1556 observation.instrument = instrument; 1557 1355 1558 1356 1559 // ATMOSPHERE … … 1369 1572 request.atmosphere = atmosphere; 1370 1573 1574 //request.cXml = ($( "#icxml_" + i ).val()).toString(); 1575 1371 1576 requests[i - 1] = request; 1372 1577 } … … 1378 1583 }, 1379 1584 1585 1380 1586 validFields: function() 1381 1587 { 1382 1588 1383 for( var i = 1; i <= this.nbRequest; i++ ) 1384 { 1385 1386 var chaine = tapasTexts["text.erreur.saisie"] + " " + i + "<br>"; 1387 var testOk1 = false; 1388 var testOk2 = false; 1389 var testOk3 = false; 1390 1391 testOk1 = isDate( $( "#iobservation_cpydate_" + this.nbRequest ).val() ) || isEmpty( $( "#iobservation_cpydate_" + this.nbRequest ).val() ); 1392 if( !testOk1 ) 1589 if ( this.optionForm == 0) { 1590 var cxml = ($( "#icxml_"+this.numRequest).val()).toString(); 1591 if (isEmpty(cxml)) 1393 1592 { 1394 1593 this.divE.hide(); 1395 this.divE.html( chaine + " : " + tapasTexts["text.errcpydate"] );1594 this.divE.html( tapasTexts["text.errcxml"] ); 1396 1595 this.divE.show(); 1397 1596 return false; 1398 1597 } 1399 1400 1401 //var testOk = isSup( this.selectObservatoriesList[i].getValue(), 0 ); 1402 var testOk = isEmpty( $( "#select_iobservatory_" + i ).val() ) || this.listObs.indexOf( $( "#select_iobservatory_" + i ).val() ) < 0; 1403 testOk2 = !isEmpty( $( "#ilocality_" + i ).val() ) && isValidNum( $( "#ialtitude_" + i ).val() ) && isValidNum( $( "#ilatitude_" + i ).val() ) && isValidNum( $( "#ilongitude_" + i ).val() ) 1404 1405 if( testOk && !testOk2) 1598 else 1406 1599 { 1407 1600 this.divE.hide(); 1408 this.divE.html( chaine + " " + tapasTexts["text.selectlocation"] ); 1409 this.divE.show(); 1410 return false; 1411 } 1412 1413 testOk = isDiff( this.selectSpectralUnitsList[i].getValue(), -1 ); 1414 if( !testOk ) 1415 { 1416 this.divE.html( chaine + tapasTexts["label.spectralUnit"] + " : " + tapasTexts["text.toselect"] ); 1417 this.divE.show(); 1418 return false; 1419 } 1420 1421 testOk = isValidRange( $( "#iminspectral_ranger_" + i ).val(), $( "#imaxspectral_ranger_" + i ).val(), this.selectSpectralUnitsList[i].getValue() ); 1422 if( !testOk ) 1423 { 1424 this.divE.html( chaine + tapasTexts["label.spectralRange"] + " : " + tapasTexts["text.badvalue"] ); 1425 this.divE.show(); 1426 return false; 1427 } 1428 1429 /*testOk = isDeg( $( "#ide_" + i ).val() ); 1430 if( !testOk ) 1431 { 1432 this.divE.html( chaine + tapasTexts["label.ide"] + " : " + tapasTexts["text.badvalue"] ); 1433 this.divE.show(); 1434 return false; 1435 } */ 1436 1437 1438 testOk = isBetween( $( "#iza_" + i ).val(), 0, 90 ); 1439 testOk1 = isValidNum( $( "#iza_" + i ).val() ); 1440 testOk2 = isDeg( $( "#ide_" + i ).val() ); 1441 testOk3 = isHourDeg( $( "#ira_" + i ).val() ); 1442 if( !((testOk && testOk1) || (testOk2 && testOk3)) ) 1443 { 1444 if( !(testOk && testOk1) ) 1445 this.divE.html( chaine + "LOS : " + tapasTexts["text.badvalue"] ); 1446 else 1447 this.divE.html( chaine + tapasTexts["label.iza"] + " : " + tapasTexts["text.badvalue"] ); 1448 this.divE.show(); 1449 return false; 1450 } 1451 1452 /*testOk = isBetween( $( "#iza_" + i ).val(), 0, 90 ); 1453 if( !testOk ) 1454 { 1455 this.divE.html( chaine + tapasTexts["label.iza"] + " : " + tapasTexts["text.badvalue"] ); 1456 this.divE.show(); 1457 return false; 1458 } */ 1459 1460 1461 testOk = isValidNum( $( "#irp_" + i ).val() ); 1462 testOk2 = isSupS( this.selectInstrumentalFunctionsList[i].getValue() , -1 ); 1463 1464 1465 if (testOk2) 1466 { 1467 if( !testOk ) 1468 { 1469 this.divE.html( chaine + tapasTexts["label.resolution"] + " : " + tapasTexts["text.badvalue"] ); 1470 this.divE.show(); 1471 return false; 1472 } 1473 1474 testOk = isSup( $( "#irp_" + i ).val(), 1 ); 1475 if( !testOk ) 1476 { 1477 this.divE.html( chaine + tapasTexts["label.resolution"] + " : " + tapasTexts["text.badvalue"] ); 1478 this.divE.show(); 1479 return false; 1480 } 1481 } 1482 1483 1484 testOk = isValidNum( $( "#isr_" + i ).val() ); 1485 if( !testOk ) 1486 { 1487 this.divE.html( chaine + tapasTexts["label.ratio"] + " : " + tapasTexts["text.badvalue"] ); 1488 this.divE.show(); 1489 return false; 1490 } 1491 1492 testOk = isSup( $( "#isr_" + i ).val(), 1 ); 1493 if( !testOk ) 1494 { 1495 this.divE.html( chaine + tapasTexts["label.ratio"] + " : " + tapasTexts["text.badvalue"] ); 1496 this.divE.show(); 1497 return false; 1601 return true; 1602 } 1603 1604 } 1605 else 1606 { 1607 for( var i = 1; i <= this.nbRequest; i++ ) 1608 { 1609 var chaine = tapasTexts["text.erreur.saisie"] + " " + i + "<br>"; 1610 var testOk1 = false; 1611 var testOk2 = false; 1612 var testOk3 = false; 1613 1614 testOk1 = isDate( $( "#iobservation_cpydate_" + i ).val() ) || isEmpty( $( "#iobservation_cpydate_" + i ).val() ); 1615 if( !testOk1 ) 1616 { 1617 this.divE.hide(); 1618 this.divE.html( chaine + " : " + tapasTexts["text.errcpydate"] ); 1619 this.divE.show(); 1620 return false; 1621 } 1622 1623 1624 //var testOk = isSup( this.selectObservatoriesList[i].getValue(), 0 ); 1625 var testOk = isEmpty( $( "#select_iobservatory_" + i ).val() ) || this.listObs.indexOf( $( "#select_iobservatory_" + i ).val() ) < 0; 1626 testOk2 = !isEmpty( $( "#ilocality_" + i ).val() ) && isValidNum( $( "#ialtitude_" + i ).val() ) && isValidNum( $( "#ilatitude_" + i ).val() ) && isValidNum( $( "#ilongitude_" + i ).val() ) 1627 1628 if( testOk && !testOk2 ) 1629 { 1630 this.divE.hide(); 1631 this.divE.html( chaine + " " + tapasTexts["text.selectlocation"] ); 1632 this.divE.show(); 1633 return false; 1634 } 1635 1636 testOk = isDiff( this.selectSpectralUnitsList[i].getValue(), -1 ); 1637 if( !testOk ) 1638 { 1639 this.divE.html( chaine + tapasTexts["label.spectralUnit"] + " : " + tapasTexts["text.toselect"] ); 1640 this.divE.show(); 1641 return false; 1642 } 1643 1644 testOk = isValidRange( $( "#iminspectral_ranger_" + i ).val(), $( "#imaxspectral_ranger_" + i ).val(), this.selectSpectralUnitsList[i].getValue() ); 1645 if( !testOk ) 1646 { 1647 this.divE.html( chaine + tapasTexts["label.spectralRange"] + " : " + tapasTexts["text.badvalue"] ); 1648 this.divE.show(); 1649 return false; 1650 } 1651 1652 /*testOk = isDeg( $( "#ide_" + i ).val() ); 1653 if( !testOk ) 1654 { 1655 this.divE.html( chaine + tapasTexts["label.ide"] + " : " + tapasTexts["text.badvalue"] ); 1656 this.divE.show(); 1657 return false; 1658 } */ 1659 1660 1661 testOk = isBetween( $( "#iza_" + i ).val(), 0, 90 ); 1662 testOk1 = isValidNum( $( "#iza_" + i ).val() ); 1663 testOk2 = isDeg( $( "#ide_" + i ).val() ); 1664 testOk3 = isHourDeg( $( "#ira_" + i ).val() ); 1665 if( !((testOk && testOk1) || (testOk2 && testOk3)) ) 1666 { 1667 if( !(testOk && testOk1) ) 1668 this.divE.html( chaine + "LOS : " + tapasTexts["text.badvalue"] ); 1669 else 1670 this.divE.html( chaine + tapasTexts["label.iza"] + " : " + tapasTexts["text.badvalue"] ); 1671 this.divE.show(); 1672 return false; 1673 } 1674 1675 /*testOk = isBetween( $( "#iza_" + i ).val(), 0, 90 ); 1676 if( !testOk ) 1677 { 1678 this.divE.html( chaine + tapasTexts["label.iza"] + " : " + tapasTexts["text.badvalue"] ); 1679 this.divE.show(); 1680 return false; 1681 } */ 1682 1683 1684 testOk = isValidNum( $( "#irp_" + i ).val() ); 1685 testOk2 = isSupS( this.selectInstrumentalFunctionsList[i].getValue(), -1 ); 1686 1687 1688 if( testOk2 ) 1689 { 1690 if( !testOk ) 1691 { 1692 this.divE.html( chaine + tapasTexts["label.resolution"] + " : " + tapasTexts["text.badvalue"] ); 1693 this.divE.show(); 1694 return false; 1695 } 1696 1697 testOk = isSup( $( "#irp_" + i ).val(), 1 ); 1698 if( !testOk ) 1699 { 1700 this.divE.html( chaine + tapasTexts["label.resolution"] + " : " + tapasTexts["text.badvalue"] ); 1701 this.divE.show(); 1702 return false; 1703 } 1704 } 1705 1706 1707 testOk = isValidNum( $( "#isr_" + i ).val() ); 1708 if( !testOk ) 1709 { 1710 this.divE.html( chaine + tapasTexts["label.ratio"] + " : " + tapasTexts["text.badvalue"] ); 1711 this.divE.show(); 1712 return false; 1713 } 1714 1715 testOk = isSup( $( "#isr_" + i ).val(), 1 ); 1716 if( !testOk ) 1717 { 1718 this.divE.html( chaine + tapasTexts["label.ratio"] + " : " + tapasTexts["text.badvalue"] ); 1719 this.divE.show(); 1720 return false; 1721 } 1722 1498 1723 } 1499 1724 } … … 1546 1771 var valeur = this.selectInstrumentalFunctionsList[this.nbRequest].getValue(); 1547 1772 1548 if ( valeur == -1 ) { 1549 $( "#irp_" + this.nbRequest ).val(""); 1550 $( "#irp_" + this.nbRequest ).css("backgroundColor", "#bfafd6"); 1551 $( "#irp_" + this.nbRequest ).attr('disabled','disabled'); 1552 } 1553 else { 1554 $( "#irp_" + this.nbRequest ).css("backgroundColor", "#FFFFFF"); 1555 $( "#irp_" + this.nbRequest ).removeAttr('disabled'); 1773 if( valeur == -1 ) 1774 { 1775 $( "#irp_" + this.nbRequest ).val( "" ); 1776 $( "#irp_" + this.nbRequest ).css( "backgroundColor", "#bfafd6" ); 1777 $( "#irp_" + this.nbRequest ).attr( 'disabled', 'disabled' ); 1778 } 1779 else 1780 { 1781 $( "#irp_" + this.nbRequest ).css( "backgroundColor", "#FFFFFF" ); 1782 $( "#irp_" + this.nbRequest ).removeAttr( 'disabled' ); 1556 1783 } 1557 1784 … … 1562 1789 1563 1790 1564 locationChoice: function( ind)1791 locationChoice: function( ind ) 1565 1792 { 1566 1793 var option = ind.data[0].toString(); 1567 1794 1568 if ("1" == option)1569 { 1570 $( '#ilocality_' + this.nbRequest ).val("");1571 $( '#ialtitude_' + this.nbRequest ).val("");1572 $( '#ilatitude_' + this.nbRequest ).val("");1573 $( '#ilongitude_' + this.nbRequest ).val("");1795 if( "1" == option ) 1796 { 1797 $( '#ilocality_' + this.nbRequest ).val( "" ); 1798 $( '#ialtitude_' + this.nbRequest ).val( "" ); 1799 $( '#ilatitude_' + this.nbRequest ).val( "" ); 1800 $( '#ilongitude_' + this.nbRequest ).val( "" ); 1574 1801 } 1575 1802 else 1576 1803 { 1577 $( '#select_iobservatory_' + this.nbRequest ).val("");1804 $( '#select_iobservatory_' + this.nbRequest ).val( "" ); 1578 1805 } 1579 1806 }, … … 1583 1810 checkDate: function() 1584 1811 { 1585 var testOk1 = isDate( $( "#iobservation_cpydate_" + this.nbRequest ).val() ) || isEmpty( $( "#iobservation_cpydate_" + this.nbRequest ).val() );1812 var testOk1 = isDate( $( "#iobservation_cpydate_" + this.nbRequest ).val() ) || isEmpty( $( "#iobservation_cpydate_" + this.nbRequest ).val() ); 1586 1813 if( !testOk1 ) 1587 1814 { … … 1596 1823 emptyCpyDate: function() 1597 1824 { 1598 if ( this.dateTemp != $( "#iobservation_cpydate_" + this.nbRequest ).val("") ) { 1599 $( "#iobservation_cpydate_" + this.nbRequest ).val(""); 1825 if( this.dateTemp != $( "#iobservation_cpydate_" + this.nbRequest ).val( "" ) ) 1826 { 1827 $( "#iobservation_cpydate_" + this.nbRequest ).val( "" ); 1600 1828 } 1601 1829 return true; -
tapas/web/resources/css/button.css
r817 r825 71 71 } 72 72 73 /* POSITIVE */ 74 button.option { 75 background-color: #F0FFF0; 76 color: #686868; 77 border-radius:8px; 78 } 79 80 button.option:hover { 81 //background-color: #E6EFC2; 82 border: 1px solid #ff5600; 83 color: #ff5600; 84 } 85 73 86 /* NEGATIVE */ 74 87 button.negative { -
tapas/web/resources/css/tapas.css
r819 r825 16 16 /** ********************** CONTAINER ******************** **/ 17 17 /** ***************************************************** **/ 18 button.positive, button.negative {18 button.positive, button.negative, button.option { 19 19 20 20 float: right; … … 54 54 padding-right: 40px; 55 55 padding-left: 21px; 56 height: 4 67px;56 height: 479px; 57 57 margin-left: -26px; 58 58 margin-top: -23px; … … 90 90 } 91 91 92 93 94 .cfs4 { 95 border: 2px solid #E7E6EB; 96 border-radius: 8px 8px 8px 8px; 97 height: 443px; 98 margin-left: -1px; 99 margin-top: -1px; 100 padding-bottom: 13px; 101 padding-left: 21px; 102 padding-right: 40px; 103 width: 954px; 104 } 105 92 106 .containerForm { 93 107 … … 154 168 background-color: white; 155 169 border-radius: 6px 6px 6px 6px; 156 157 170 } 171 172 .containerArea { 173 font-size: 12px; 174 color: #00cc00; 175 padding-left: 0px; 176 background-color: black; 177 border-radius: 6px 6px 12px 6px; 178 height:435px; 179 width:940px; 180 resize:none; 158 181 } 159 182 … … 410 433 411 434 .errorsForm { 412 413 -moz-border-radius: 8px;414 -webkit-border-radius:8px;415 border: 2px solid #cc0000;416 color: #cc0000;417 border-radius: 8px 8px 8px 8px;418 padding:10px;419 margin- left: 727px;435 background: none repeat scroll 0 0 #E7E6EB; 436 border: 2px solid #CC0000; 437 border-radius: 8px 8px 8px 8px; 438 color: #CC0000; 439 float: left; 440 font-weight: bold; 441 margin-left: 1052px; 442 margin-right: -232px; 420 443 margin-top: -137px; 444 padding: 10px; 421 445 text-align: left; 422 font-weight: bold; 423 float: left; 424 background: #e7e6eb; 425 } 426 Spectral unit : must be selected 427 Observatory : must be selected 446 } 447 448 449 .xmlInfos { 450 float: left; 451 font-weight: bold; 452 margin-left: 749px; 453 margin-right: -232px; 454 margin-top: 455px; 455 padding: 10px; 456 text-align: left; 457 position:absolute; 458 } 459 460 461 462 /*Spectral unit : must be selected 463 Observatory : must be selected */ 428 464 429 465 .cfs3 { … … 572 608 background-image: url(../../resources/icons/transparent_loading.gif); 573 609 height: 37px; 574 610 //margin-top: 462px; 575 611 //margin-top: 1046px; 576 612 //margin-left: 21px; -
tapas/web/resources/doc/infosTransmission_fr.txt
r809 r825 1 L'utilisateur peut définir le calcul de transmission en fonction de la liste des composants suivants : Rayleigh extinction, O2, ozone, H2O, CO2, CH4, N2O. 2 La transmission totale est le résultat de la multiplication de toutes les transmissions sélectionnées. <br> 3 Prochainement, les composants NO2 et NO3 issus d'une climatologie établie à partir des mesures de l'instrument GOMOS / ENVISAT seront également disponibles.<br> 4 L'utilisateur peut également sélectionner séparément chaque composant, pour une meilleure identification des lignes observées. Ceci est particuliÚrement 5 utile pour obtenir la transmission du H2O séparément car la quantité d'H2O est hautement variable et peut être ajustée en utiisant la loi de la transmission : 6 T= T(H2O)**X, où X est le facteur ajusté aux conditions locales d'humidité. Une telle formule doit être appliquée, en principe, uniquement avec la résolution 7 la plus élevée possible, l'utilisateur peut lui-même ensuite convoluer par le biais du profil spectral instrumental du spectromÚtre. Ceci est plus précis que d'appliquer 8 la loi de la transmission convoluée. 1 Concerne les 6 gaz H2O, O3, O2, CO2, CH4, N2O.<br> 2 Quand "En une transmission" est positionné à "Yes", il n'y aura qu'un seul fichier résultat (une seule requête).<br> 3 Quand "En une transmission" est positionné à "Non", il y aura autant de fichier résultat que de gaz positionné à "Oui". 4 Dans ce cas chaque fichier résultat prendra en compte une seule extinction de gaz. -
tapas/web/resources/templates/templateBackoffice.jsp
r817 r825 5 5 <%@ taglib prefix="ether" tagdir="/WEB-INF/tags" %> 6 6 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 7 8 7 9 8 10 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> … … 14 16 15 17 <title><tiles:getAsString name="title"/></title> 18 19 16 20 <link rel="shortcut icon" href=""> 17 21 -
tapas/web/src/com/ether/Controller.java
r784 r825 5 5 import com.ether.annotation.ParamName; 6 6 import com.ether.annotation.UseJSON; 7 8 import com.ether.tapas.FileRequest; 7 9 import com.ether.tapas.Observatory; 8 10 import com.ether.tapas.Tapas; … … 12 14 import org.apache.commons.logging.LogFactory; 13 15 import org.jetbrains.annotations.NotNull; 16 //import org.springframework.web.bind.annotation.RequestMapping; 17 //import org.springframework.web.bind.annotation.RequestMethod; 14 18 15 19 import java.io.File; … … 21 25 import java.util.List; 22 26 import java.util.Properties; 27 28 import java.io.BufferedOutputStream; 29 import java.io.File; 30 import java.io.FileOutputStream; 31 32 //import org.springframework.web.bind.annotation.RequestMapping; 33 //import org.springframework.web.bind.annotation.RequestMethod; 34 //import org.springframework.web.bind.*; 35 36 37 //import org.springframework.web.bind.annotation.ResponseBody; 38 //import org.springframework.web.bind.annotation.RequestMapping; 39 //import org.springframework.web.bind.annotation.RequestMethod; 40 //import org.springframework.web.bind.annotation.RequestParam; 41 //import org.springframework.web.multipart.MultipartFile; 23 42 24 43 /** … … 81 100 { 82 101 102 String test="12444"; 103 83 104 if( null == javaTapas ) 84 105 throw new WebException( WebException.WebCode.ERROR_JSON_TAPAS_IS_NULL, "Serialization error : jsonTapas is null", WebException.getExceptionThrowable() ); 85 106 86 107 final Properties prop = new Properties(); 87 final File propertiesFile = new File( WebHelper.PROPERTIES_FILE_PATH + WebHelper.PROPERTIES_FILE);88 try 89 { 90 final InputStream is = new FileInputStream( propertiesFile);108 final File propertiesFile = new File( WebHelper.PROPERTIES_FILE_PATH + WebHelper.PROPERTIES_FILE ); 109 try 110 { 111 final InputStream is = new FileInputStream( propertiesFile ); 91 112 prop.load( is ); 92 113 } … … 103 124 try 104 125 { 126 javaTapas.setId( test ); 105 127 getTapasService().createXMLRequest( javaTapas, prop ); 106 128 } … … 110 132 } 111 133 112 // creation fichier requete xml134 // creation lien ftp 113 135 try 114 136 { … … 145 167 return result; 146 168 } 169 170 147 171 148 172 private List<JSONObject> getJSONFileFormat() … … 162 186 } 163 187 188 189 164 190 private List<JSONObject> getJSONYesNo() 165 191 { … … 177 203 return jsonYesNos; 178 204 } 205 206 179 207 180 208 private List<JSONObject> getJSONSpectralUnit() … … 235 263 private static final String VIEW_INDEX = "init_en"; 236 264 private static final String VIEW_FORM_TAPAS = "project/formTapas"; 265 private static final String VIEW_UPLOAD = "project/upload"; 237 266 } -
tapas/web/src/messages_en.properties
r816 r825 38 38 text.toselect=must be selected 39 39 text.erreur.saisie=Error form request 40 text.errcxml=XML code is empty 40 41 41 42 text.selectlocation=Enter a location correclty (an observatory or a locality with altitude, latitude and longitude) … … 182 183 bo.user.emailNotSend=The email to the user cannot be sent, the email seems not valid : 183 184 185 text.xml=Le code requête XML doit strictement respecter les tags. Seules les valeurs entre les tags peuvent être modifiées 186 Exemple de requete XML que vous devez entrez : 187 <?xml version="1.0" encoding="UTF-8"?> 188 <tapas Id="Ether_TAPAS_999"> 189 <request Id="1"> 190 <preferences> 191 <format valid="VO,ASCII,FITS,NETCDF">FITS</format> 192 <rayleigh_extinction valid="YES,NO">YES</rayleigh_extinction> 193 <h2o_extinction valid="YES,NO">NO</h2o_extinction> 194 <o3_extinction valid="YES,NO">YES</o3_extinction> 195 <o2_extinction valid="YES,NO">YES</o2_extinction> 196 <co2_extinction valid="YES,NO">YES</co2_extinction> 197 <ch4_extinction valid="YES,NO">YES</ch4_extinction> 198 <n2o_extinction valid="YES,NO">YES</n2o_extinction> 199 </preferences> 200 <observation> 201 <date>2013-11-17T00:41:00.000Z</date> 202 <observatory> 203 <name>La Palma Roque de los Muchachos Canarias Spain</name> 204 <longitude min="-180" max="180">-17.882</longitude> 205 <latitude min="-90" max="90">28.76</latitude> 206 <altitude min="0" max="10000">2326.0</altitude> 207 </observatory> 208 <los> 209 <ra_j2000>03:42:55</ra_j2000> 210 <dec_j2000>47:47:15</dec_j2000> 211 </los> 212 <instrument> 213 <spectral_choice valid="Vacuum Wavelength (nm),Standard Wavelength (nm),Wavenumber (cm-1)">Standard Wavelength (nm)</spectral_choice> 214 <spectral_range>350 1000</spectral_range> 215 <ilsf_choice valid="-1,createTapa0,1">1</ilsf_choice> 216 <resolving_power min="0">115000</resolving_power> 217 <sampling_ratio min="0">10</sampling_ratio> 218 <appli_berv valid="YES,NO">YES</appli_berv> 219 </instrument> 220 </observation> 221 <atmosphere> 222 <reference valid="0,1,2,3,4,5,6">0</reference> 223 <arletty_file>/data/tapas///arletty/canr_2013111700.arl</arletty_file> 224 <ecmwf_file>/data/tapas///ecmwf/canr_2013111700_qo3.txt</ecmwf_file> 225 </atmosphere> 226 </request> 227 </tapas> -
tapas/web/src/messages_fr.properties
r816 r825 44 44 text.toselect=à sélectionner 45 45 text.erreur.saisie=Erreur saisie requête 46 text.errcxml=code XML vide 47 text.xml=Le code requête XML doit strictement respecter les tags. Seules les valeurs entre les tags peuvent être modifiées. Exemple de requete XML que vous devez entrez : <?xml version="1.0" encoding="UTF-8"?> 48 <tapas Id="Ether_TAPAS_999"> 49 <request Id="1"> 50 <preferences> 51 <format valid="VO,ASCII,FITS,NETCDF">FITS</format> 52 <rayleigh_extinction valid="YES,NO">YES</rayleigh_extinction> 53 <h2o_extinction valid="YES,NO">NO</h2o_extinction> 54 <o3_extinction valid="YES,NO">YES</o3_extinction> 55 <o2_extinction valid="YES,NO">YES</o2_extinction> 56 <co2_extinction valid="YES,NO">YES</co2_extinction> 57 <ch4_extinction valid="YES,NO">YES</ch4_extinction> 58 <n2o_extinction valid="YES,NO">YES</n2o_extinction> 59 </preferences> 60 <observation> 61 <date>2013-11-17T00:41:00.000Z</date> 62 <observatory> 63 <name>La Palma Roque de los Muchachos Canarias Spain</name> 64 <longitude min="-180" max="180">-17.882</longitude> 65 <latitude min="-90" max="90">28.76</latitude> 66 <altitude min="0" max="10000">2326.0</altitude> 67 </observatory> 68 <los> 69 <ra_j2000>03:42:55</ra_j2000> 70 <dec_j2000>47:47:15</dec_j2000> 71 </los> 72 <instrument> 73 <spectral_choice valid="Vacuum Wavelength (nm),Standard Wavelength (nm),Wavenumber (cm-1)">Standard Wavelength (nm)</spectral_choice> 74 <spectral_range>350 1000</spectral_range> 75 <ilsf_choice valid="-1,createTapa0,1">1</ilsf_choice> 76 <resolving_power min="0">115000</resolving_power> 77 <sampling_ratio min="0">10</sampling_ratio> 78 <appli_berv valid="YES,NO">YES</appli_berv> 79 </instrument> 80 </observation> 81 <atmosphere> 82 <reference valid="0,1,2,3,4,5,6">0</reference> 83 <arletty_file>/data/tapas///arletty/canr_2013111700.arl</arletty_file> 84 <ecmwf_file>/data/tapas///ecmwf/canr_2013111700_qo3.txt</ecmwf_file> 85 </atmosphere> 86 </request> 87 </tapas> 46 88 47 89 text.selectlocation=Indiquer un lieu correctement (observatoire ou lieu en indiquant altitude,latitude et longitude) … … 76 118 error.ERROR_JSON_TAPAS_IS_NULL=Erreur de création du formulaire Tapas 77 119 120 78 121 label.submitButton=EXECUTER 79 122 label.addButton=+ 80 123 label.delButton=x 124 label.optionForm=Form 81 125 label.title.add=AJOUTER UNE NOUVELLE REQUETE 82 126 label.title.del=SUPPRIMER LA REQUETE COURANTE
Note: See TracChangeset
for help on using the changeset viewer.