Changeset 779 for tapas/service
- Timestamp:
- 04/01/14 16:56:38 (10 years ago)
- Location:
- tapas/service
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
tapas/service/implementation/com/ether/TapasServiceImpl.java
r767 r779 44 44 public void createXMLRequest( @NotNull final Tapas fTapas, @NotNull final Properties prop ) 45 45 throws ServiceException 46 46 { 47 47 48 48 final String servicePath = prop.getProperty( "service_path" ); … … 125 125 preferences.addContent( co2e ); 126 126 127 // berv correction128 final Element bervCorr = new Element( "berv_correction" );127 //ch4 128 final Element ch4e = new Element( "ch4_extinction" ); 129 129 validR = new Attribute( "valid", "YES,NO" ); 130 bervCorr.setAttribute( validR ); 131 bervCorr.setText( iRequest.getPreference().getBervCorrection().getSecondValue() ); 132 preferences.addContent( bervCorr ); 130 ch4e.setAttribute( validR ); 131 ch4e.setText( iRequest.getPreference().getCh4Extinction().getSecondValue() ); 132 preferences.addContent( ch4e ); 133 134 //no2 135 final Element n2oe = new Element( "n2o_extinction" ); 136 validR = new Attribute( "valid", "YES,NO" ); 137 n2oe.setAttribute( validR ); 138 n2oe.setText( iRequest.getPreference().getN2oExtinction().getSecondValue() ); 139 preferences.addContent( n2oe ); 133 140 134 141 … … 158 165 try 159 166 { 160 obs = _observatoryDAO.selectByPrimaryKey( iRequest.getObservation().getObservatory().getId() ); 167 //obs = _observatoryDAO.selectByPrimaryKey( iRequest.getObservation().getObservatory().getId() ); 168 obs = _observatoryDAO.getObservatoryByName( iRequest.getObservation().getObservatory().getName() ); 161 169 } 162 170 catch( PersistenceException e ) … … 280 288 instrument.addContent( samplingRatio ); 281 289 290 //berv correction 291 //final Element bervCorr = new Element( "berv_correction" ); 292 final Element bervCorr = new Element( "appli_berv" ); 293 validR = new Attribute( "valid", "YES,NO" ); 294 bervCorr.setAttribute( validR ); 295 bervCorr.setText( iRequest.getPreference().getBervCorrection().getSecondValue() ); 296 instrument.addContent( bervCorr ); 297 298 282 299 request.addContent( observation ); 283 300 … … 629 646 630 647 648 // recuperation infos observatoire avec le nom 649 @Nullable 650 @Transactional(readOnly = true) 651 public Observatory getObservatoryByName( @NotNull final String name ) 652 throws ServiceException 653 { 654 try 655 { 656 return _observatoryDAO.getObservatoryByName( name ); 657 } 658 catch( PersistenceException e ) 659 { 660 throw new ServiceException( ServiceException.ServiceCode.OBSERVATORY_NOT_FOUND, e ); 661 } 662 } 663 664 631 665 @Required 632 666 public void setObservatoryDAO( final ObservatoryDAO observatoryDAO ) -
tapas/service/interface/com/ether/TapasService.java
r507 r779 32 32 public Observatory getObservatoryById(@NotNull final long id) throws ServiceException; 33 33 34 public Observatory getObservatoryByName(@NotNull final String name) throws ServiceException; 35 34 36 public Long getNumRequest() throws ServiceException; 35 37
Note: See TracChangeset
for help on using the changeset viewer.