60 |
jpm |
1 |
package org.tela_botanica.client.vues;
|
|
|
2 |
|
406 |
jp_milcent |
3 |
import java.util.ArrayList;
|
420 |
jp_milcent |
4 |
import java.util.HashMap;
|
379 |
jp_milcent |
5 |
import java.util.Iterator;
|
|
|
6 |
|
|
|
7 |
import org.tela_botanica.client.ComposantClass;
|
373 |
jp_milcent |
8 |
import org.tela_botanica.client.ComposantId;
|
|
|
9 |
import org.tela_botanica.client.Mediateur;
|
406 |
jp_milcent |
10 |
import org.tela_botanica.client.i18n.Constantes;
|
60 |
jpm |
11 |
import org.tela_botanica.client.interfaces.Rafraichissable;
|
379 |
jp_milcent |
12 |
import org.tela_botanica.client.modeles.Information;
|
420 |
jp_milcent |
13 |
import org.tela_botanica.client.modeles.Projet;
|
|
|
14 |
import org.tela_botanica.client.modeles.ProjetListe;
|
60 |
jpm |
15 |
import org.tela_botanica.client.modeles.Structure;
|
379 |
jp_milcent |
16 |
import org.tela_botanica.client.modeles.StructureAPersonne;
|
|
|
17 |
import org.tela_botanica.client.modeles.StructureAPersonneListe;
|
|
|
18 |
import org.tela_botanica.client.modeles.StructureConservation;
|
|
|
19 |
import org.tela_botanica.client.modeles.StructureValorisation;
|
406 |
jp_milcent |
20 |
import org.tela_botanica.client.modeles.Valeur;
|
|
|
21 |
import org.tela_botanica.client.modeles.ValeurListe;
|
60 |
jpm |
22 |
|
|
|
23 |
import com.extjs.gxt.ui.client.Style.Scroll;
|
|
|
24 |
import com.extjs.gxt.ui.client.util.Format;
|
|
|
25 |
import com.extjs.gxt.ui.client.util.Params;
|
|
|
26 |
import com.extjs.gxt.ui.client.widget.ContentPanel;
|
374 |
jp_milcent |
27 |
import com.extjs.gxt.ui.client.widget.Html;
|
373 |
jp_milcent |
28 |
import com.extjs.gxt.ui.client.widget.HtmlContainer;
|
|
|
29 |
import com.extjs.gxt.ui.client.widget.LayoutContainer;
|
|
|
30 |
import com.extjs.gxt.ui.client.widget.TabItem;
|
|
|
31 |
import com.extjs.gxt.ui.client.widget.TabPanel;
|
390 |
jp_milcent |
32 |
import com.extjs.gxt.ui.client.widget.layout.AnchorLayout;
|
60 |
jpm |
33 |
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
|
374 |
jp_milcent |
34 |
import com.extjs.gxt.ui.client.widget.layout.FlowLayout;
|
373 |
jp_milcent |
35 |
import com.google.gwt.core.client.GWT;
|
60 |
jpm |
36 |
|
373 |
jp_milcent |
37 |
public class StructureDetailPanneauVue extends LayoutContainer implements Rafraichissable {
|
60 |
jpm |
38 |
|
373 |
jp_milcent |
39 |
private Mediateur mediateur = null;
|
406 |
jp_milcent |
40 |
private Constantes i18nC = null;
|
420 |
jp_milcent |
41 |
private HashMap<String, Valeur> ontologie = null;
|
|
|
42 |
private ProjetListe projets = null;
|
373 |
jp_milcent |
43 |
|
374 |
jp_milcent |
44 |
private String enteteTpl = null;
|
379 |
jp_milcent |
45 |
private String identificationTpl = null;
|
|
|
46 |
private String personnelTpl = null;
|
390 |
jp_milcent |
47 |
private String tableauPersonnelTpl = null;
|
379 |
jp_milcent |
48 |
private String lignePersonnelTpl = null;
|
390 |
jp_milcent |
49 |
private String conservationTpl = null;
|
420 |
jp_milcent |
50 |
private String traitementConservationTpl = null;
|
390 |
jp_milcent |
51 |
private String valorisationTpl = null;
|
406 |
jp_milcent |
52 |
private String sautLigneTpl = null;
|
373 |
jp_milcent |
53 |
|
|
|
54 |
private Structure structure = null;
|
379 |
jp_milcent |
55 |
private StructureAPersonneListe personnel = null;
|
|
|
56 |
private StructureValorisation valorisation = null;
|
|
|
57 |
private StructureConservation conservation = null;
|
373 |
jp_milcent |
58 |
|
|
|
59 |
private ContentPanel panneauPrincipal = null;
|
374 |
jp_milcent |
60 |
private Html entete = null;
|
373 |
jp_milcent |
61 |
private TabPanel onglets = null;
|
|
|
62 |
private TabItem identificationOnglet = null;
|
379 |
jp_milcent |
63 |
private TabItem personnelOnglet = null;
|
390 |
jp_milcent |
64 |
private TabItem conservationOnglet = null;
|
|
|
65 |
private TabItem valorisationOnglet = null;
|
420 |
jp_milcent |
66 |
private String typeTraitementConservationTpl;
|
406 |
jp_milcent |
67 |
|
373 |
jp_milcent |
68 |
public StructureDetailPanneauVue(Mediateur mediateurCourant) {
|
|
|
69 |
mediateur = mediateurCourant;
|
406 |
jp_milcent |
70 |
i18nC = mediateur.i18nC;
|
379 |
jp_milcent |
71 |
initialiserTousLesTpl();
|
420 |
jp_milcent |
72 |
ontologie = new HashMap<String, Valeur>();
|
|
|
73 |
chargerOntologie();
|
60 |
jpm |
74 |
|
|
|
75 |
setLayout(new FitLayout());
|
373 |
jp_milcent |
76 |
setBorders(false);
|
|
|
77 |
setScrollMode(Scroll.AUTO);
|
|
|
78 |
|
|
|
79 |
panneauPrincipal = new ContentPanel();
|
374 |
jp_milcent |
80 |
panneauPrincipal.setLayout(new FlowLayout());
|
|
|
81 |
panneauPrincipal.setHeaderVisible(false);
|
|
|
82 |
panneauPrincipal.setBodyBorder(false);
|
390 |
jp_milcent |
83 |
|
374 |
jp_milcent |
84 |
entete = new Html();
|
379 |
jp_milcent |
85 |
entete.setId(ComposantId.ZONE_DETAIL_ENTETE);
|
374 |
jp_milcent |
86 |
panneauPrincipal.setTopComponent(entete);
|
|
|
87 |
|
373 |
jp_milcent |
88 |
onglets = new TabPanel();
|
379 |
jp_milcent |
89 |
onglets.setId(ComposantId.ZONE_DETAIL_CORPS);
|
374 |
jp_milcent |
90 |
onglets.setHeight("100%");
|
|
|
91 |
onglets.setBodyBorder(false);
|
|
|
92 |
|
373 |
jp_milcent |
93 |
identificationOnglet = new TabItem("Général");
|
390 |
jp_milcent |
94 |
identificationOnglet.setLayout(new AnchorLayout());
|
379 |
jp_milcent |
95 |
identificationOnglet.setScrollMode(Scroll.AUTO);
|
373 |
jp_milcent |
96 |
onglets.add(identificationOnglet);
|
|
|
97 |
|
379 |
jp_milcent |
98 |
personnelOnglet = new TabItem("Personnel");
|
390 |
jp_milcent |
99 |
personnelOnglet.setLayout(new AnchorLayout());
|
379 |
jp_milcent |
100 |
personnelOnglet.setScrollMode(Scroll.AUTO);
|
|
|
101 |
onglets.add(personnelOnglet);
|
|
|
102 |
|
390 |
jp_milcent |
103 |
conservationOnglet = new TabItem("Conservation");
|
|
|
104 |
conservationOnglet.setLayout(new AnchorLayout());
|
|
|
105 |
conservationOnglet.setScrollMode(Scroll.AUTO);
|
|
|
106 |
onglets.add(conservationOnglet);
|
|
|
107 |
|
|
|
108 |
valorisationOnglet = new TabItem("Valorisation");
|
|
|
109 |
valorisationOnglet.setLayout(new AnchorLayout());
|
|
|
110 |
valorisationOnglet.setScrollMode(Scroll.AUTO);
|
|
|
111 |
onglets.add(valorisationOnglet);
|
|
|
112 |
|
373 |
jp_milcent |
113 |
panneauPrincipal.add(onglets);
|
|
|
114 |
add(panneauPrincipal);
|
60 |
jpm |
115 |
}
|
|
|
116 |
|
420 |
jp_milcent |
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 |
}
|
|
|
137 |
|
390 |
jp_milcent |
138 |
private void afficherDetailInstitution() {
|
|
|
139 |
if (structure != null) {
|
379 |
jp_milcent |
140 |
personnel = structure.getPersonnel();
|
|
|
141 |
valorisation = structure.getValorisation();
|
|
|
142 |
conservation = structure.getConservation();
|
|
|
143 |
|
373 |
jp_milcent |
144 |
afficherEntete();
|
|
|
145 |
afficherIdentification();
|
390 |
jp_milcent |
146 |
if (personnel != null) {
|
|
|
147 |
afficherPersonnel();
|
|
|
148 |
}
|
|
|
149 |
if (conservation != null) {
|
406 |
jp_milcent |
150 |
afficherConservation();
|
390 |
jp_milcent |
151 |
}
|
|
|
152 |
if (valorisation != null) {
|
|
|
153 |
//afficherValorisation();
|
|
|
154 |
}
|
60 |
jpm |
155 |
}
|
374 |
jp_milcent |
156 |
layout();
|
60 |
jpm |
157 |
}
|
373 |
jp_milcent |
158 |
|
|
|
159 |
private void afficherEntete() {
|
|
|
160 |
Params enteteParams = new Params();
|
390 |
jp_milcent |
161 |
enteteParams.set("css_id", ComposantId.ZONE_DETAIL_ENTETE);
|
|
|
162 |
enteteParams.set("css_meta", ComposantClass.META);
|
|
|
163 |
|
379 |
jp_milcent |
164 |
enteteParams.set("nom", structure.getNom());
|
|
|
165 |
enteteParams.set("ville", structure.getVille());
|
390 |
jp_milcent |
166 |
enteteParams.set("id", structure.getId());
|
|
|
167 |
enteteParams.set("guid", structure.getGuid());
|
420 |
jp_milcent |
168 |
enteteParams.set("projet", construireTxtprojet(structure.getIdProjet()));
|
373 |
jp_milcent |
169 |
|
374 |
jp_milcent |
170 |
String eHtml = Format.substitute(enteteTpl, enteteParams);
|
373 |
jp_milcent |
171 |
entete.getElement().setInnerHTML(eHtml);
|
|
|
172 |
}
|
|
|
173 |
|
|
|
174 |
private void afficherIdentification() {
|
420 |
jp_milcent |
175 |
Params identificationParams = new Params();
|
406 |
jp_milcent |
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);
|
390 |
jp_milcent |
180 |
|
406 |
jp_milcent |
181 |
identificationParams.set("i18n_titre_administratif", i18nC.titreAdministratif());
|
|
|
182 |
identificationParams.set("i18n_acronyme", i18nC.acronyme());
|
|
|
183 |
identificationParams.set("i18n_statut", i18nC.statut());
|
|
|
184 |
identificationParams.set("i18n_date_fondation", mediateur.i18nC.dateFondation());
|
|
|
185 |
identificationParams.set("i18n_nbre_personnel", mediateur.i18nC.nbrePersonnel());
|
390 |
jp_milcent |
186 |
|
406 |
jp_milcent |
187 |
identificationParams.set("i18n_titre_description", mediateur.i18nC.description());
|
|
|
188 |
identificationParams.set("i18n_description", mediateur.i18nC.description());
|
390 |
jp_milcent |
189 |
|
406 |
jp_milcent |
190 |
identificationParams.set("i18n_titre_adresse", mediateur.i18nC.adresse());
|
|
|
191 |
identificationParams.set("i18n_adresse", mediateur.i18nC.adresse());
|
|
|
192 |
identificationParams.set("i18n_cp", mediateur.i18nC.codePostal());
|
|
|
193 |
identificationParams.set("i18n_ville", mediateur.i18nC.ville());
|
|
|
194 |
identificationParams.set("i18n_region", mediateur.i18nC.region());
|
|
|
195 |
identificationParams.set("i18n_pays", mediateur.i18nC.pays());
|
390 |
jp_milcent |
196 |
|
406 |
jp_milcent |
197 |
identificationParams.set("i18n_titre_communication", mediateur.i18nC.titreCommunication());
|
|
|
198 |
identificationParams.set("i18n_tel", mediateur.i18nC.telephone());
|
|
|
199 |
identificationParams.set("i18n_fax", mediateur.i18nC.fax());
|
|
|
200 |
identificationParams.set("i18n_courriel", mediateur.i18nC.courriel());
|
|
|
201 |
identificationParams.set("i18n_acces", mediateur.i18nC.acces());
|
|
|
202 |
identificationParams.set("i18n_web", mediateur.i18nC.siteWeb());
|
420 |
jp_milcent |
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());
|
390 |
jp_milcent |
209 |
|
420 |
jp_milcent |
210 |
identificationParams.set("acronyme", acronyme);
|
|
|
211 |
identificationParams.set("statut", typePrive+typePublic);
|
406 |
jp_milcent |
212 |
identificationParams.set("date_fondation", structure.getDateFondationFormatLong());
|
|
|
213 |
identificationParams.set("nbre_personnel", structure.getNbrePersonne());
|
390 |
jp_milcent |
214 |
|
406 |
jp_milcent |
215 |
identificationParams.set("description", structure.getDescription());
|
390 |
jp_milcent |
216 |
|
406 |
jp_milcent |
217 |
identificationParams.set("adresse", structure.getAdresse());
|
|
|
218 |
identificationParams.set("cp", structure.getCodePostal());
|
|
|
219 |
identificationParams.set("ville", structure.getVille());
|
|
|
220 |
identificationParams.set("region", structure.getRegion());
|
420 |
jp_milcent |
221 |
identificationParams.set("pays", pays);
|
390 |
jp_milcent |
222 |
|
406 |
jp_milcent |
223 |
identificationParams.set("tel", structure.getTelephone());
|
|
|
224 |
identificationParams.set("fax", structure.getFax());
|
|
|
225 |
identificationParams.set("courriel", structure.getCourriel());
|
|
|
226 |
identificationParams.set("acces", structure.getConditionAcces());
|
420 |
jp_milcent |
227 |
identificationParams.set("web", web);
|
379 |
jp_milcent |
228 |
|
406 |
jp_milcent |
229 |
afficherOnglet(identificationTpl, identificationParams, identificationOnglet);
|
373 |
jp_milcent |
230 |
}
|
|
|
231 |
|
379 |
jp_milcent |
232 |
private void afficherPersonnel() {
|
390 |
jp_milcent |
233 |
String tableauPersonnelHtml = "";
|
|
|
234 |
if (personnel.size() > 0) {
|
|
|
235 |
tableauPersonnelHtml = construireTableauDuPersonnel();
|
|
|
236 |
}
|
|
|
237 |
|
420 |
jp_milcent |
238 |
Params personnelParams = new Params();
|
406 |
jp_milcent |
239 |
personnelParams.set("css_corps", ComposantClass.DETAIL_CORPS_CONTENU);
|
|
|
240 |
personnelParams.set("i18n_titre_personnel", i18nC.titrePersonnel());
|
|
|
241 |
personnelParams.set("i18n_nbre_personnel_collection", i18nC.nbrePersonnelCollection());
|
|
|
242 |
personnelParams.set("nbre_personnel_collection", personnel.size());
|
|
|
243 |
personnelParams.set("tableau_personnel", tableauPersonnelHtml);
|
379 |
jp_milcent |
244 |
|
406 |
jp_milcent |
245 |
afficherOnglet(personnelTpl, personnelParams, personnelOnglet);
|
390 |
jp_milcent |
246 |
}
|
|
|
247 |
|
|
|
248 |
private String construireTableauDuPersonnel() {
|
|
|
249 |
Params contenuParams = new Params();
|
406 |
jp_milcent |
250 |
contenuParams.set("i18n_titre_membre", i18nC.titreMembre());
|
|
|
251 |
contenuParams.set("i18n_fonction", i18nC.fonction());
|
|
|
252 |
contenuParams.set("i18n_prenom", i18nC.prenom());
|
|
|
253 |
contenuParams.set("i18n_nom", i18nC.nom());
|
|
|
254 |
contenuParams.set("i18n_tel", i18nC.telephoneFixe());
|
|
|
255 |
contenuParams.set("i18n_fax", i18nC.fax());
|
|
|
256 |
contenuParams.set("i18n_courriel", i18nC.courrielPrincipal());
|
|
|
257 |
contenuParams.set("i18n_statut", i18nC.statut());
|
|
|
258 |
contenuParams.set("i18n_tps_w", i18nC.tpsTravail());
|
|
|
259 |
contenuParams.set("i18n_specialite", i18nC.specialite());
|
|
|
260 |
contenuParams.set("i18n_contact", i18nC.boolContact());
|
390 |
jp_milcent |
261 |
|
379 |
jp_milcent |
262 |
String lignesPersonnel = "";
|
|
|
263 |
Iterator<String> it = personnel.keySet().iterator();
|
|
|
264 |
while (it.hasNext()) {
|
|
|
265 |
StructureAPersonne personne = personnel.get(it.next());
|
|
|
266 |
Params ligneParams = new Params();
|
420 |
jp_milcent |
267 |
|
|
|
268 |
String fonction = construireTxtListeOntologie(personne.getFonction());
|
|
|
269 |
String statut = construireTxtListeOntologie(personne.getStatut());
|
|
|
270 |
String contact = formaterOuiNon(personne.getContact());
|
|
|
271 |
|
|
|
272 |
ligneParams.set("fonction", fonction);
|
379 |
jp_milcent |
273 |
ligneParams.set("prenom", personne.getPrenom());
|
|
|
274 |
ligneParams.set("nom", personne.getNom());
|
|
|
275 |
ligneParams.set("tel", personne.getTelephone());
|
|
|
276 |
ligneParams.set("fax", personne.getFax());
|
|
|
277 |
ligneParams.set("courriel", personne.getCourriel());
|
420 |
jp_milcent |
278 |
ligneParams.set("statut", statut);
|
379 |
jp_milcent |
279 |
ligneParams.set("tps_w", personne.getBotaTravailHebdoTps());
|
|
|
280 |
ligneParams.set("specialite", personne.afficherSpecialite());
|
420 |
jp_milcent |
281 |
ligneParams.set("contact", contact);
|
379 |
jp_milcent |
282 |
lignesPersonnel += Format.substitute(lignePersonnelTpl, ligneParams);
|
|
|
283 |
}
|
|
|
284 |
contenuParams.set("lignes", lignesPersonnel);
|
|
|
285 |
|
390 |
jp_milcent |
286 |
String cHtml = Format.substitute(tableauPersonnelTpl, contenuParams);
|
|
|
287 |
return cHtml;
|
379 |
jp_milcent |
288 |
}
|
406 |
jp_milcent |
289 |
|
|
|
290 |
private void afficherConservation() {
|
420 |
jp_milcent |
291 |
Params conservationParams = new Params();
|
406 |
jp_milcent |
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);
|
390 |
jp_milcent |
296 |
|
406 |
jp_milcent |
297 |
conservationParams.set("i18n_titre_conservation_personnel", i18nC.titreConservationPersonnel());
|
|
|
298 |
conservationParams.set("i18n_formation", i18nC.formation());
|
|
|
299 |
conservationParams.set("i18n_formation_interet", i18nC.formationInteret());
|
|
|
300 |
|
|
|
301 |
conservationParams.set("i18n_titre_local", i18nC.titreLocal());
|
|
|
302 |
conservationParams.set("i18n_local_specifique", i18nC.localSpecifique());
|
|
|
303 |
conservationParams.set("i18n_meuble_specifique", i18nC.meubleSpecifique());
|
|
|
304 |
conservationParams.set("i18n_local_parametre", i18nC.localParametre());
|
420 |
jp_milcent |
305 |
conservationParams.set("i18n_conservation_en_commun", i18nC.conservationEnCommun());
|
|
|
306 |
conservationParams.set("i18n_acces_controle", i18nC.accesControle());
|
406 |
jp_milcent |
307 |
|
420 |
jp_milcent |
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());
|
|
|
316 |
|
406 |
jp_milcent |
317 |
conservationParams.set("formation", formaterOuiNon(conservation.getFormation()));
|
|
|
318 |
conservationParams.set("formation_info", formaterSautDeLigne(conservation.getFormationInfo()));
|
|
|
319 |
conservationParams.set("formation_interet", formaterOuiNon(conservation.getFormationInteret()));
|
|
|
320 |
conservationParams.set("meuble_specifique", conservation.getStockageMeuble());
|
|
|
321 |
|
420 |
jp_milcent |
322 |
String chaineAAnalyser = conservation.getStockageLocal();
|
|
|
323 |
String chaineAAfficher = construireTxtListeOntologie(chaineAAnalyser);
|
|
|
324 |
conservationParams.set("local_specifique", chaineAAfficher);
|
406 |
jp_milcent |
325 |
|
420 |
jp_milcent |
326 |
chaineAAnalyser = conservation.getStockageMeuble();
|
|
|
327 |
chaineAAfficher = construireTxtListeOntologie(chaineAAnalyser);
|
|
|
328 |
conservationParams.set("meuble_specifique", chaineAAfficher);
|
|
|
329 |
|
|
|
330 |
chaineAAnalyser = conservation.getStockageParametre();
|
|
|
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()));
|
|
|
360 |
conservationParams.set("acquisition_traitement_info", construireTraitement());
|
|
|
361 |
|
406 |
jp_milcent |
362 |
afficherOnglet(conservationTpl, conservationParams, conservationOnglet);
|
|
|
363 |
}
|
|
|
364 |
|
420 |
jp_milcent |
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 |
}
|
|
|
405 |
|
406 |
jp_milcent |
406 |
private void afficherOnglet(String template, Params parametres, TabItem onglet) {
|
|
|
407 |
String cHtml = Format.substitute(template, parametres);
|
|
|
408 |
HtmlContainer corpsConteneurDuHtml = new HtmlContainer(cHtml);
|
|
|
409 |
onglet.removeAll();
|
|
|
410 |
onglet.add(corpsConteneurDuHtml);
|
|
|
411 |
}
|
|
|
412 |
|
420 |
jp_milcent |
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 |
}
|
|
|
443 |
|
406 |
jp_milcent |
444 |
private String formaterOuiNon(String chaineAFormater) {
|
|
|
445 |
String txtARetourner = "";
|
|
|
446 |
if (chaineAFormater.equals("0")) {
|
|
|
447 |
txtARetourner = i18nC.non();
|
|
|
448 |
} else if (chaineAFormater.equals("1")) {
|
|
|
449 |
txtARetourner = i18nC.oui();
|
|
|
450 |
}
|
|
|
451 |
return txtARetourner;
|
|
|
452 |
}
|
|
|
453 |
|
|
|
454 |
private String formaterSautDeLigne(String chaineAFormater) {
|
|
|
455 |
String txtARetourner = chaineAFormater.replaceAll("\n", sautLigneTpl);
|
|
|
456 |
return txtARetourner;
|
|
|
457 |
}
|
|
|
458 |
|
420 |
jp_milcent |
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 |
}
|
|
|
478 |
|
379 |
jp_milcent |
479 |
private void initialiserTousLesTpl() {
|
|
|
480 |
initialiserEnteteHtmlTpl();
|
|
|
481 |
initialiserIdentificationTpl();
|
|
|
482 |
initialiserPersonnelTpl();
|
390 |
jp_milcent |
483 |
initialiserTableauPersonnelTpl();
|
379 |
jp_milcent |
484 |
initialiserLignePersonnelTpl();
|
390 |
jp_milcent |
485 |
initialiserConservationTpl();
|
420 |
jp_milcent |
486 |
initialiserTraitementConservationTpl();
|
|
|
487 |
initialiserTypeTraitementConservationTpl();
|
390 |
jp_milcent |
488 |
initialiserValorisationTpl();
|
406 |
jp_milcent |
489 |
initialiserSautLigneTpl();
|
379 |
jp_milcent |
490 |
}
|
|
|
491 |
|
373 |
jp_milcent |
492 |
private void initialiserEnteteHtmlTpl() {
|
420 |
jp_milcent |
493 |
enteteTpl =
|
|
|
494 |
"<div id='{css_id}'>"+
|
|
|
495 |
" <h1>{nom}</h1>"+
|
|
|
496 |
" <h2>{ville}<span class='{css_meta}'>{projet} - {id} - {guid}</span></h2>" +
|
|
|
497 |
" " +
|
|
|
498 |
"</div>";
|
373 |
jp_milcent |
499 |
}
|
|
|
500 |
|
379 |
jp_milcent |
501 |
private void initialiserIdentificationTpl() {
|
|
|
502 |
identificationTpl =
|
420 |
jp_milcent |
503 |
"<div class='{css_corps}'>"+
|
|
|
504 |
" <div class='{css_fieldset}'>"+
|
|
|
505 |
" <h2>{i18n_titre_administratif}</h2>"+
|
|
|
506 |
" <span class='{css_label}'>{i18n_acronyme} :</span> {acronyme}<br />"+
|
|
|
507 |
" <span class='{css_label}'>{i18n_acces} :</span> {acces}<br />"+
|
|
|
508 |
" <span class='{css_label}'>{i18n_statut} :</span> {statut}<br />"+
|
|
|
509 |
" <span class='{css_label}'>{i18n_date_fondation} :</span> {date_fondation}<br />"+
|
|
|
510 |
" <span class='{css_label}'>{i18n_nbre_personnel} :</span> {nbre_personnel}<br />"+
|
|
|
511 |
" </div>"+
|
|
|
512 |
" <div class='{css_fieldset}'>"+
|
|
|
513 |
" <h2>{i18n_titre_description}</h2>"+
|
|
|
514 |
" {description}"+
|
|
|
515 |
" </div>"+
|
|
|
516 |
" <hr class='{css_clear}'/>"+
|
|
|
517 |
" <div class='{css_fieldset}'>"+
|
|
|
518 |
" <h2>{i18n_titre_adresse}</h2>"+
|
|
|
519 |
" <span class='{css_label}'>{i18n_adresse} :</span> {adresse}<br />" +
|
|
|
520 |
" <span class='{css_label}'>{i18n_cp} :</span> {cp}<br />" +
|
|
|
521 |
" <span class='{css_label}'>{i18n_ville} :</span> {ville}<br />" +
|
|
|
522 |
" <span class='{css_label}'>{i18n_region} :</span> {region}<br />" +
|
|
|
523 |
" <span class='{css_label}'>{i18n_pays} :</span> {pays}<br />" +
|
|
|
524 |
" </div>"+
|
|
|
525 |
" <div class='{css_fieldset}'>"+
|
|
|
526 |
" <h2>{i18n_titre_communication}</h2>"+
|
|
|
527 |
" <span class='{css_label}'>{i18n_tel} :</span> {tel}<br />"+
|
|
|
528 |
" <span class='{css_label}'>{i18n_fax} :</span> {fax}<br />"+
|
|
|
529 |
" <span class='{css_label}'>{i18n_courriel} :</span> {courriel}<br />"+
|
|
|
530 |
" <span class='{css_label}'>{i18n_web} :</span> {web}<br />"+
|
|
|
531 |
" </div>"+
|
|
|
532 |
"</div>";
|
373 |
jp_milcent |
533 |
}
|
|
|
534 |
|
379 |
jp_milcent |
535 |
private void initialiserPersonnelTpl() {
|
|
|
536 |
personnelTpl =
|
420 |
jp_milcent |
537 |
"<div class='{css_corps}'>"+
|
|
|
538 |
" <h2>{i18n_titre_personnel}</h2>"+
|
|
|
539 |
" <p><span class='{css_label}'>{i18n_nbre_personnel_collection} :</span> {nbre_personnel_collection}</p>"+
|
|
|
540 |
" {tableau_personnel}"+
|
|
|
541 |
"</div>";
|
379 |
jp_milcent |
542 |
}
|
|
|
543 |
|
390 |
jp_milcent |
544 |
private void initialiserTableauPersonnelTpl() {
|
|
|
545 |
tableauPersonnelTpl =
|
420 |
jp_milcent |
546 |
"<h3>{i18n_titre_membre}</h3>"+
|
|
|
547 |
"<table>"+
|
|
|
548 |
" <thead>"+
|
|
|
549 |
" <tr>" +
|
|
|
550 |
" <th>{i18n_fonction}</th>" +
|
|
|
551 |
" <th>{i18n_prenom}</th>" +
|
|
|
552 |
" <th>{i18n_nom}</th>" +
|
|
|
553 |
" <th>{i18n_tel}</th>" +
|
|
|
554 |
" <th>{i18n_fax}</th>" +
|
|
|
555 |
" <th>{i18n_courriel}</th>" +
|
|
|
556 |
" <th>{i18n_statut}</th>" +
|
|
|
557 |
" <th>{i18n_tps_w}</th>" +
|
|
|
558 |
" <th>{i18n_specialite}</th>" +
|
|
|
559 |
" <th>{i18n_contact}</th>" +
|
|
|
560 |
" </tr>"+
|
|
|
561 |
" </thead>"+
|
|
|
562 |
" <tbody>"+
|
|
|
563 |
" {lignes}"+
|
|
|
564 |
" </tbody>"+
|
|
|
565 |
"</table>";
|
390 |
jp_milcent |
566 |
}
|
|
|
567 |
|
379 |
jp_milcent |
568 |
private void initialiserLignePersonnelTpl() {
|
|
|
569 |
lignePersonnelTpl =
|
420 |
jp_milcent |
570 |
"<tr>"+
|
|
|
571 |
" <td>{fonction}</td>"+
|
|
|
572 |
" <td>{prenom}</td>"+
|
|
|
573 |
" <td>{nom}</td>"+
|
|
|
574 |
" <td>{tel}</td>" +
|
|
|
575 |
" <td>{fax}</td>" +
|
|
|
576 |
" <td>{courriel}</td>" +
|
|
|
577 |
" <td>{statut}</td>" +
|
|
|
578 |
" <td>{tps_w}</td>" +
|
|
|
579 |
" <td>{specialite}</td>" +
|
|
|
580 |
" <td>{contact}</td>" +
|
|
|
581 |
"</tr>";
|
379 |
jp_milcent |
582 |
}
|
|
|
583 |
|
390 |
jp_milcent |
584 |
private void initialiserConservationTpl() {
|
|
|
585 |
conservationTpl =
|
420 |
jp_milcent |
586 |
"<div class='{css_corps}'>"+
|
|
|
587 |
" <div class='{css_fieldset}'>"+
|
|
|
588 |
" <h2>{i18n_titre_conservation_personnel}</h2>"+
|
|
|
589 |
" <span class='{css_label}'>{i18n_formation} :</span> {formation}<br />"+
|
|
|
590 |
" {formation_info}<br />"+
|
|
|
591 |
" <span class='{css_label}'>{i18n_formation_interet} :</span> {formation_interet}<br />"+
|
|
|
592 |
" </div>"+
|
|
|
593 |
" <div class='{css_fieldset}'>"+
|
|
|
594 |
" <h2>{i18n_titre_local}</h2>"+
|
|
|
595 |
" <span class='{css_label}'>{i18n_local_specifique} :</span> {local_specifique}<br />"+
|
|
|
596 |
" <span class='{css_label}'>{i18n_meuble_specifique} :</span> {meuble_specifique}<br />"+
|
|
|
597 |
" <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 />"+
|
|
|
599 |
" <span class='{css_label}'>{i18n_acces_controle} :</span> {acces_controle}<br />"+
|
|
|
600 |
" </div>"+
|
|
|
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>"+
|
|
|
614 |
"</div>";
|
390 |
jp_milcent |
615 |
}
|
|
|
616 |
|
420 |
jp_milcent |
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 />";
|
|
|
627 |
}
|
|
|
628 |
|
390 |
jp_milcent |
629 |
private void initialiserValorisationTpl() {
|
|
|
630 |
valorisationTpl =
|
420 |
jp_milcent |
631 |
"<div class='{css_corps}'>"+
|
|
|
632 |
" <div class='{css_fieldset}'>"+
|
|
|
633 |
" <h2>{i18n_titre_action_valorisation}</h2>"+
|
|
|
634 |
" </div>"+
|
|
|
635 |
" <div class='{css_fieldset}'>"+
|
|
|
636 |
" <h2>{i18n_titre_recherche_scientifique}</h2>"+
|
|
|
637 |
" </div>"+
|
|
|
638 |
" <hr class='{css_clear}'/>"+
|
|
|
639 |
" <div class='{css_fieldset}'>"+
|
|
|
640 |
" <h2>{i18n_titre_acces_usage}</h2>"+
|
|
|
641 |
" </div>"+
|
|
|
642 |
"</div>";
|
390 |
jp_milcent |
643 |
}
|
|
|
644 |
|
406 |
jp_milcent |
645 |
private void initialiserSautLigneTpl() {
|
|
|
646 |
sautLigneTpl = "<br />\n";
|
|
|
647 |
}
|
|
|
648 |
|
60 |
jpm |
649 |
public void rafraichir(Object nouvelleDonnees) {
|
|
|
650 |
if (nouvelleDonnees instanceof Structure) {
|
390 |
jp_milcent |
651 |
structure = (Structure) nouvelleDonnees;
|
|
|
652 |
afficherDetailInstitution();
|
420 |
jp_milcent |
653 |
} else if (nouvelleDonnees instanceof ProjetListe) {
|
|
|
654 |
projets = (ProjetListe) nouvelleDonnees;
|
|
|
655 |
} else if (nouvelleDonnees instanceof ValeurListe) {
|
|
|
656 |
ValeurListe ontologieReceptionnee = (ValeurListe) nouvelleDonnees;
|
|
|
657 |
ajouterListeValeursAOntologie(ontologieReceptionnee);
|
406 |
jp_milcent |
658 |
} else if (nouvelleDonnees instanceof Information) {
|
379 |
jp_milcent |
659 |
Information info = (Information) nouvelleDonnees;
|
|
|
660 |
if (info.getType().equals("liste_structure_a_personne")) {
|
|
|
661 |
allouerPersonnelAStructure((StructureAPersonneListe) info.getDonnee(0));
|
390 |
jp_milcent |
662 |
afficherDetailInstitution();
|
379 |
jp_milcent |
663 |
}
|
373 |
jp_milcent |
664 |
} else {
|
|
|
665 |
GWT.log("Pas de correspondance dans la méthode rafraichir() de la classe "+this.getClass(), null);
|
60 |
jpm |
666 |
}
|
|
|
667 |
}
|
406 |
jp_milcent |
668 |
|
420 |
jp_milcent |
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 |
|
|
|
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>();
|
|
|
696 |
ArrayList<String> autres = new ArrayList<String>();
|
406 |
jp_milcent |
697 |
if ((chaineAAnalyser != null) && (!chaineAAnalyser.trim().equals(""))) {
|
|
|
698 |
String[] valeurs = chaineAAnalyser.split(";;");
|
|
|
699 |
int nbreValeurs = valeurs.length;
|
|
|
700 |
if (nbreValeurs > 0) {
|
|
|
701 |
for (int i = 0; i < nbreValeurs; i++) {
|
420 |
jp_milcent |
702 |
String id = valeurs[i];
|
|
|
703 |
if (id.contains("AUTRE##")) {
|
|
|
704 |
String txt = id.replaceFirst("^AUTRE##", "");
|
|
|
705 |
if (!txt.equals("")) {
|
|
|
706 |
autres.add(txt);
|
|
|
707 |
}
|
|
|
708 |
} else if (id.matches("^[0-9]+$")) {
|
|
|
709 |
if (ontologie != null) {
|
|
|
710 |
Valeur valeur = ontologie.get(id);
|
|
|
711 |
if (valeur != null) {
|
|
|
712 |
String termeOntologie = valeur.getNom();
|
|
|
713 |
termes.add(termeOntologie);
|
406 |
jp_milcent |
714 |
}
|
|
|
715 |
}
|
|
|
716 |
}
|
|
|
717 |
}
|
|
|
718 |
}
|
|
|
719 |
}
|
420 |
jp_milcent |
720 |
|
|
|
721 |
String chaineTermes = formaterTableauDeTxt(termes);
|
|
|
722 |
String chaineAutres = formaterTableauDeTxt(autres);
|
|
|
723 |
String chaineARetourner = chaineTermes+formaterAutre(chaineAutres);
|
|
|
724 |
|
|
|
725 |
return chaineARetourner;
|
406 |
jp_milcent |
726 |
}
|
|
|
727 |
|
420 |
jp_milcent |
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;
|
|
|
745 |
}
|
|
|
746 |
|
406 |
jp_milcent |
747 |
protected void allouerPersonnelAStructure(StructureAPersonneListe personnel) {
|
379 |
jp_milcent |
748 |
structure.setPersonnel(personnel);
|
|
|
749 |
}
|
|
|
750 |
|
60 |
jpm |
751 |
}
|