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