453 |
jp_milcent |
1 |
package org.tela_botanica.client.vues;
|
|
|
2 |
|
883 |
jpm |
3 |
import java.util.Iterator;
|
|
|
4 |
|
453 |
jp_milcent |
5 |
import org.tela_botanica.client.ComposantClass;
|
|
|
6 |
import org.tela_botanica.client.ComposantId;
|
|
|
7 |
import org.tela_botanica.client.Mediateur;
|
|
|
8 |
import org.tela_botanica.client.interfaces.Rafraichissable;
|
|
|
9 |
import org.tela_botanica.client.modeles.Collection;
|
883 |
jpm |
10 |
import org.tela_botanica.client.modeles.CollectionAPersonne;
|
|
|
11 |
import org.tela_botanica.client.modeles.CollectionAPersonneListe;
|
|
|
12 |
import org.tela_botanica.client.modeles.CollectionAPublication;
|
|
|
13 |
import org.tela_botanica.client.modeles.CollectionAPublicationListe;
|
|
|
14 |
import org.tela_botanica.client.modeles.Information;
|
|
|
15 |
import org.tela_botanica.client.modeles.Personne;
|
453 |
jp_milcent |
16 |
import org.tela_botanica.client.modeles.ProjetListe;
|
883 |
jpm |
17 |
import org.tela_botanica.client.modeles.Publication;
|
453 |
jp_milcent |
18 |
import org.tela_botanica.client.modeles.Structure;
|
|
|
19 |
import org.tela_botanica.client.modeles.ValeurListe;
|
|
|
20 |
|
|
|
21 |
import com.extjs.gxt.ui.client.Style.Scroll;
|
|
|
22 |
import com.extjs.gxt.ui.client.util.Format;
|
|
|
23 |
import com.extjs.gxt.ui.client.util.Params;
|
|
|
24 |
import com.extjs.gxt.ui.client.widget.ContentPanel;
|
|
|
25 |
import com.extjs.gxt.ui.client.widget.Html;
|
|
|
26 |
import com.extjs.gxt.ui.client.widget.TabItem;
|
|
|
27 |
import com.extjs.gxt.ui.client.widget.TabPanel;
|
|
|
28 |
import com.extjs.gxt.ui.client.widget.layout.AnchorLayout;
|
|
|
29 |
import com.extjs.gxt.ui.client.widget.layout.FlowLayout;
|
|
|
30 |
import com.google.gwt.core.client.GWT;
|
|
|
31 |
|
|
|
32 |
public class CollectionDetailVue extends DetailVue implements Rafraichissable {
|
|
|
33 |
|
883 |
jpm |
34 |
private Collection collection = null;
|
|
|
35 |
private boolean collectionChargementOk = false;
|
|
|
36 |
private boolean personnesLieesChargementOk = false;
|
|
|
37 |
private boolean publicationsLieesChargementOk = false;
|
468 |
jp_milcent |
38 |
private Structure structure = null;
|
883 |
jpm |
39 |
|
453 |
jp_milcent |
40 |
private String enteteTpl = null;
|
|
|
41 |
private String generalTpl = null;
|
883 |
jpm |
42 |
private String personneTpl = null;
|
|
|
43 |
private String tableauPersonnesLieesTpl = null;
|
|
|
44 |
private String lignePersonneLieeTpl = null;
|
687 |
jp_milcent |
45 |
private String publicationTpl = null;
|
883 |
jpm |
46 |
private String tableauPublicationsLieesTpl = null;
|
|
|
47 |
private String lignePublicationLieeTpl = null;
|
630 |
jp_milcent |
48 |
private String descriptionTpl = null;
|
|
|
49 |
private String contenuTpl = null;
|
|
|
50 |
private String inventaireTpl = null;
|
453 |
jp_milcent |
51 |
|
|
|
52 |
private ContentPanel panneauPrincipal = null;
|
|
|
53 |
private Html entete = null;
|
|
|
54 |
private TabPanel onglets = null;
|
|
|
55 |
private TabItem generalOnglet = null;
|
862 |
jpm |
56 |
private TabItem personneOnglet = null;
|
687 |
jp_milcent |
57 |
private TabItem publicationOnglet = null;
|
630 |
jp_milcent |
58 |
private TabItem descriptionOnglet = null;
|
|
|
59 |
private TabItem contenuOnglet = null;
|
|
|
60 |
private TabItem inventaireOnglet = null;
|
883 |
jpm |
61 |
|
453 |
jp_milcent |
62 |
|
|
|
63 |
public CollectionDetailVue(Mediateur mediateurCourant) {
|
|
|
64 |
super(mediateurCourant);
|
|
|
65 |
initialiserTousLesTpl();
|
|
|
66 |
chargerOntologie();
|
|
|
67 |
|
|
|
68 |
panneauPrincipal = new ContentPanel();
|
|
|
69 |
panneauPrincipal.setLayout(new FlowLayout());
|
|
|
70 |
panneauPrincipal.setHeaderVisible(false);
|
|
|
71 |
panneauPrincipal.setBodyBorder(false);
|
|
|
72 |
|
|
|
73 |
entete = new Html();
|
|
|
74 |
entete.setId(ComposantId.ZONE_DETAIL_ENTETE);
|
|
|
75 |
panneauPrincipal.setTopComponent(entete);
|
|
|
76 |
|
|
|
77 |
onglets = new TabPanel();
|
|
|
78 |
onglets.setId(ComposantId.ZONE_DETAIL_CORPS);
|
|
|
79 |
onglets.setHeight("100%");
|
|
|
80 |
onglets.setBodyBorder(false);
|
|
|
81 |
|
|
|
82 |
generalOnglet = new TabItem(i18nC.structureInfoGeneral());
|
|
|
83 |
generalOnglet.setLayout(new AnchorLayout());
|
|
|
84 |
generalOnglet.setScrollMode(Scroll.AUTO);
|
|
|
85 |
onglets.add(generalOnglet);
|
|
|
86 |
|
862 |
jpm |
87 |
personneOnglet = new TabItem(i18nC.collectionPersonne());
|
|
|
88 |
personneOnglet.setLayout(new AnchorLayout());
|
|
|
89 |
personneOnglet.setScrollMode(Scroll.AUTO);
|
|
|
90 |
onglets.add(personneOnglet);
|
630 |
jp_milcent |
91 |
|
687 |
jp_milcent |
92 |
publicationOnglet = new TabItem(i18nC.collectionPublication());
|
|
|
93 |
publicationOnglet.setLayout(new AnchorLayout());
|
|
|
94 |
publicationOnglet.setScrollMode(Scroll.AUTO);
|
|
|
95 |
onglets.add(publicationOnglet);
|
|
|
96 |
|
630 |
jp_milcent |
97 |
descriptionOnglet = new TabItem(i18nC.collectionDescription());
|
|
|
98 |
descriptionOnglet.setLayout(new AnchorLayout());
|
|
|
99 |
descriptionOnglet.setScrollMode(Scroll.AUTO);
|
|
|
100 |
onglets.add(descriptionOnglet);
|
|
|
101 |
|
|
|
102 |
contenuOnglet = new TabItem(i18nC.collectionContenu());
|
|
|
103 |
contenuOnglet.setLayout(new AnchorLayout());
|
|
|
104 |
contenuOnglet.setScrollMode(Scroll.AUTO);
|
|
|
105 |
onglets.add(contenuOnglet);
|
862 |
jpm |
106 |
|
630 |
jp_milcent |
107 |
inventaireOnglet = new TabItem(i18nC.collectionInventaire());
|
|
|
108 |
inventaireOnglet.setLayout(new AnchorLayout());
|
|
|
109 |
inventaireOnglet.setScrollMode(Scroll.AUTO);
|
|
|
110 |
onglets.add(inventaireOnglet);
|
|
|
111 |
|
453 |
jp_milcent |
112 |
panneauPrincipal.add(onglets);
|
|
|
113 |
add(panneauPrincipal);
|
|
|
114 |
}
|
|
|
115 |
|
|
|
116 |
private void initialiserTousLesTpl() {
|
|
|
117 |
initialiserEnteteHtmlTpl();
|
|
|
118 |
initialiserGeneralTpl();
|
883 |
jpm |
119 |
initialiserPersonneTpl();
|
|
|
120 |
initialiserTableauPersonnesLieesTpl();
|
|
|
121 |
initialiserLignePersonneLieeTpl();
|
687 |
jp_milcent |
122 |
initialiserPublicationTpl();
|
883 |
jpm |
123 |
initialiserTableauPublicationsLieesTpl();
|
|
|
124 |
initialiserLignePublicationLieeTpl();
|
630 |
jp_milcent |
125 |
initialiserContenuTpl();
|
|
|
126 |
initialiserDescriptionTpl();
|
|
|
127 |
initialiserInventaireTpl();
|
453 |
jp_milcent |
128 |
}
|
|
|
129 |
|
|
|
130 |
private void initialiserEnteteHtmlTpl() {
|
|
|
131 |
enteteTpl =
|
|
|
132 |
"<div id='{css_id}'>"+
|
|
|
133 |
" <h1>{nom}</h1>"+
|
813 |
jpm |
134 |
" <h2>{structure}<span class='{css_meta}'>{projet} <br /> {i18n_id}:{id} - {guid}</span></h2>" +
|
453 |
jp_milcent |
135 |
"</div>";
|
|
|
136 |
}
|
|
|
137 |
|
|
|
138 |
private void initialiserGeneralTpl() {
|
|
|
139 |
generalTpl =
|
|
|
140 |
"<div class='{css_corps}'>"+
|
|
|
141 |
" <div class='{css_fieldset}'>"+
|
|
|
142 |
" <h2>{i18n_titre_identification}</h2>"+
|
630 |
jp_milcent |
143 |
" <span class='{css_label}'>{i18n_nom_alternatif} :</span> {nom_alternatif}<br />"+
|
477 |
jp_milcent |
144 |
" <span class='{css_label}'>{i18n_acronyme} :</span> {acronyme}<br />"+
|
|
|
145 |
" <span class='{css_label}'>{i18n_code} :</span> {code}<br />"+
|
630 |
jp_milcent |
146 |
" <span class='{css_label}'>{i18n_cote} :</span> {cote}<br />"+
|
|
|
147 |
" <span class='{css_label}'>{i18n_mere} :</span> {mere}<br />"+
|
687 |
jp_milcent |
148 |
" <span class='{css_label}'>{i18n_type_ncd} :</span> {type_ncd}<br />"+
|
|
|
149 |
" <span class='{css_label}'>{i18n_type_depot} :</span> {type_depot}<br />"+
|
453 |
jp_milcent |
150 |
" </div>"+
|
477 |
jp_milcent |
151 |
" <div class='{css_fieldset}'>"+
|
630 |
jp_milcent |
152 |
" <h2>{i18n_general_collection_titre}</h2>"+
|
477 |
jp_milcent |
153 |
" <span class='{css_label}'>{i18n_description} :</span> {description}<br />"+
|
|
|
154 |
" <span class='{css_label}'>{i18n_description_specialiste} :</span> {description_specialiste}<br />"+
|
630 |
jp_milcent |
155 |
" <span class='{css_label}'>{i18n_historique} :</span> {historique}<br />"+
|
|
|
156 |
" <span class='{css_label}'>{i18n_web} :</span> {web}<br />"+
|
|
|
157 |
" <span class='{css_label}'>{i18n_groupement_principe} :</span> {groupement_principe}<br />"+
|
|
|
158 |
" <span class='{css_label}'>{i18n_groupement_but} :</span> {groupement_but}<br />"+
|
477 |
jp_milcent |
159 |
" </div>"+
|
|
|
160 |
" <hr class='{css_clear}'/>"+
|
453 |
jp_milcent |
161 |
"</div>";
|
|
|
162 |
}
|
|
|
163 |
|
883 |
jpm |
164 |
private void initialiserPersonneTpl() {
|
|
|
165 |
personneTpl =
|
630 |
jp_milcent |
166 |
"<div class='{css_corps}'>"+
|
|
|
167 |
" <div class='{css_fieldset}'>"+
|
883 |
jpm |
168 |
" <h2>{i18n_titre_personne}</h2>"+
|
|
|
169 |
" {tableau_personnes_liees}"+
|
630 |
jp_milcent |
170 |
" </div>"+
|
|
|
171 |
" <hr class='{css_clear}'/>"+
|
|
|
172 |
"</div>";
|
|
|
173 |
}
|
|
|
174 |
|
883 |
jpm |
175 |
|
|
|
176 |
private void initialiserTableauPersonnesLieesTpl() {
|
|
|
177 |
tableauPersonnesLieesTpl =
|
|
|
178 |
"<h3>{i18n_titre_membre}</h3>"+
|
|
|
179 |
"<table>"+
|
|
|
180 |
" <thead>"+
|
|
|
181 |
" <tr>" +
|
|
|
182 |
" <th>{i18n_prenom}</th>" +
|
|
|
183 |
" <th>{i18n_nom}</th>" +
|
|
|
184 |
" </tr>"+
|
|
|
185 |
" </thead>"+
|
|
|
186 |
" <tbody>"+
|
|
|
187 |
" {lignes}"+
|
|
|
188 |
" </tbody>"+
|
|
|
189 |
"</table>";
|
|
|
190 |
}
|
|
|
191 |
|
|
|
192 |
private void initialiserLignePersonneLieeTpl() {
|
|
|
193 |
lignePersonneLieeTpl =
|
|
|
194 |
"<tr>"+
|
|
|
195 |
" <td>{prenom}</td>"+
|
|
|
196 |
" <td>{nom}</td>"+
|
|
|
197 |
"</tr>";
|
|
|
198 |
}
|
|
|
199 |
|
687 |
jp_milcent |
200 |
private void initialiserPublicationTpl() {
|
|
|
201 |
publicationTpl =
|
|
|
202 |
"<div class='{css_corps}'>"+
|
|
|
203 |
" <div class='{css_fieldset}'>"+
|
|
|
204 |
" <h2>{i18n_titre_publication}</h2>"+
|
883 |
jpm |
205 |
" {tableau_publications_liees}"+
|
687 |
jp_milcent |
206 |
" </div>"+
|
|
|
207 |
" <hr class='{css_clear}'/>"+
|
|
|
208 |
"</div>";
|
|
|
209 |
}
|
|
|
210 |
|
883 |
jpm |
211 |
private void initialiserTableauPublicationsLieesTpl() {
|
|
|
212 |
tableauPublicationsLieesTpl =
|
|
|
213 |
"<table>"+
|
|
|
214 |
" <thead>"+
|
|
|
215 |
" <tr>" +
|
|
|
216 |
" <th>{i18n_auteur}</th>" +
|
|
|
217 |
" <th>{i18n_titre}</th>" +
|
|
|
218 |
" </tr>"+
|
|
|
219 |
" </thead>"+
|
|
|
220 |
" <tbody>"+
|
|
|
221 |
" {lignes}"+
|
|
|
222 |
" </tbody>"+
|
|
|
223 |
"</table>";
|
|
|
224 |
}
|
|
|
225 |
|
|
|
226 |
private void initialiserLignePublicationLieeTpl() {
|
|
|
227 |
lignePublicationLieeTpl =
|
|
|
228 |
"<tr>"+
|
|
|
229 |
" <td>{auteur}</td>"+
|
|
|
230 |
" <td>{titre}</td>"+
|
|
|
231 |
"</tr>";
|
|
|
232 |
}
|
|
|
233 |
|
630 |
jp_milcent |
234 |
private void initialiserDescriptionTpl() {
|
|
|
235 |
descriptionTpl =
|
|
|
236 |
"<div class='{css_corps}'>"+
|
|
|
237 |
" <div class='{css_fieldset}'>"+
|
|
|
238 |
" <h2>{i18n_titre_description}</h2>"+
|
875 |
jpm |
239 |
" <span class='{css_label}'>{i18n_type_botanique} :</span> {type_botanique}<br />"+
|
|
|
240 |
" <span class='{css_label}'>{i18n_nbre_echantillon} :</span> {nbre_echantillon}<br />"+
|
630 |
jp_milcent |
241 |
" </div>"+
|
|
|
242 |
" <hr class='{css_clear}'/>"+
|
|
|
243 |
"</div>";
|
|
|
244 |
}
|
|
|
245 |
|
|
|
246 |
private void initialiserContenuTpl() {
|
|
|
247 |
contenuTpl =
|
|
|
248 |
"<div class='{css_corps}'>"+
|
|
|
249 |
" <div class='{css_fieldset}'>"+
|
|
|
250 |
" <h2>{i18n_titre_contenu}</h2>"+
|
|
|
251 |
" </div>"+
|
|
|
252 |
" <hr class='{css_clear}'/>"+
|
|
|
253 |
"</div>";
|
|
|
254 |
}
|
|
|
255 |
|
|
|
256 |
private void initialiserInventaireTpl() {
|
|
|
257 |
inventaireTpl =
|
|
|
258 |
"<div class='{css_corps}'>"+
|
|
|
259 |
" <div class='{css_fieldset}'>"+
|
|
|
260 |
" <h2>{i18n_titre_inventaire}</h2>"+
|
|
|
261 |
" </div>"+
|
|
|
262 |
" <hr class='{css_clear}'/>"+
|
|
|
263 |
"</div>";
|
|
|
264 |
}
|
|
|
265 |
|
453 |
jp_milcent |
266 |
private void chargerOntologie() {
|
875 |
jpm |
267 |
String[] listesCodes = {"typeCollectionBota", "typeCollectionNcd", "typeDepot", "groupementPrincipe", "realisationBut"};
|
813 |
jpm |
268 |
lancerChargementListesValeurs(listesCodes);
|
453 |
jp_milcent |
269 |
}
|
|
|
270 |
|
811 |
jpm |
271 |
public void rafraichir(Object nouvellesDonnees) {
|
|
|
272 |
if (nouvellesDonnees instanceof Collection) {
|
|
|
273 |
collection = (Collection) nouvellesDonnees;
|
813 |
jpm |
274 |
collectionChargementOk = true;
|
811 |
jpm |
275 |
} else if (nouvellesDonnees instanceof ProjetListe) {
|
|
|
276 |
projets = (ProjetListe) nouvellesDonnees;
|
813 |
jpm |
277 |
projetsChargementOk = true;
|
811 |
jpm |
278 |
} else if (nouvellesDonnees instanceof ValeurListe) {
|
813 |
jpm |
279 |
ValeurListe listeValeursReceptionnee = (ValeurListe) nouvellesDonnees;
|
816 |
jpm |
280 |
receptionerListeValeurs(listeValeursReceptionnee);
|
883 |
jpm |
281 |
} else if (nouvellesDonnees instanceof Information) {
|
|
|
282 |
Information info = (Information) nouvellesDonnees;
|
|
|
283 |
if (info.getType().equals("liste_collection_a_personne")) {
|
|
|
284 |
lierCollectionAPersonne((CollectionAPersonneListe) info.getDonnee(0));
|
|
|
285 |
} else if (info.getType().equals("liste_collection_a_publication")) {
|
|
|
286 |
lierCollectionAPublication((CollectionAPublicationListe) info.getDonnee(0));
|
|
|
287 |
}
|
453 |
jp_milcent |
288 |
} else {
|
862 |
jpm |
289 |
GWT.log(Mediateur.i18nM.erreurRafraichir(nouvellesDonnees.getClass(), this.getClass()), null);
|
453 |
jp_milcent |
290 |
}
|
813 |
jpm |
291 |
|
|
|
292 |
if (avoirDonneesChargees()) {
|
|
|
293 |
afficherDetail();
|
|
|
294 |
}
|
453 |
jp_milcent |
295 |
}
|
|
|
296 |
|
883 |
jpm |
297 |
protected void lierCollectionAPersonne(CollectionAPersonneListe personnes) {
|
|
|
298 |
collection.setPersonnesLiees(personnes);
|
|
|
299 |
personnesLieesChargementOk = true;
|
|
|
300 |
}
|
|
|
301 |
|
|
|
302 |
protected void lierCollectionAPublication(CollectionAPublicationListe publications) {
|
|
|
303 |
collection.setPublicationsLiees(publications);
|
|
|
304 |
publicationsLieesChargementOk = true;
|
|
|
305 |
}
|
|
|
306 |
|
813 |
jpm |
307 |
private boolean avoirDonneesChargees() {
|
|
|
308 |
boolean ok = false;
|
883 |
jpm |
309 |
if (projetsChargementOk && collectionChargementOk && ontologieChargementOk && personnesLieesChargementOk && publicationsLieesChargementOk) {
|
813 |
jpm |
310 |
ok = true;
|
|
|
311 |
}
|
|
|
312 |
return ok;
|
|
|
313 |
}
|
|
|
314 |
|
453 |
jp_milcent |
315 |
private void afficherDetail() {
|
|
|
316 |
if (collection != null) {
|
|
|
317 |
afficherEntete();
|
|
|
318 |
afficherIdentification();
|
883 |
jpm |
319 |
afficherPersonne();
|
687 |
jp_milcent |
320 |
afficherPublication();
|
630 |
jp_milcent |
321 |
afficherDescription();
|
|
|
322 |
afficherContenu();
|
|
|
323 |
afficherInventaire();
|
453 |
jp_milcent |
324 |
}
|
|
|
325 |
layout();
|
|
|
326 |
}
|
|
|
327 |
|
|
|
328 |
private void afficherEntete() {
|
|
|
329 |
Params enteteParams = new Params();
|
|
|
330 |
enteteParams.set("css_id", ComposantId.ZONE_DETAIL_ENTETE);
|
|
|
331 |
enteteParams.set("css_meta", ComposantClass.META);
|
|
|
332 |
|
813 |
jpm |
333 |
enteteParams.set("i18n_id", i18nC.id());
|
|
|
334 |
|
453 |
jp_milcent |
335 |
enteteParams.set("nom", collection.getNom());
|
468 |
jp_milcent |
336 |
enteteParams.set("structure", collection.getStructureNom());
|
453 |
jp_milcent |
337 |
enteteParams.set("id", collection.getId());
|
|
|
338 |
enteteParams.set("guid", collection.getGuid());
|
|
|
339 |
enteteParams.set("projet", construireTxtProjet(collection.getIdProjet()));
|
|
|
340 |
|
|
|
341 |
String eHtml = Format.substitute(enteteTpl, enteteParams);
|
|
|
342 |
entete.getElement().setInnerHTML(eHtml);
|
|
|
343 |
}
|
|
|
344 |
|
|
|
345 |
private void afficherIdentification() {
|
|
|
346 |
Params generalParams = new Params();
|
|
|
347 |
generalParams.set("i18n_titre_identification", i18nC.titreAdministratif());
|
687 |
jp_milcent |
348 |
generalParams.set("i18n_nom_alternatif", i18nC.nomAlternatif());
|
453 |
jp_milcent |
349 |
generalParams.set("i18n_acronyme", i18nC.acronyme());
|
477 |
jp_milcent |
350 |
generalParams.set("i18n_code", i18nC.code());
|
|
|
351 |
generalParams.set("i18n_cote", i18nC.cote());
|
|
|
352 |
generalParams.set("i18n_mere", i18nC.collectionMere());
|
687 |
jp_milcent |
353 |
generalParams.set("i18n_type_ncd", i18nC.typeCollectionNcd());
|
|
|
354 |
generalParams.set("i18n_type_depot", i18nC.typeDepot());
|
|
|
355 |
|
630 |
jp_milcent |
356 |
generalParams.set("i18n_general_collection_titre", i18nC.collectionGeneralTitre());
|
477 |
jp_milcent |
357 |
generalParams.set("i18n_description", i18nC.description());
|
|
|
358 |
generalParams.set("i18n_description_specialiste", i18nC.descriptionSpecialiste());
|
|
|
359 |
generalParams.set("i18n_historique", i18nC.historique());
|
|
|
360 |
generalParams.set("i18n_web", i18nC.siteWeb());
|
|
|
361 |
generalParams.set("i18n_groupement_principe", i18nC.groupementPrincipe());
|
|
|
362 |
generalParams.set("i18n_groupement_but", i18nC.groupementBut());
|
|
|
363 |
|
|
|
364 |
String acronyme = construireTxtTruck(collection.getIdAlternatif());
|
630 |
jp_milcent |
365 |
String code = construireTxtTruck(collection.getCode());
|
|
|
366 |
String nomAlternatif = construireTxtTruck(collection.getNomAlternatif());
|
|
|
367 |
String urls = construireTxtTruck(collection.getUrls());
|
|
|
368 |
String typeNcd = construireTxtListeOntologie(collection.getTypeNcd());
|
|
|
369 |
String typeDepot = construireTxtListeOntologie(collection.getTypeDepot());
|
875 |
jpm |
370 |
String groupementBut = construireTxtListeOntologie(collection.getGroupementBut());
|
|
|
371 |
String groupementPrincipe = construireTxtListeOntologie(collection.getGroupementPrincipe());
|
630 |
jp_milcent |
372 |
|
|
|
373 |
generalParams.set("nom_alternatif", nomAlternatif);
|
453 |
jp_milcent |
374 |
generalParams.set("acronyme", acronyme);
|
630 |
jp_milcent |
375 |
generalParams.set("code", code);
|
|
|
376 |
generalParams.set("cote", collection.getCote());
|
|
|
377 |
generalParams.set("mere", collection.getCollectionMereNom());
|
687 |
jp_milcent |
378 |
generalParams.set("type_ncd", typeNcd);
|
|
|
379 |
generalParams.set("type_depot", typeDepot);
|
|
|
380 |
|
477 |
jp_milcent |
381 |
generalParams.set("description", collection.getDescription());
|
|
|
382 |
generalParams.set("description_specialiste", collection.getDescriptionSpecialiste());
|
630 |
jp_milcent |
383 |
generalParams.set("historique", collection.getHistorique());
|
|
|
384 |
generalParams.set("web", urls);
|
875 |
jpm |
385 |
generalParams.set("groupement_principe", groupementPrincipe);
|
|
|
386 |
generalParams.set("groupement_but", groupementBut);
|
453 |
jp_milcent |
387 |
|
|
|
388 |
afficherOnglet(generalTpl, generalParams, generalOnglet);
|
|
|
389 |
}
|
|
|
390 |
|
883 |
jpm |
391 |
private void afficherPersonne() {
|
|
|
392 |
String tableauPersonneHtml = "";
|
914 |
jpm |
393 |
if (collection.getPersonnesLiees() != null && collection.getPersonnesLiees().size() > 0) {
|
883 |
jpm |
394 |
tableauPersonneHtml = construireTableauPersonnesLiees();
|
|
|
395 |
}
|
630 |
jp_milcent |
396 |
|
883 |
jpm |
397 |
Params personneParams = new Params();
|
|
|
398 |
personneParams.set("i18n_titre_personne", i18nC.collectionPersonneTitre());
|
|
|
399 |
personneParams.set("tableau_personnes_liees", tableauPersonneHtml);
|
|
|
400 |
|
|
|
401 |
afficherOnglet(personneTpl, personneParams, personneOnglet);
|
630 |
jp_milcent |
402 |
}
|
|
|
403 |
|
883 |
jpm |
404 |
private String construireTableauPersonnesLiees() {
|
|
|
405 |
Params contenuParams = new Params();
|
|
|
406 |
contenuParams.set("i18n_prenom", i18nC.personnePrenom());
|
|
|
407 |
contenuParams.set("i18n_nom", i18nC.personneNom());
|
|
|
408 |
|
|
|
409 |
String lignesPersonnel = "";
|
|
|
410 |
|
|
|
411 |
Iterator<String> it = collection.getPersonnesLiees().keySet().iterator();
|
|
|
412 |
while (it.hasNext()) {
|
|
|
413 |
CollectionAPersonne relationCollectionAPersonne = collection.getPersonnesLiees().get(it.next());
|
|
|
414 |
Personne personne = relationCollectionAPersonne.getPersonne();
|
|
|
415 |
Params ligneParams = new Params();
|
|
|
416 |
|
|
|
417 |
ligneParams.set("prenom", personne.getPrenom());
|
|
|
418 |
ligneParams.set("nom", personne.getNom());
|
|
|
419 |
lignesPersonnel += Format.substitute(lignePersonneLieeTpl, ligneParams);
|
|
|
420 |
}
|
|
|
421 |
contenuParams.set("lignes", lignesPersonnel);
|
|
|
422 |
|
|
|
423 |
String cHtml = Format.substitute(tableauPersonnesLieesTpl, contenuParams);
|
|
|
424 |
return cHtml;
|
|
|
425 |
}
|
|
|
426 |
|
687 |
jp_milcent |
427 |
private void afficherPublication() {
|
|
|
428 |
Params publicationParams = new Params();
|
|
|
429 |
publicationParams.set("i18n_titre_publication", i18nC.collectionPublicationTitre());
|
|
|
430 |
|
883 |
jpm |
431 |
String tableauPublicationHtml = "";
|
914 |
jpm |
432 |
if (collection.getPersonnesLiees() != null && collection.getPersonnesLiees().size() > 0) {
|
883 |
jpm |
433 |
tableauPublicationHtml = construireTableauPublicationsLiees();
|
|
|
434 |
}
|
|
|
435 |
publicationParams.set("tableau_publications_liees", tableauPublicationHtml);
|
|
|
436 |
|
687 |
jp_milcent |
437 |
afficherOnglet(publicationTpl, publicationParams, publicationOnglet);
|
|
|
438 |
}
|
|
|
439 |
|
883 |
jpm |
440 |
private String construireTableauPublicationsLiees() {
|
|
|
441 |
Params contenuParams = new Params();
|
|
|
442 |
contenuParams.set("i18n_auteur", i18nC.publicationAuteurs());
|
|
|
443 |
contenuParams.set("i18n_titre", i18nC.publicationTitre());
|
|
|
444 |
|
|
|
445 |
String lignesPublication = "";
|
|
|
446 |
|
|
|
447 |
Iterator<String> it = collection.getPublicationsLiees().keySet().iterator();
|
|
|
448 |
while (it.hasNext()) {
|
|
|
449 |
CollectionAPublication relationCollectionAPublication = collection.getPublicationsLiees().get(it.next());
|
|
|
450 |
Publication publication = relationCollectionAPublication.getPublication();
|
|
|
451 |
Params ligneParams = new Params();
|
|
|
452 |
|
|
|
453 |
ligneParams.set("auteur", publication.getAuteur());
|
|
|
454 |
ligneParams.set("titre", publication.getTitre());
|
|
|
455 |
lignesPublication += Format.substitute(lignePublicationLieeTpl, ligneParams);
|
|
|
456 |
}
|
|
|
457 |
contenuParams.set("lignes", lignesPublication);
|
|
|
458 |
|
|
|
459 |
String cHtml = Format.substitute(tableauPublicationsLieesTpl, contenuParams);
|
|
|
460 |
return cHtml;
|
|
|
461 |
}
|
|
|
462 |
|
630 |
jp_milcent |
463 |
private void afficherDescription() {
|
|
|
464 |
Params descriptionParams = new Params();
|
|
|
465 |
descriptionParams.set("i18n_titre_description", i18nC.collectionDescriptionTitre());
|
875 |
jpm |
466 |
descriptionParams.set("i18n_type_botanique", i18nC.typeCollectionBotanique());
|
|
|
467 |
descriptionParams.set("i18n_nbre_echantillon", i18nC.nbreEchantillon());
|
630 |
jp_milcent |
468 |
|
875 |
jpm |
469 |
String typeBota = construireTxtListeOntologie(collection.getBotanique().getType());
|
|
|
470 |
|
|
|
471 |
descriptionParams.set("type_botanique", typeBota);
|
|
|
472 |
descriptionParams.set("nbre_echantillon", collection.getBotanique().getNbreEchantillon());
|
|
|
473 |
|
630 |
jp_milcent |
474 |
afficherOnglet(descriptionTpl, descriptionParams, descriptionOnglet);
|
|
|
475 |
}
|
|
|
476 |
|
|
|
477 |
private void afficherContenu() {
|
|
|
478 |
Params contenuParams = new Params();
|
|
|
479 |
contenuParams.set("i18n_titre_contenu", i18nC.collectionContenuTitre());
|
|
|
480 |
|
|
|
481 |
afficherOnglet(contenuTpl, contenuParams, contenuOnglet);
|
|
|
482 |
}
|
|
|
483 |
|
|
|
484 |
private void afficherInventaire() {
|
|
|
485 |
Params inventaireParams = new Params();
|
|
|
486 |
inventaireParams.set("i18n_titre_inventaire", i18nC.collectionInventaireTitre());
|
|
|
487 |
|
|
|
488 |
afficherOnglet(inventaireTpl, inventaireParams, inventaireOnglet);
|
|
|
489 |
}
|
|
|
490 |
|
468 |
jp_milcent |
491 |
protected String getNomStructure() {
|
|
|
492 |
String nomStructure = "";
|
|
|
493 |
if (structure != null) {
|
|
|
494 |
nomStructure = structure.getNom();
|
|
|
495 |
} else {
|
|
|
496 |
nomStructure = collection.getIdStructure();
|
453 |
jp_milcent |
497 |
}
|
468 |
jp_milcent |
498 |
return nomStructure;
|
453 |
jp_milcent |
499 |
}
|
|
|
500 |
}
|