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