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