Subversion Repositories eFlore/Applications.coel

Rev

Rev 406 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 406 Rev 420
1
package org.tela_botanica.client.vues;
1
package org.tela_botanica.client.vues;
2
 
2
 
3
import java.util.ArrayList;
3
import java.util.ArrayList;
-
 
4
import java.util.HashMap;
4
import java.util.Iterator;
5
import java.util.Iterator;
5
import java.util.List;
-
 
6
import java.util.Map.Entry;
-
 
7
 
6
 
8
import org.tela_botanica.client.ComposantClass;
7
import org.tela_botanica.client.ComposantClass;
9
import org.tela_botanica.client.ComposantId;
8
import org.tela_botanica.client.ComposantId;
10
import org.tela_botanica.client.Mediateur;
9
import org.tela_botanica.client.Mediateur;
11
import org.tela_botanica.client.RegistreId;
-
 
12
import org.tela_botanica.client.i18n.Constantes;
10
import org.tela_botanica.client.i18n.Constantes;
13
import org.tela_botanica.client.interfaces.Rafraichissable;
11
import org.tela_botanica.client.interfaces.Rafraichissable;
14
import org.tela_botanica.client.modeles.Configuration;
-
 
15
import org.tela_botanica.client.modeles.Information;
12
import org.tela_botanica.client.modeles.Information;
-
 
13
import org.tela_botanica.client.modeles.Projet;
-
 
14
import org.tela_botanica.client.modeles.ProjetListe;
16
import org.tela_botanica.client.modeles.Structure;
15
import org.tela_botanica.client.modeles.Structure;
17
import org.tela_botanica.client.modeles.StructureAPersonne;
16
import org.tela_botanica.client.modeles.StructureAPersonne;
18
import org.tela_botanica.client.modeles.StructureAPersonneListe;
17
import org.tela_botanica.client.modeles.StructureAPersonneListe;
19
import org.tela_botanica.client.modeles.StructureConservation;
18
import org.tela_botanica.client.modeles.StructureConservation;
20
import org.tela_botanica.client.modeles.StructureValorisation;
19
import org.tela_botanica.client.modeles.StructureValorisation;
21
import org.tela_botanica.client.modeles.Valeur;
20
import org.tela_botanica.client.modeles.Valeur;
22
import org.tela_botanica.client.modeles.ValeurListe;
21
import org.tela_botanica.client.modeles.ValeurListe;
23
 
-
 
24
import com.extjs.gxt.ui.client.Events;
-
 
25
import com.extjs.gxt.ui.client.Registry;
22
 
26
import com.extjs.gxt.ui.client.Style.Scroll;
23
import com.extjs.gxt.ui.client.Style.Scroll;
27
import com.extjs.gxt.ui.client.util.Format;
24
import com.extjs.gxt.ui.client.util.Format;
28
import com.extjs.gxt.ui.client.util.Params;
25
import com.extjs.gxt.ui.client.util.Params;
29
import com.extjs.gxt.ui.client.widget.ContentPanel;
26
import com.extjs.gxt.ui.client.widget.ContentPanel;
30
import com.extjs.gxt.ui.client.widget.HorizontalPanel;
-
 
31
import com.extjs.gxt.ui.client.widget.Html;
27
import com.extjs.gxt.ui.client.widget.Html;
32
import com.extjs.gxt.ui.client.widget.HtmlContainer;
28
import com.extjs.gxt.ui.client.widget.HtmlContainer;
33
import com.extjs.gxt.ui.client.widget.LayoutContainer;
29
import com.extjs.gxt.ui.client.widget.LayoutContainer;
34
import com.extjs.gxt.ui.client.widget.TabItem;
30
import com.extjs.gxt.ui.client.widget.TabItem;
35
import com.extjs.gxt.ui.client.widget.TabPanel;
31
import com.extjs.gxt.ui.client.widget.TabPanel;
36
import com.extjs.gxt.ui.client.widget.layout.AnchorLayout;
32
import com.extjs.gxt.ui.client.widget.layout.AnchorLayout;
37
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
33
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
38
import com.extjs.gxt.ui.client.widget.layout.FlowLayout;
34
import com.extjs.gxt.ui.client.widget.layout.FlowLayout;
39
import com.google.gwt.core.client.GWT;
35
import com.google.gwt.core.client.GWT;
40
import com.google.gwt.i18n.client.DateTimeFormat;
-
 
41
 
36
 
42
public class StructureDetailPanneauVue extends LayoutContainer implements Rafraichissable {
37
public class StructureDetailPanneauVue extends LayoutContainer implements Rafraichissable {
43
 
38
 
44
	private Mediateur mediateur = null;
39
	private Mediateur mediateur = null;
45
	private Constantes i18nC = null;
40
	private Constantes i18nC = null;
-
 
41
	private HashMap<String, Valeur> ontologie = null;
-
 
42
	private ProjetListe projets = null;
46
	
43
	
47
	private String enteteTpl = null;
44
	private String enteteTpl = null;
48
	private String identificationTpl = null;
45
	private String identificationTpl = null;
49
	private String personnelTpl = null;
46
	private String personnelTpl = null;
50
	private String tableauPersonnelTpl = null;
47
	private String tableauPersonnelTpl = null;
51
	private String lignePersonnelTpl = null;
48
	private String lignePersonnelTpl = null;
52
	private String conservationTpl = null;
49
	private String conservationTpl = null;
-
 
50
	private String traitementConservationTpl = null;
53
	private String valorisationTpl = null;
51
	private String valorisationTpl = null;
54
	private String sautLigneTpl = null;
52
	private String sautLigneTpl = null;
55
	
53
	
56
	private Structure structure = null;
54
	private Structure structure = null;
57
	private StructureAPersonneListe personnel = null;
55
	private StructureAPersonneListe personnel = null;
58
	private StructureValorisation valorisation = null;
56
	private StructureValorisation valorisation = null;
59
	private StructureConservation conservation = null;
57
	private StructureConservation conservation = null;
60
	
58
	
61
	private ContentPanel panneauPrincipal = null;
59
	private ContentPanel panneauPrincipal = null;
62
	private Html entete = null;
60
	private Html entete = null;
63
	private TabPanel onglets = null;
61
	private TabPanel onglets = null;
64
	private TabItem identificationOnglet = null;
62
	private TabItem identificationOnglet = null;
65
	private TabItem personnelOnglet = null;
63
	private TabItem personnelOnglet = null;
66
	private TabItem conservationOnglet = null;
64
	private TabItem conservationOnglet = null;
67
	private TabItem valorisationOnglet = null;
65
	private TabItem valorisationOnglet = null;
68
	
-
 
69
	private Params identificationParams = null;
66
	private String typeTraitementConservationTpl;
70
	private Params personnelParams = null;
-
 
71
	private Params conservationParams = null;
-
 
72
	
67
	
73
	public StructureDetailPanneauVue(Mediateur mediateurCourant) {
68
	public StructureDetailPanneauVue(Mediateur mediateurCourant) {
74
		mediateur = mediateurCourant;
69
		mediateur = mediateurCourant;
75
		i18nC = mediateur.i18nC; 
70
		i18nC = mediateur.i18nC; 
76
		initialiserTousLesTpl();
71
		initialiserTousLesTpl();
-
 
72
		ontologie = new HashMap<String, Valeur>();
-
 
73
		chargerOntologie();
77
		
74
		
78
		setLayout(new FitLayout());
75
		setLayout(new FitLayout());
79
		setBorders(false);
76
		setBorders(false);
80
		setScrollMode(Scroll.AUTO);
77
		setScrollMode(Scroll.AUTO);
81
		
-
 
82
		conservationParams  = new Params();
-
 
83
		
-
 
84
		mediateur.obtenirListeValeurEtRafraichir(this, "localStockage");
-
 
85
		mediateur.obtenirListeValeurEtRafraichir(this, "meubleStockage");
-
 
86
		mediateur.obtenirListeValeurEtRafraichir(this, "parametreStockage");
-
 
87
		
78
		
88
		panneauPrincipal = new ContentPanel();
79
		panneauPrincipal = new ContentPanel();
89
		panneauPrincipal.setLayout(new FlowLayout());
80
		panneauPrincipal.setLayout(new FlowLayout());
90
		panneauPrincipal.setHeaderVisible(false);
81
		panneauPrincipal.setHeaderVisible(false);
91
		panneauPrincipal.setBodyBorder(false);
82
		panneauPrincipal.setBodyBorder(false);
92
			
83
			
93
	    entete = new Html();
84
	    entete = new Html();
94
	    entete.setId(ComposantId.ZONE_DETAIL_ENTETE);
85
	    entete.setId(ComposantId.ZONE_DETAIL_ENTETE);
95
	    panneauPrincipal.setTopComponent(entete);
86
	    panneauPrincipal.setTopComponent(entete);
96
		
87
		
97
		onglets = new TabPanel();
88
		onglets = new TabPanel();
98
		onglets.setId(ComposantId.ZONE_DETAIL_CORPS);
89
		onglets.setId(ComposantId.ZONE_DETAIL_CORPS);
99
		onglets.setHeight("100%");
90
		onglets.setHeight("100%");
100
		onglets.setBodyBorder(false);
91
		onglets.setBodyBorder(false);
101
 
92
 
102
		identificationOnglet = new TabItem("Général");
93
		identificationOnglet = new TabItem("Général");
103
		identificationOnglet.setLayout(new AnchorLayout());
94
		identificationOnglet.setLayout(new AnchorLayout());
104
		identificationOnglet.setScrollMode(Scroll.AUTO);
95
		identificationOnglet.setScrollMode(Scroll.AUTO);
105
		onglets.add(identificationOnglet);
96
		onglets.add(identificationOnglet);
106
		
97
		
107
		personnelOnglet = new TabItem("Personnel");
98
		personnelOnglet = new TabItem("Personnel");
108
		personnelOnglet.setLayout(new AnchorLayout());
99
		personnelOnglet.setLayout(new AnchorLayout());
109
		personnelOnglet.setScrollMode(Scroll.AUTO);
100
		personnelOnglet.setScrollMode(Scroll.AUTO);
110
		onglets.add(personnelOnglet);
101
		onglets.add(personnelOnglet);
111
		
102
		
112
		conservationOnglet = new TabItem("Conservation");
103
		conservationOnglet = new TabItem("Conservation");
113
		conservationOnglet.setLayout(new AnchorLayout());
104
		conservationOnglet.setLayout(new AnchorLayout());
114
		conservationOnglet.setScrollMode(Scroll.AUTO);
105
		conservationOnglet.setScrollMode(Scroll.AUTO);
115
		onglets.add(conservationOnglet);
106
		onglets.add(conservationOnglet);
116
		
107
		
117
		valorisationOnglet = new TabItem("Valorisation");
108
		valorisationOnglet = new TabItem("Valorisation");
118
		valorisationOnglet.setLayout(new AnchorLayout());
109
		valorisationOnglet.setLayout(new AnchorLayout());
119
		valorisationOnglet.setScrollMode(Scroll.AUTO);
110
		valorisationOnglet.setScrollMode(Scroll.AUTO);
120
		onglets.add(valorisationOnglet);
111
		onglets.add(valorisationOnglet);
121
		
112
		
122
		panneauPrincipal.add(onglets);
113
		panneauPrincipal.add(onglets);
123
		add(panneauPrincipal);
114
		add(panneauPrincipal);
124
	}
115
	}
-
 
116
 
-
 
117
	private void chargerOntologie() {
-
 
118
		mediateur.selectionnerProjets(this);
-
 
119
		mediateur.obtenirListeValeurEtRafraichir(this, "stpr");
-
 
120
		mediateur.obtenirListeValeurEtRafraichir(this, "stpu");
-
 
121
		mediateur.obtenirListeValeurEtRafraichir(this, "statut");
-
 
122
		mediateur.obtenirListeValeurEtRafraichir(this, "fonction");
-
 
123
		mediateur.obtenirListeValeurEtRafraichir(this, "pays");
-
 
124
		mediateur.obtenirListeValeurEtRafraichir(this, "localStockage");
-
 
125
		mediateur.obtenirListeValeurEtRafraichir(this, "meubleStockage");
-
 
126
		mediateur.obtenirListeValeurEtRafraichir(this, "parametreStockage");
-
 
127
		mediateur.obtenirListeValeurEtRafraichir(this, "autreCollection");
-
 
128
		mediateur.obtenirListeValeurEtRafraichir(this, "onep");
-
 
129
		mediateur.obtenirListeValeurEtRafraichir(this, "opRestau");
-
 
130
		mediateur.obtenirListeValeurEtRafraichir(this, "autreMateriel");
-
 
131
		mediateur.obtenirListeValeurEtRafraichir(this, "poisonTraitement");
-
 
132
		mediateur.obtenirListeValeurEtRafraichir(this, "insecteTraitement");
-
 
133
		mediateur.obtenirListeValeurEtRafraichir(this, "actionValorisation");
-
 
134
		mediateur.obtenirListeValeurEtRafraichir(this, "continentEtFr");
-
 
135
		mediateur.obtenirListeValeurEtRafraichir(this, "typeRecherche");
-
 
136
	}
125
 
137
 
126
	private void afficherDetailInstitution() {
138
	private void afficherDetailInstitution() {
127
		if (structure != null) {
139
		if (structure != null) {
128
			personnel = structure.getPersonnel();
140
			personnel = structure.getPersonnel();
129
			valorisation = structure.getValorisation();
141
			valorisation = structure.getValorisation();
130
			conservation = structure.getConservation();
142
			conservation = structure.getConservation();
131
			
143
			
132
			afficherEntete();
144
			afficherEntete();
133
			afficherIdentification();
145
			afficherIdentification();
134
			if (personnel != null) {
146
			if (personnel != null) {
135
				afficherPersonnel();
147
				afficherPersonnel();
136
			}
148
			}
137
			if (conservation != null) {
149
			if (conservation != null) {
138
				afficherConservation();
150
				afficherConservation();
139
			}
151
			}
140
			if (valorisation != null) {
152
			if (valorisation != null) {
141
				//afficherValorisation();
153
				//afficherValorisation();
142
			}
154
			}
143
		}
155
		}
144
		layout();
156
		layout();
145
	}
157
	}
146
	
158
	
147
	private void afficherEntete() {
159
	private void afficherEntete() {
148
		Params enteteParams = new Params();
160
		Params enteteParams = new Params();
149
		enteteParams.set("css_id", ComposantId.ZONE_DETAIL_ENTETE);
161
		enteteParams.set("css_id", ComposantId.ZONE_DETAIL_ENTETE);
150
		enteteParams.set("css_meta", ComposantClass.META);
162
		enteteParams.set("css_meta", ComposantClass.META);
151
		
163
		
152
		enteteParams.set("nom", structure.getNom());
164
		enteteParams.set("nom", structure.getNom());
153
		enteteParams.set("ville", structure.getVille());
165
		enteteParams.set("ville", structure.getVille());
154
		enteteParams.set("id", structure.getId());
166
		enteteParams.set("id", structure.getId());
155
		enteteParams.set("guid", structure.getGuid());
167
		enteteParams.set("guid", structure.getGuid());
156
		enteteParams.set("projet", structure.getIdProjet());
168
		enteteParams.set("projet", construireTxtprojet(structure.getIdProjet()));
157
		
169
		
158
		String eHtml = Format.substitute(enteteTpl, enteteParams);
170
		String eHtml = Format.substitute(enteteTpl, enteteParams);
159
		entete.getElement().setInnerHTML(eHtml);
171
		entete.getElement().setInnerHTML(eHtml);
160
	}
172
	}
161
	
173
	
162
	private void afficherIdentification() {
174
	private void afficherIdentification() {
163
		identificationParams = new Params();
175
		Params identificationParams = new Params();
164
		identificationParams.set("css_corps", ComposantClass.DETAIL_CORPS_CONTENU);
176
		identificationParams.set("css_corps", ComposantClass.DETAIL_CORPS_CONTENU);
165
		identificationParams.set("css_label", ComposantClass.LABEL);
177
		identificationParams.set("css_label", ComposantClass.LABEL);
166
		identificationParams.set("css_fieldset", ComposantClass.FIELDSET);
178
		identificationParams.set("css_fieldset", ComposantClass.FIELDSET);
167
		identificationParams.set("css_clear", ComposantClass.CLEAR);
179
		identificationParams.set("css_clear", ComposantClass.CLEAR);
168
		
180
		
169
		identificationParams.set("i18n_titre_administratif", i18nC.titreAdministratif());
181
		identificationParams.set("i18n_titre_administratif", i18nC.titreAdministratif());
170
		identificationParams.set("i18n_acronyme", i18nC.acronyme());
182
		identificationParams.set("i18n_acronyme", i18nC.acronyme());
171
		identificationParams.set("i18n_statut", i18nC.statut());
183
		identificationParams.set("i18n_statut", i18nC.statut());
172
		identificationParams.set("i18n_date_fondation", mediateur.i18nC.dateFondation());
184
		identificationParams.set("i18n_date_fondation", mediateur.i18nC.dateFondation());
173
		identificationParams.set("i18n_nbre_personnel", mediateur.i18nC.nbrePersonnel());
185
		identificationParams.set("i18n_nbre_personnel", mediateur.i18nC.nbrePersonnel());
174
		
186
		
175
		identificationParams.set("i18n_titre_description", mediateur.i18nC.description());
187
		identificationParams.set("i18n_titre_description", mediateur.i18nC.description());
176
		identificationParams.set("i18n_description", mediateur.i18nC.description());
188
		identificationParams.set("i18n_description", mediateur.i18nC.description());
177
		
189
		
178
		identificationParams.set("i18n_titre_adresse", mediateur.i18nC.adresse());
190
		identificationParams.set("i18n_titre_adresse", mediateur.i18nC.adresse());
179
		identificationParams.set("i18n_adresse", mediateur.i18nC.adresse());
191
		identificationParams.set("i18n_adresse", mediateur.i18nC.adresse());
180
		identificationParams.set("i18n_cp", mediateur.i18nC.codePostal());
192
		identificationParams.set("i18n_cp", mediateur.i18nC.codePostal());
181
		identificationParams.set("i18n_ville", mediateur.i18nC.ville());
193
		identificationParams.set("i18n_ville", mediateur.i18nC.ville());
182
		identificationParams.set("i18n_region", mediateur.i18nC.region());
194
		identificationParams.set("i18n_region", mediateur.i18nC.region());
183
		identificationParams.set("i18n_pays", mediateur.i18nC.pays());
195
		identificationParams.set("i18n_pays", mediateur.i18nC.pays());
184
		
196
		
185
		identificationParams.set("i18n_titre_communication", mediateur.i18nC.titreCommunication());
197
		identificationParams.set("i18n_titre_communication", mediateur.i18nC.titreCommunication());
186
		identificationParams.set("i18n_tel", mediateur.i18nC.telephone());
198
		identificationParams.set("i18n_tel", mediateur.i18nC.telephone());
187
		identificationParams.set("i18n_fax", mediateur.i18nC.fax());
199
		identificationParams.set("i18n_fax", mediateur.i18nC.fax());
188
		identificationParams.set("i18n_courriel", mediateur.i18nC.courriel());
200
		identificationParams.set("i18n_courriel", mediateur.i18nC.courriel());
189
		identificationParams.set("i18n_acces", mediateur.i18nC.acces());
201
		identificationParams.set("i18n_acces", mediateur.i18nC.acces());
190
		identificationParams.set("i18n_web", mediateur.i18nC.siteWeb());
202
		identificationParams.set("i18n_web", mediateur.i18nC.siteWeb());
-
 
203
 
-
 
204
		String acronyme = construireTxtTruck(structure.getIdAlternatif());
-
 
205
		String typePrive = construireTxtListeOntologie(structure.getTypePrive());
-
 
206
		String typePublic = construireTxtListeOntologie(structure.getTypePublic());
-
 
207
		String pays = construireTxtListeOntologie(structure.getPays());
-
 
208
		String web = construireTxtTruck(structure.getUrl());
191
		
209
		
192
		identificationParams.set("acronyme", structure.getIdAlternatif());
210
		identificationParams.set("acronyme", acronyme);
193
		identificationParams.set("statut", structure.getTypePrive()+structure.getTypePublic());
211
		identificationParams.set("statut", typePrive+typePublic);
194
		identificationParams.set("date_fondation", structure.getDateFondationFormatLong());
212
		identificationParams.set("date_fondation", structure.getDateFondationFormatLong());
195
		identificationParams.set("nbre_personnel", structure.getNbrePersonne());
213
		identificationParams.set("nbre_personnel", structure.getNbrePersonne());
196
		
214
		
197
		identificationParams.set("description", structure.getDescription());
215
		identificationParams.set("description", structure.getDescription());
198
		
216
		
199
		identificationParams.set("adresse", structure.getAdresse());
217
		identificationParams.set("adresse", structure.getAdresse());
200
		identificationParams.set("cp", structure.getCodePostal());
218
		identificationParams.set("cp", structure.getCodePostal());
201
		identificationParams.set("ville", structure.getVille());
219
		identificationParams.set("ville", structure.getVille());
202
		identificationParams.set("region", structure.getRegion());
220
		identificationParams.set("region", structure.getRegion());
203
		identificationParams.set("pays", structure.getPays());
221
		identificationParams.set("pays", pays);
204
		
222
		
205
		identificationParams.set("tel", structure.getTelephone());
223
		identificationParams.set("tel", structure.getTelephone());
206
		identificationParams.set("fax", structure.getFax());
224
		identificationParams.set("fax", structure.getFax());
207
		identificationParams.set("courriel", structure.getCourriel());
225
		identificationParams.set("courriel", structure.getCourriel());
208
		identificationParams.set("acces", structure.getConditionAcces());
226
		identificationParams.set("acces", structure.getConditionAcces());
209
		identificationParams.set("web", structure.getUrl());
227
		identificationParams.set("web", web);
210
		
228
		
211
		afficherOnglet(identificationTpl, identificationParams, identificationOnglet);
229
		afficherOnglet(identificationTpl, identificationParams, identificationOnglet);
212
	}
230
	}
213
	
231
	
214
	private void afficherPersonnel() {
232
	private void afficherPersonnel() {
215
		String tableauPersonnelHtml = "";
233
		String tableauPersonnelHtml = "";
216
		if (personnel.size() > 0) {
234
		if (personnel.size() > 0) {
217
			tableauPersonnelHtml = construireTableauDuPersonnel();
235
			tableauPersonnelHtml = construireTableauDuPersonnel();
218
		}
236
		}
219
		
237
		
220
		personnelParams = new Params();
238
		Params personnelParams = new Params();
221
		personnelParams.set("css_corps", ComposantClass.DETAIL_CORPS_CONTENU);
239
		personnelParams.set("css_corps", ComposantClass.DETAIL_CORPS_CONTENU);
222
		personnelParams.set("i18n_titre_personnel", i18nC.titrePersonnel());
240
		personnelParams.set("i18n_titre_personnel", i18nC.titrePersonnel());
223
		personnelParams.set("i18n_nbre_personnel_collection", i18nC.nbrePersonnelCollection());
241
		personnelParams.set("i18n_nbre_personnel_collection", i18nC.nbrePersonnelCollection());
224
		personnelParams.set("nbre_personnel_collection", personnel.size());
242
		personnelParams.set("nbre_personnel_collection", personnel.size());
225
		personnelParams.set("tableau_personnel", tableauPersonnelHtml);
243
		personnelParams.set("tableau_personnel", tableauPersonnelHtml);
226
		
244
		
227
		afficherOnglet(personnelTpl, personnelParams, personnelOnglet);
245
		afficherOnglet(personnelTpl, personnelParams, personnelOnglet);
228
	}
246
	}
229
	
247
	
230
	private String construireTableauDuPersonnel() {
248
	private String construireTableauDuPersonnel() {
231
		Params contenuParams = new Params();
249
		Params contenuParams = new Params();
232
		contenuParams.set("i18n_titre_membre", i18nC.titreMembre());
250
		contenuParams.set("i18n_titre_membre", i18nC.titreMembre());
233
		contenuParams.set("i18n_fonction", i18nC.fonction());
251
		contenuParams.set("i18n_fonction", i18nC.fonction());
234
		contenuParams.set("i18n_prenom", i18nC.prenom());
252
		contenuParams.set("i18n_prenom", i18nC.prenom());
235
		contenuParams.set("i18n_nom", i18nC.nom());
253
		contenuParams.set("i18n_nom", i18nC.nom());
236
		contenuParams.set("i18n_tel", i18nC.telephoneFixe());
254
		contenuParams.set("i18n_tel", i18nC.telephoneFixe());
237
		contenuParams.set("i18n_fax", i18nC.fax());
255
		contenuParams.set("i18n_fax", i18nC.fax());
238
		contenuParams.set("i18n_courriel", i18nC.courrielPrincipal());
256
		contenuParams.set("i18n_courriel", i18nC.courrielPrincipal());
239
		contenuParams.set("i18n_statut", i18nC.statut());
257
		contenuParams.set("i18n_statut", i18nC.statut());
240
		contenuParams.set("i18n_tps_w", i18nC.tpsTravail());
258
		contenuParams.set("i18n_tps_w", i18nC.tpsTravail());
241
		contenuParams.set("i18n_specialite", i18nC.specialite());
259
		contenuParams.set("i18n_specialite", i18nC.specialite());
242
		contenuParams.set("i18n_contact", i18nC.boolContact());
260
		contenuParams.set("i18n_contact", i18nC.boolContact());
243
		
261
		
244
		String lignesPersonnel = ""; 
262
		String lignesPersonnel = ""; 
245
		Iterator<String> it = personnel.keySet().iterator();
263
		Iterator<String> it = personnel.keySet().iterator();
246
		while (it.hasNext()) {
264
		while (it.hasNext()) {
247
			StructureAPersonne personne = personnel.get(it.next());
265
			StructureAPersonne personne = personnel.get(it.next());
248
			Params ligneParams = new Params();
266
			Params ligneParams = new Params();
-
 
267
			
-
 
268
			String fonction = construireTxtListeOntologie(personne.getFonction());
-
 
269
			String statut = construireTxtListeOntologie(personne.getStatut());
-
 
270
			String contact = formaterOuiNon(personne.getContact());
-
 
271
			
249
			ligneParams.set("fonction", personne.getFonction());
272
			ligneParams.set("fonction", fonction);
250
			ligneParams.set("prenom", personne.getPrenom());
273
			ligneParams.set("prenom", personne.getPrenom());
251
			ligneParams.set("nom", personne.getNom());
274
			ligneParams.set("nom", personne.getNom());
252
			ligneParams.set("tel", personne.getTelephone());
275
			ligneParams.set("tel", personne.getTelephone());
253
			ligneParams.set("fax", personne.getFax());
276
			ligneParams.set("fax", personne.getFax());
254
			ligneParams.set("courriel", personne.getCourriel());
277
			ligneParams.set("courriel", personne.getCourriel());
255
			ligneParams.set("statut", personne.getStatut());
278
			ligneParams.set("statut", statut);
256
			ligneParams.set("tps_w", personne.getBotaTravailHebdoTps());
279
			ligneParams.set("tps_w", personne.getBotaTravailHebdoTps());
257
			ligneParams.set("specialite", personne.afficherSpecialite());
280
			ligneParams.set("specialite", personne.afficherSpecialite());
258
			ligneParams.set("contact", personne.getContact());
281
			ligneParams.set("contact", contact);
259
			lignesPersonnel += Format.substitute(lignePersonnelTpl, ligneParams);
282
			lignesPersonnel += Format.substitute(lignePersonnelTpl, ligneParams);
260
		}
283
		}
261
		contenuParams.set("lignes", lignesPersonnel);
284
		contenuParams.set("lignes", lignesPersonnel);
262
		
285
		
263
		String cHtml = Format.substitute(tableauPersonnelTpl, contenuParams);
286
		String cHtml = Format.substitute(tableauPersonnelTpl, contenuParams);
264
		return cHtml;
287
		return cHtml;
265
	}
288
	}
266
	
289
	
267
	private void afficherConservation() {
290
	private void afficherConservation() {
-
 
291
		Params conservationParams  = new Params();
268
		conservationParams.set("css_corps", ComposantClass.DETAIL_CORPS_CONTENU);
292
		conservationParams.set("css_corps", ComposantClass.DETAIL_CORPS_CONTENU);
269
		conservationParams.set("css_label", ComposantClass.LABEL);
293
		conservationParams.set("css_label", ComposantClass.LABEL);
270
		conservationParams.set("css_fieldset", ComposantClass.FIELDSET);
294
		conservationParams.set("css_fieldset", ComposantClass.FIELDSET);
271
		conservationParams.set("css_clear", ComposantClass.CLEAR);
295
		conservationParams.set("css_clear", ComposantClass.CLEAR);
272
		
296
		
273
		conservationParams.set("i18n_titre_conservation_personnel", i18nC.titreConservationPersonnel());
297
		conservationParams.set("i18n_titre_conservation_personnel", i18nC.titreConservationPersonnel());
274
		conservationParams.set("i18n_formation", i18nC.formation());
298
		conservationParams.set("i18n_formation", i18nC.formation());
275
		conservationParams.set("i18n_formation_interet", i18nC.formationInteret());
299
		conservationParams.set("i18n_formation_interet", i18nC.formationInteret());
276
		
300
		
277
		conservationParams.set("i18n_titre_local", i18nC.titreLocal());
301
		conservationParams.set("i18n_titre_local", i18nC.titreLocal());
278
		conservationParams.set("i18n_local_specifique", i18nC.localSpecifique());
302
		conservationParams.set("i18n_local_specifique", i18nC.localSpecifique());
279
		conservationParams.set("i18n_meuble_specifique", i18nC.meubleSpecifique());
303
		conservationParams.set("i18n_meuble_specifique", i18nC.meubleSpecifique());
280
		conservationParams.set("i18n_local_parametre", i18nC.localParametre());
304
		conservationParams.set("i18n_local_parametre", i18nC.localParametre());
-
 
305
		conservationParams.set("i18n_conservation_en_commun", i18nC.conservationEnCommun());
-
 
306
		conservationParams.set("i18n_acces_controle", i18nC.accesControle());
-
 
307
		
-
 
308
		conservationParams.set("i18n_titre_operation", i18nC.titreOperation());
-
 
309
		conservationParams.set("i18n_restauration", i18nC.restauration());
-
 
310
		conservationParams.set("i18n_materiel_conservation", i18nC.materielConservation());
-
 
311
		conservationParams.set("i18n_traitement", i18nC.traitement());
-
 
312
		
-
 
313
		conservationParams.set("i18n_titre_acquisition", i18nC.titreAcquisition());
-
 
314
		conservationParams.set("i18n_acquisition_collection", i18nC.acquisitionCollection());
-
 
315
		conservationParams.set("i18n_acquisition_echantillon", i18nC.acquisitionEchantillon());
281
		
316
		
282
		conservationParams.set("formation", formaterOuiNon(conservation.getFormation()));
317
		conservationParams.set("formation", formaterOuiNon(conservation.getFormation()));
283
		conservationParams.set("formation_info", formaterSautDeLigne(conservation.getFormationInfo()));
318
		conservationParams.set("formation_info", formaterSautDeLigne(conservation.getFormationInfo()));
284
		conservationParams.set("formation_interet", formaterOuiNon(conservation.getFormationInteret()));
319
		conservationParams.set("formation_interet", formaterOuiNon(conservation.getFormationInteret()));
285
		conservationParams.set("meuble_specifique", conservation.getStockageMeuble());
320
		conservationParams.set("meuble_specifique", conservation.getStockageMeuble());
-
 
321
		
-
 
322
		String chaineAAnalyser = conservation.getStockageLocal();
-
 
323
		String chaineAAfficher = construireTxtListeOntologie(chaineAAnalyser);
-
 
324
		conservationParams.set("local_specifique", chaineAAfficher);
-
 
325
		
-
 
326
		chaineAAnalyser = conservation.getStockageMeuble();
286
		
327
		chaineAAfficher = construireTxtListeOntologie(chaineAAnalyser);
-
 
328
		conservationParams.set("meuble_specifique", chaineAAfficher);
-
 
329
		
-
 
330
		chaineAAnalyser = conservation.getStockageParametre();
287
		conservationParams.set("meuble_specifique", conservation.getStockageMeuble());
331
		chaineAAfficher = construireTxtListeOntologie(chaineAAnalyser);
-
 
332
		conservationParams.set("local_parametre", chaineAAfficher);
-
 
333
		
-
 
334
		conservationParams.set("conservation_en_commun", formaterOuiNon(conservation.getCollectionCommune()));
-
 
335
		chaineAAnalyser = conservation.getCollectionAutre();
-
 
336
		chaineAAfficher = construireTxtListeOntologie(chaineAAnalyser);
-
 
337
		conservationParams.set("collection_autre", formaterParenthese(chaineAAfficher));
-
 
338
		
-
 
339
		conservationParams.set("acces_controle", formaterOuiNon(conservation.getAccesControle()));
-
 
340
		
-
 
341
		conservationParams.set("restauration", formaterOuiNon(conservation.getRestauration()));
-
 
342
		chaineAAnalyser = conservation.getRestaurationOperation();
-
 
343
		chaineAAfficher = construireTxtListeOntologie(chaineAAnalyser);
-
 
344
		conservationParams.set("restauration_operation", formaterParenthese(chaineAAfficher));
-
 
345
		
-
 
346
		chaineAAnalyser = conservation.getMaterielConservation();
-
 
347
		chaineAAfficher = construireTxtListeOntologie(chaineAAnalyser);
-
 
348
		conservationParams.set("materiel_conservation", chaineAAfficher);
-
 
349
		chaineAAnalyser = conservation.getMaterielAutre();
-
 
350
		chaineAAfficher = construireTxtListeOntologie(chaineAAnalyser);
-
 
351
		conservationParams.set("materiel_autre", formaterParenthese(chaineAAfficher));
-
 
352
		
-
 
353
		conservationParams.set("traitement", formaterOuiNon(conservation.getTraitement()));
-
 
354
		chaineAAnalyser = conservation.getTraitements();
-
 
355
		chaineAAfficher = construireTxtListeOntologie(chaineAAnalyser);
-
 
356
		conservationParams.set("traitements", formaterParenthese(chaineAAfficher));
-
 
357
		
-
 
358
		conservationParams.set("acquisition_collection", formaterOuiNon(conservation.getAcquisitionCollection()));
-
 
359
		conservationParams.set("acquisition_echantillon", formaterOuiNon(conservation.getAcquisitionEchantillon()));
288
		conservationParams.set("local_parametre", conservation.getStockageParametre());
360
		conservationParams.set("acquisition_traitement_info", construireTraitement());
289
		
361
		
290
		afficherOnglet(conservationTpl, conservationParams, conservationOnglet);
362
		afficherOnglet(conservationTpl, conservationParams, conservationOnglet);
291
	}
363
	}
-
 
364
	
-
 
365
	private String construireTraitement() {
-
 
366
		String cHtml = "";
-
 
367
		String echantillon = conservation.getAcquisitionEchantillon();
-
 
368
		
-
 
369
		if (echantillon.equals("1")) {
-
 
370
			Params traitementConservationParams  = new Params();
-
 
371
			traitementConservationParams.set("css_label", ComposantClass.LABEL);
-
 
372
			traitementConservationParams.set("i18n_acquisition_traitement", i18nC.acquisitionTraitement());
-
 
373
			
-
 
374
			traitementConservationParams.set("acquisition_traitement", formaterOuiNon(conservation.getAcquisitionTraitement()));
-
 
375
			
-
 
376
			traitementConservationParams.set("acquisition_traitement_type_info", construireTraitementType());
-
 
377
			
-
 
378
			cHtml = Format.substitute(traitementConservationTpl, traitementConservationParams);
-
 
379
		}
-
 
380
		
-
 
381
		return cHtml;
-
 
382
	}
-
 
383
	
-
 
384
	private String construireTraitementType() {
-
 
385
		String cHtml = "";
-
 
386
		String traitement = conservation.getAcquisitionTraitement();
-
 
387
		
-
 
388
		if (traitement.equals("1")) {
-
 
389
			Params typeTraitementParams  = new Params();
-
 
390
			typeTraitementParams.set("css_indentation", ComposantClass.INDENTATION);
-
 
391
			typeTraitementParams.set("css_label", ComposantClass.LABEL);
-
 
392
			typeTraitementParams.set("i18n_acquisition_traitement_insecte", i18nC.acquisitionTraitementInsecte());
-
 
393
			typeTraitementParams.set("i18n_acquisition_traitement_poison", i18nC.acquisitionTraitementPoison());
-
 
394
			
-
 
395
			String acquisitionTraitementInsecte = construireTxtListeOntologie(conservation.getAcquisitionTraitementInsecte());
-
 
396
			typeTraitementParams.set("acquisition_traitement_insecte", acquisitionTraitementInsecte);
-
 
397
			String acquisitionTraitementPoison = construireTxtListeOntologie(conservation.getAcquisitionTraitementPoison());
-
 
398
			typeTraitementParams.set("acquisition_traitement_poison", acquisitionTraitementPoison);
-
 
399
			
-
 
400
			cHtml = Format.substitute(typeTraitementConservationTpl, typeTraitementParams);
-
 
401
		}
-
 
402
		
-
 
403
		return cHtml;
-
 
404
	}
292
	
405
	
293
	private void afficherOnglet(String template, Params parametres, TabItem onglet) {
406
	private void afficherOnglet(String template, Params parametres, TabItem onglet) {
294
		String cHtml = Format.substitute(template, parametres);
407
		String cHtml = Format.substitute(template, parametres);
295
		HtmlContainer corpsConteneurDuHtml = new HtmlContainer(cHtml);
408
		HtmlContainer corpsConteneurDuHtml = new HtmlContainer(cHtml);
296
		onglet.removeAll();
409
		onglet.removeAll();
297
		onglet.add(corpsConteneurDuHtml);		
410
		onglet.add(corpsConteneurDuHtml);		
298
	}
411
	}
-
 
412
	
-
 
413
	private String formaterParenthese(String chaineAAfficher) {
-
 
414
		if (!chaineAAfficher.equals("")) {
-
 
415
			chaineAAfficher = "("+chaineAAfficher+")";
-
 
416
		}
-
 
417
		return chaineAAfficher;
-
 
418
	}
-
 
419
	
-
 
420
	private String formaterAutre(String chaineAAfficher) {
-
 
421
		if (!chaineAAfficher.equals("")) {
-
 
422
			chaineAAfficher = " ["+i18nC.autres()+" : "+chaineAAfficher+"]";
-
 
423
		}
-
 
424
		return chaineAAfficher;
-
 
425
	}
-
 
426
	
-
 
427
	private String formaterTableauDeTxt(ArrayList<String> tableauDeTxt) {
-
 
428
		String chaineAAfficher = "";
-
 
429
		int tailleDuTableau = tableauDeTxt.size();
-
 
430
		if (tailleDuTableau > 0) {
-
 
431
			int indexAvtDernier = tailleDuTableau - 1;
-
 
432
			for (int i = 0; i < tailleDuTableau; i++)	{
-
 
433
				String mot = tableauDeTxt.get(i);
-
 
434
				if (i != indexAvtDernier) {
-
 
435
					chaineAAfficher += mot+", ";
-
 
436
				} else {
-
 
437
					chaineAAfficher += nettoyerPointFinal(mot)+".";
-
 
438
				}
-
 
439
			}
-
 
440
		}
-
 
441
		return chaineAAfficher;
-
 
442
	}
299
	
443
	
300
	private String formaterOuiNon(String chaineAFormater) {
444
	private String formaterOuiNon(String chaineAFormater) {
301
		String txtARetourner = "";
445
		String txtARetourner = "";
302
		if (chaineAFormater.equals("0")) {
446
		if (chaineAFormater.equals("0")) {
303
			txtARetourner = i18nC.non();
447
			txtARetourner = i18nC.non();
304
		} else if (chaineAFormater.equals("1")) {
448
		} else if (chaineAFormater.equals("1")) {
305
			txtARetourner = i18nC.oui();
449
			txtARetourner = i18nC.oui();
306
		}
450
		}
307
		return txtARetourner;
451
		return txtARetourner;
308
	}
452
	}
309
	
453
	
310
	private String formaterSautDeLigne(String chaineAFormater) {
454
	private String formaterSautDeLigne(String chaineAFormater) {
311
		String txtARetourner = chaineAFormater.replaceAll("\n", sautLigneTpl);
455
		String txtARetourner = chaineAFormater.replaceAll("\n", sautLigneTpl);
312
		return txtARetourner;
456
		return txtARetourner;
313
	}
457
	}
-
 
458
 
-
 
459
	private String formaterValeurTruck(String valeur) {
-
 
460
		String chaineARetourner = "";
-
 
461
		
-
 
462
		if (valeur.matches("^[^#]+##[^$]+$"))	{
-
 
463
			String[] cleValeur = valeur.split("##");
-
 
464
			chaineARetourner = cleValeur[1]+" "+formaterParenthese(cleValeur[0]);
-
 
465
		} else if (!valeur.equals(""))	{
-
 
466
			chaineARetourner = valeur;
-
 
467
		} else {
-
 
468
			GWT.log("Valeur truck posant problèlme :"+valeur, null);
-
 
469
		}
-
 
470
		
-
 
471
		return chaineARetourner;
-
 
472
	}
-
 
473
 
-
 
474
	private String nettoyerPointFinal(String mot) {
-
 
475
		mot = mot.replaceAll("[.]$", "");
-
 
476
		return mot;
-
 
477
	}
314
 
478
	
315
	private void initialiserTousLesTpl() {
479
	private void initialiserTousLesTpl() {
316
		initialiserEnteteHtmlTpl();
480
		initialiserEnteteHtmlTpl();
317
		initialiserIdentificationTpl();
481
		initialiserIdentificationTpl();
318
		initialiserPersonnelTpl();
482
		initialiserPersonnelTpl();
319
		initialiserTableauPersonnelTpl();
483
		initialiserTableauPersonnelTpl();
320
		initialiserLignePersonnelTpl();
484
		initialiserLignePersonnelTpl();
321
		initialiserConservationTpl();
485
		initialiserConservationTpl();
-
 
486
		initialiserTraitementConservationTpl();
-
 
487
		initialiserTypeTraitementConservationTpl();
322
		initialiserValorisationTpl();
488
		initialiserValorisationTpl();
323
		initialiserSautLigneTpl();
489
		initialiserSautLigneTpl();
324
	}
490
	}
325
	
491
	
326
	private void initialiserEnteteHtmlTpl() {
492
	private void initialiserEnteteHtmlTpl() {
-
 
493
		enteteTpl = 	
327
		enteteTpl = 	"<div id='{css_id}'>"+
494
			"<div id='{css_id}'>"+
328
						"	<h1>{nom}</h1>"+
495
			"	<h1>{nom}</h1>"+
329
						"	<h2>{ville}<span class='{css_meta}'>{projet} - {id} - {guid}</span></h2>" +
496
			"	<h2>{ville}<span class='{css_meta}'>{projet} - {id} - {guid}</span></h2>" +
330
						"	" +
497
			"	" +
331
						"</div>";
498
			"</div>";
332
	}
499
	}
333
	
500
	
334
	private void initialiserIdentificationTpl() {
501
	private void initialiserIdentificationTpl() {
335
		identificationTpl =
502
		identificationTpl =
336
						"<div class='{css_corps}'>"+
503
			"<div class='{css_corps}'>"+
337
						"	<div class='{css_fieldset}'>"+
504
			"	<div class='{css_fieldset}'>"+
338
						"		<h2>{i18n_titre_administratif}</h2>"+
505
			"		<h2>{i18n_titre_administratif}</h2>"+
339
						"		<span class='{css_label}'>{i18n_acronyme} :</span> {acronyme}<br />"+
506
			"		<span class='{css_label}'>{i18n_acronyme} :</span> {acronyme}<br />"+
340
						"		<span class='{css_label}'>{i18n_acces} :</span> {acces}<br />"+
507
			"		<span class='{css_label}'>{i18n_acces} :</span> {acces}<br />"+
341
						"		<span class='{css_label}'>{i18n_statut} :</span> {statut}<br />"+
508
			"		<span class='{css_label}'>{i18n_statut} :</span> {statut}<br />"+
342
						"		<span class='{css_label}'>{i18n_date_fondation} :</span> {date_fondation}<br />"+
509
			"		<span class='{css_label}'>{i18n_date_fondation} :</span> {date_fondation}<br />"+
343
						"		<span class='{css_label}'>{i18n_nbre_personnel} :</span> {nbre_personnel}<br />"+
510
			"		<span class='{css_label}'>{i18n_nbre_personnel} :</span> {nbre_personnel}<br />"+
344
						"	</div>"+
511
			"	</div>"+
345
						"	<div class='{css_fieldset}'>"+
512
			"	<div class='{css_fieldset}'>"+
346
						"		<h2>{i18n_titre_description}</h2>"+
513
			"		<h2>{i18n_titre_description}</h2>"+
347
						"		{description}"+
514
			"		{description}"+
348
						"	</div>"+
515
			"	</div>"+
349
						"	<hr class='{css_clear}'/>"+
516
			"	<hr class='{css_clear}'/>"+
350
						"	<div class='{css_fieldset}'>"+
517
			"	<div class='{css_fieldset}'>"+
351
						"		<h2>{i18n_titre_adresse}</h2>"+
518
			"		<h2>{i18n_titre_adresse}</h2>"+
352
						"		<span class='{css_label}'>{i18n_adresse} :</span> {adresse}<br />" +
519
			"		<span class='{css_label}'>{i18n_adresse} :</span> {adresse}<br />" +
353
						"		<span class='{css_label}'>{i18n_cp} :</span> {cp}<br />" +
520
			"		<span class='{css_label}'>{i18n_cp} :</span> {cp}<br />" +
354
						"		<span class='{css_label}'>{i18n_ville} :</span> {ville}<br />" +
521
			"		<span class='{css_label}'>{i18n_ville} :</span> {ville}<br />" +
355
						"		<span class='{css_label}'>{i18n_region} :</span> {region}<br />" +
522
			"		<span class='{css_label}'>{i18n_region} :</span> {region}<br />" +
356
						"		<span class='{css_label}'>{i18n_pays} :</span> {pays}<br />" +
523
			"		<span class='{css_label}'>{i18n_pays} :</span> {pays}<br />" +
357
						"	</div>"+
524
			"	</div>"+
358
						"	<div class='{css_fieldset}'>"+
525
			"	<div class='{css_fieldset}'>"+
359
						"		<h2>{i18n_titre_communication}</h2>"+
526
			"		<h2>{i18n_titre_communication}</h2>"+
360
						"		<span class='{css_label}'>{i18n_tel} :</span> {tel}<br />"+
527
			"		<span class='{css_label}'>{i18n_tel} :</span> {tel}<br />"+
361
						"		<span class='{css_label}'>{i18n_fax} :</span> {fax}<br />"+
528
			"		<span class='{css_label}'>{i18n_fax} :</span> {fax}<br />"+
362
						"		<span class='{css_label}'>{i18n_courriel} :</span> {courriel}<br />"+
529
			"		<span class='{css_label}'>{i18n_courriel} :</span> {courriel}<br />"+
363
						"		<span class='{css_label}'>{i18n_web} :</span> {web}<br />"+
530
			"		<span class='{css_label}'>{i18n_web} :</span> {web}<br />"+
364
						"	</div>"+
531
			"	</div>"+
365
						"</div>";
532
			"</div>";
366
	}
533
	}
367
	
534
	
368
	private void initialiserPersonnelTpl() {
535
	private void initialiserPersonnelTpl() {
369
		personnelTpl =
536
		personnelTpl =
370
						"<div class='{css_corps}'>"+
537
			"<div class='{css_corps}'>"+
371
						"	<h2>{i18n_titre_personnel}</h2>"+
538
			"	<h2>{i18n_titre_personnel}</h2>"+
372
						"	<p><span class='{css_label}'>{i18n_nbre_personnel_collection} :</span> {nbre_personnel_collection}</p>"+
539
			"	<p><span class='{css_label}'>{i18n_nbre_personnel_collection} :</span> {nbre_personnel_collection}</p>"+
373
						"	{tableau_personnel}"+
540
			"	{tableau_personnel}"+
374
						"</div>";
541
			"</div>";
375
	}
542
	}
376
	
543
	
377
	private void initialiserTableauPersonnelTpl() {
544
	private void initialiserTableauPersonnelTpl() {
378
		tableauPersonnelTpl =
545
		tableauPersonnelTpl =
379
						"<h3>{i18n_titre_membre}</h3>"+
546
			"<h3>{i18n_titre_membre}</h3>"+
380
						"<table>"+
547
			"<table>"+
381
						"	<thead>"+
548
			"	<thead>"+
382
						"		<tr>" +
549
			"		<tr>" +
383
						"			<th>{i18n_fonction}</th>" +
550
			"			<th>{i18n_fonction}</th>" +
384
						"			<th>{i18n_prenom}</th>" +
551
			"			<th>{i18n_prenom}</th>" +
385
						"			<th>{i18n_nom}</th>" +
552
			"			<th>{i18n_nom}</th>" +
386
						"			<th>{i18n_tel}</th>" +
553
			"			<th>{i18n_tel}</th>" +
387
						"			<th>{i18n_fax}</th>" +
554
			"			<th>{i18n_fax}</th>" +
388
						"			<th>{i18n_courriel}</th>" +
555
			"			<th>{i18n_courriel}</th>" +
389
						"			<th>{i18n_statut}</th>" +
556
			"			<th>{i18n_statut}</th>" +
390
						"			<th>{i18n_tps_w}</th>" +
557
			"			<th>{i18n_tps_w}</th>" +
391
						"			<th>{i18n_specialite}</th>" +
558
			"			<th>{i18n_specialite}</th>" +
392
						"			<th>{i18n_contact}</th>" +
559
			"			<th>{i18n_contact}</th>" +
393
						"		</tr>"+
560
			"		</tr>"+
394
						"	</thead>"+
561
			"	</thead>"+
395
						"	<tbody>"+
562
			"	<tbody>"+
396
						"		{lignes}"+
563
			"		{lignes}"+
397
						"	</tbody>"+
564
			"	</tbody>"+
398
						"</table>";
565
			"</table>";
399
	}
566
	}
400
	
567
	
401
	private void initialiserLignePersonnelTpl() {
568
	private void initialiserLignePersonnelTpl() {
402
		lignePersonnelTpl =
569
		lignePersonnelTpl =
403
						"<tr>"+
570
			"<tr>"+
404
						"	<td>{fonction}</td>"+
571
			"	<td>{fonction}</td>"+
405
						"	<td>{prenom}</td>"+
572
			"	<td>{prenom}</td>"+
406
						"	<td>{nom}</td>"+
573
			"	<td>{nom}</td>"+
407
						"	<td>{tel}</td>" +
574
			"	<td>{tel}</td>" +
408
						"	<td>{fax}</td>" +
575
			"	<td>{fax}</td>" +
409
						"	<td>{courriel}</td>" +
576
			"	<td>{courriel}</td>" +
410
						"	<td>{statut}</td>" +
577
			"	<td>{statut}</td>" +
411
						"	<td>{tps_w}</td>" +
578
			"	<td>{tps_w}</td>" +
412
						"	<td>{specialite}</td>" +
579
			"	<td>{specialite}</td>" +
413
						"	<td>{contact}</td>" +
580
			"	<td>{contact}</td>" +
414
						"</tr>";
581
			"</tr>";
415
	}
582
	}
416
	
583
	
417
	private void initialiserConservationTpl() {
584
	private void initialiserConservationTpl() {
418
		conservationTpl =
585
		conservationTpl =
419
						"<div class='{css_corps}'>"+
586
			"<div class='{css_corps}'>"+
420
						"	<div class='{css_fieldset}'>"+
587
			"	<div class='{css_fieldset}'>"+
421
						"		<h2>{i18n_titre_conservation_personnel}</h2>"+
588
			"		<h2>{i18n_titre_conservation_personnel}</h2>"+
422
						"		<span class='{css_label}'>{i18n_formation} :</span> {formation}<br />"+
589
			"		<span class='{css_label}'>{i18n_formation} :</span> {formation}<br />"+
423
						"		{formation_info}<br />"+
590
			"		{formation_info}<br />"+
424
						"		<span class='{css_label}'>{i18n_formation_interet} :</span> {formation_interet}<br />"+
591
			"		<span class='{css_label}'>{i18n_formation_interet} :</span> {formation_interet}<br />"+
425
						"	</div>"+
592
			"	</div>"+
426
						"	<div class='{css_fieldset}'>"+
593
			"	<div class='{css_fieldset}'>"+
427
						"		<h2>{i18n_titre_local}</h2>"+
594
			"		<h2>{i18n_titre_local}</h2>"+
428
						"		<span class='{css_label}'>{i18n_local_specifique} :</span> {local_specifique}<br />"+
595
			"		<span class='{css_label}'>{i18n_local_specifique} :</span> {local_specifique}<br />"+
429
						"		<span class='{css_label}'>{i18n_meuble_specifique} :</span> {meuble_specifique}<br />"+
596
			"		<span class='{css_label}'>{i18n_meuble_specifique} :</span> {meuble_specifique}<br />"+
430
						"		<span class='{css_label}'>{i18n_local_parametre} :</span> {local_parametre}<br />"+
597
			"		<span class='{css_label}'>{i18n_local_parametre} :</span> {local_parametre}<br />"+
431
						"		<span class='{css_label}'>{i18n_conservation_en_commun} :</span> {conservation_en_commun}<br />"+
598
			"		<span class='{css_label}'>{i18n_conservation_en_commun} :</span> {conservation_en_commun} {collection_autre}<br />"+
432
						"		<span class='{css_label}'>{i18n_acces_control} :</span> {acces_control}<br />"+
599
			"		<span class='{css_label}'>{i18n_acces_controle} :</span> {acces_controle}<br />"+
433
						"	</div>"+
600
			"	</div>"+
434
						"	<hr class='{css_clear}'/>"+
601
			"	<hr class='{css_clear}'/>"+
-
 
602
			"	<div class='{css_fieldset}'>"+
-
 
603
			"		<h2>{i18n_titre_operation}</h2>"+
-
 
604
			"		<span class='{css_label}'>{i18n_restauration} :</span> {restauration} {restauration_operation}<br />"+
-
 
605
			"		<span class='{css_label}'>{i18n_materiel_conservation} :</span> {materiel_conservation} {materiel_autre}<br />"+
-
 
606
			"		<span class='{css_label}'>{i18n_traitement} :</span> {traitement} {traitements}<br />"+
-
 
607
			"	</div>"+
-
 
608
			"	<div class='{css_fieldset}'>"+
-
 
609
			"		<h2>{i18n_titre_acquisition}</h2>"+
-
 
610
			"		<span class='{css_label}'>{i18n_acquisition_collection} :</span> {acquisition_collection}<br />"+
-
 
611
			"		<span class='{css_label}'>{i18n_acquisition_echantillon} :</span> {acquisition_echantillon}<br />"+
-
 
612
			"			{acquisition_traitement_info}" +	
-
 
613
			"	</div>"+
435
						"</div>";
614
			"</div>";
-
 
615
	}
-
 
616
	
-
 
617
	private void initialiserTraitementConservationTpl() {
-
 
618
		traitementConservationTpl =
-
 
619
			"<span class='{css_label}'>{i18n_acquisition_traitement} :</span> {acquisition_traitement}<br />"+
-
 
620
			"	{acquisition_traitement_type_info}";
-
 
621
	}
-
 
622
	
-
 
623
	private void initialiserTypeTraitementConservationTpl() {
-
 
624
		typeTraitementConservationTpl =
-
 
625
			"<span class='{css_indentation} {css_label}'>{i18n_acquisition_traitement_insecte} :</span> {acquisition_traitement_insecte}<br />"+
-
 
626
			"<span class='{css_indentation} {css_label}'>{i18n_acquisition_traitement_poison} :</span> {acquisition_traitement_poison}<br />";
436
	}
627
	}
437
	
628
	
438
	private void initialiserValorisationTpl() {
629
	private void initialiserValorisationTpl() {
439
		valorisationTpl =
630
		valorisationTpl =
440
						"<div class='{css_corps}'>"+
631
			"<div class='{css_corps}'>"+
441
						"	<div class='{css_fieldset}'>"+
632
			"	<div class='{css_fieldset}'>"+
442
						"		<h2>{i18n_titre_action_valorisation}</h2>"+
633
			"		<h2>{i18n_titre_action_valorisation}</h2>"+
443
						"	</div>"+
634
			"	</div>"+
444
						"	<div class='{css_fieldset}'>"+
635
			"	<div class='{css_fieldset}'>"+
445
						"		<h2>{i18n_titre_recherche_scientifique}</h2>"+
636
			"		<h2>{i18n_titre_recherche_scientifique}</h2>"+
446
						"	</div>"+
637
			"	</div>"+
447
						"	<hr class='{css_clear}'/>"+
638
			"	<hr class='{css_clear}'/>"+
448
						"	<div class='{css_fieldset}'>"+
639
			"	<div class='{css_fieldset}'>"+
449
						"		<h2>{i18n_titre_acces_usage}</h2>"+
640
			"		<h2>{i18n_titre_acces_usage}</h2>"+
450
						"	</div>"+
641
			"	</div>"+
451
						"</div>";
642
			"</div>";
452
	}
643
	}
453
	
644
	
454
	private void initialiserSautLigneTpl() {
645
	private void initialiserSautLigneTpl() {
455
		sautLigneTpl = "<br />\n";
646
		sautLigneTpl = "<br />\n";
456
	}
647
	}
457
		
648
		
458
	public void rafraichir(Object nouvelleDonnees) {
649
	public void rafraichir(Object nouvelleDonnees) {
459
		if (nouvelleDonnees instanceof Structure) {
650
		if (nouvelleDonnees instanceof Structure) {
460
			structure = (Structure) nouvelleDonnees;
651
			structure = (Structure) nouvelleDonnees;
461
			afficherDetailInstitution();
652
			afficherDetailInstitution();
-
 
653
		} else if (nouvelleDonnees instanceof ProjetListe) {
-
 
654
			projets = (ProjetListe) nouvelleDonnees;
-
 
655
		} else if (nouvelleDonnees instanceof ValeurListe) {
-
 
656
			ValeurListe ontologieReceptionnee = (ValeurListe) nouvelleDonnees;
-
 
657
			ajouterListeValeursAOntologie(ontologieReceptionnee);
462
		} else if (nouvelleDonnees instanceof Information) {
658
		} else if (nouvelleDonnees instanceof Information) {
463
			Information info = (Information) nouvelleDonnees;
659
			Information info = (Information) nouvelleDonnees;
464
			if (info.getType().equals("liste_structure_a_personne")) {
660
			if (info.getType().equals("liste_structure_a_personne")) {
465
				allouerPersonnelAStructure((StructureAPersonneListe) info.getDonnee(0));
661
				allouerPersonnelAStructure((StructureAPersonneListe) info.getDonnee(0));
466
				afficherDetailInstitution();
662
				afficherDetailInstitution();
467
			}
663
			}
468
		} else if (nouvelleDonnees instanceof ValeurListe) {
-
 
469
			ValeurListe ontologie = (ValeurListe) nouvelleDonnees;
-
 
470
			
-
 
471
			if (ontologie.size() > 0) {
-
 
472
				Configuration config = (Configuration) Registry.get(RegistreId.CONFIG);
-
 
473
				
-
 
474
				if (ontologie.getId().equals(config.getListeId("localStockage"))) {
-
 
475
					String chaineAAnalyser = conservation.getStockageLocal();
-
 
476
					String chaineAAfficher = construireTxtListeOntologie(ontologie, chaineAAnalyser);
-
 
477
					conservationParams.set("local_specifique", chaineAAfficher);
-
 
478
					GWT.log(chaineAAfficher, null);
-
 
479
				}
-
 
480
			}
-
 
481
		} else {
664
		} else {
482
			GWT.log("Pas de correspondance dans la méthode rafraichir() de la classe "+this.getClass(), null);
665
			GWT.log("Pas de correspondance dans la méthode rafraichir() de la classe "+this.getClass(), null);
483
		}
666
		}
484
	}
667
	}
485
	
668
	
-
 
669
	private void ajouterListeValeursAOntologie(ValeurListe ontologieReceptionnee) {
-
 
670
		Iterator<String> it = ontologieReceptionnee.keySet().iterator();
-
 
671
		while (it.hasNext()) {
-
 
672
			String cle = it.next();
-
 
673
			Valeur valeur = ontologieReceptionnee.get(cle);
-
 
674
			if (valeur != null) {
-
 
675
				ontologie.put(cle, valeur);
-
 
676
			}
-
 
677
		}
-
 
678
	}
-
 
679
 
486
	protected String construireTxtListeOntologie(ValeurListe ontologie, String chaineAAnalyser) {
680
	protected String construireTxtprojet(String idProjet) {
-
 
681
		String chaineARetourner = idProjet;
-
 
682
		
-
 
683
		if (projets != null) {
-
 
684
			Projet projet = projets.get(idProjet);
-
 
685
			String nomDuProjet = projet.getNom();
-
 
686
			if  (!nomDuProjet.equals("")) {
-
 
687
				chaineARetourner = nomDuProjet;
-
 
688
			}
-
 
689
		}
-
 
690
		
-
 
691
		return chaineARetourner;
-
 
692
	}
-
 
693
	
-
 
694
	protected String construireTxtListeOntologie(String chaineAAnalyser) {
-
 
695
		ArrayList<String> termes = new ArrayList<String>();
487
		String chaineAAfficher = "";
696
		ArrayList<String> autres = new ArrayList<String>();
488
		if ((chaineAAnalyser != null) && (!chaineAAnalyser.trim().equals("")))	{
697
		if ((chaineAAnalyser != null) && (!chaineAAnalyser.trim().equals("")))	{
489
			String[] valeurs = chaineAAnalyser.split(";;");
698
			String[] valeurs = chaineAAnalyser.split(";;");
490
			int nbreValeurs = valeurs.length;
699
			int nbreValeurs = valeurs.length;
491
			if (nbreValeurs > 0)	{
700
			if (nbreValeurs > 0)	{
492
				for (int i = 0; i < nbreValeurs; i++)	{
701
				for (int i = 0; i < nbreValeurs; i++)	{
-
 
702
					String id = valeurs[i];
493
					if (valeurs[i].contains("##"))	{
703
					if (id.contains("AUTRE##"))	{
-
 
704
						String txt = id.replaceFirst("^AUTRE##", "");
-
 
705
						if (!txt.equals("")) {
-
 
706
							autres.add(txt);
494
						
707
						}
-
 
708
					} else if (id.matches("^[0-9]+$"))	{
495
					} else {
709
						if (ontologie != null) {
496
						Valeur valeur = ontologie.get(valeurs[i]);
710
							Valeur valeur = ontologie.get(id);
497
						if (valeur != null) {
711
							if (valeur != null) {
498
							String termeOntologie = valeur.getNom();
712
								String termeOntologie = valeur.getNom();
499
							if (i != (nbreValeurs - 1)) {
-
 
500
								termeOntologie += ", ";
713
								termes.add(termeOntologie);
501
							}
714
							}
502
							chaineAAfficher += termeOntologie;
-
 
503
							GWT.log("Valeur :"+valeurs[i]+" - Ontologie :"+valeur.getNom(), null);
-
 
504
						}
715
						}
505
					}
716
					}
506
				}
717
				}
507
			}
718
			}
508
		}
719
		}
-
 
720
		
-
 
721
		String chaineTermes = formaterTableauDeTxt(termes);
-
 
722
		String chaineAutres = formaterTableauDeTxt(autres);
-
 
723
		String chaineARetourner = chaineTermes+formaterAutre(chaineAutres);
-
 
724
		
509
		return chaineAAfficher;
725
		return chaineARetourner;
-
 
726
	}
-
 
727
	
-
 
728
	protected String construireTxtTruck(String chaineAAnalyser) {
-
 
729
		ArrayList<String> termes = new ArrayList<String>();
-
 
730
		
-
 
731
		if ((chaineAAnalyser != null) && (!chaineAAnalyser.trim().equals("")))	{
-
 
732
			String[] valeurs = chaineAAnalyser.split(";;");
-
 
733
			int nbreValeurs = valeurs.length;
-
 
734
			if (nbreValeurs > 0)	{
-
 
735
				for (int i = 0; i < nbreValeurs; i++)	{
-
 
736
					String valeur = valeurs[i];
-
 
737
					String valeurFormatee = formaterValeurTruck(valeur);
-
 
738
					termes.add(valeurFormatee);
-
 
739
				}
-
 
740
			}
-
 
741
		}
-
 
742
		
-
 
743
		String chaineARetourner = formaterTableauDeTxt(termes);
-
 
744
		return chaineARetourner;
510
	}
745
	}
511
	
746
	
512
	protected void allouerPersonnelAStructure(StructureAPersonneListe personnel) {
747
	protected void allouerPersonnelAStructure(StructureAPersonneListe personnel) {
513
		structure.setPersonnel(personnel);
748
		structure.setPersonnel(personnel);
514
	}
749
	}
515
 
750
 
516
}
751
}