Subversion Repositories eFlore/Applications.coel

Rev

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

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