Changeset 440 for tapas/service
- Timestamp:
- 03/26/12 17:00:15 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tapas/service/implementation/com/ether/TapasServiceImpl.java
r420 r440 36 36 final Element tapas = new Element( "tapas" ); 37 37 final Element request = new Element( "request" ); 38 final Element preferences = new Element( "preferences" ); 39 final Element format = new Element( "format" ); 40 final Element rayleighExtinction = new Element( "rayleigh_extinction" ); 38 41 39 42 40 //On crée un nouveau Document JDOM basé sur la racine que l'on vient de créer … … 51 49 for( final Request iRequest : requests ) 52 50 { 51 // Id de la request 53 52 final Attribute idR = new Attribute( "Id", iRequest.getId().toString() ); 54 53 request.setAttribute( idR ); 55 54 56 tapas.addContent( request );57 request.addContent( preferences);55 // PREFERENCES 56 final Element preferences = new Element( "preferences" ); 58 57 58 // Element format 59 final Element format = new Element( "format" ); 59 60 final Attribute validF = new Attribute( "valid", iRequest.getPreference().getFormat().getFirstValue() ); 60 61 format.setAttribute( validF ); 61 62 format.setText( iRequest.getPreference().getFormat().getSecondValue() ); 63 preferences.addContent( format ); 62 64 65 // Element rayleighExtinction 66 final Element rayleighExtinction = new Element( "rayleigh_extinction" ); 63 67 final Attribute validR = new Attribute( "valid", iRequest.getPreference().getRayleighExtinction().getFirstValue() ); 64 68 rayleighExtinction.setAttribute( validR ); 65 69 rayleighExtinction.setText( iRequest.getPreference().getRayleighExtinction().getSecondValue() ); 70 preferences.addContent( rayleighExtinction ); 66 71 72 // 73 74 request.addContent( preferences ); 75 76 // OBSERVATORIES 77 78 79 80 81 tapas.addContent( request ); 67 82 } 68 83
Note: See TracChangeset
for help on using the changeset viewer.