934 |
jpm |
1 |
package org.tela_botanica.client.vues.collection;
|
453 |
jp_milcent |
2 |
|
961 |
jpm |
3 |
import java.util.HashMap;
|
883 |
jpm |
4 |
import java.util.Iterator;
|
|
|
5 |
|
453 |
jp_milcent |
6 |
import org.tela_botanica.client.ComposantClass;
|
|
|
7 |
import org.tela_botanica.client.ComposantId;
|
|
|
8 |
import org.tela_botanica.client.Mediateur;
|
|
|
9 |
import org.tela_botanica.client.interfaces.Rafraichissable;
|
883 |
jpm |
10 |
import org.tela_botanica.client.modeles.Information;
|
1918 |
aurelien |
11 |
import org.tela_botanica.client.modeles.OntologiesLocales;
|
453 |
jp_milcent |
12 |
import org.tela_botanica.client.modeles.ValeurListe;
|
935 |
jpm |
13 |
import org.tela_botanica.client.modeles.collection.Collection;
|
997 |
jpm |
14 |
import org.tela_botanica.client.modeles.collection.CollectionACommentaire;
|
|
|
15 |
import org.tela_botanica.client.modeles.collection.CollectionACommentaireListe;
|
935 |
jpm |
16 |
import org.tela_botanica.client.modeles.collection.CollectionAPersonne;
|
|
|
17 |
import org.tela_botanica.client.modeles.collection.CollectionAPersonneListe;
|
|
|
18 |
import org.tela_botanica.client.modeles.collection.CollectionAPublication;
|
|
|
19 |
import org.tela_botanica.client.modeles.collection.CollectionAPublicationListe;
|
961 |
jpm |
20 |
import org.tela_botanica.client.modeles.collection.CollectionBotanique;
|
|
|
21 |
import org.tela_botanica.client.modeles.collection.UniteRangement;
|
997 |
jpm |
22 |
import org.tela_botanica.client.modeles.commentaire.Commentaire;
|
935 |
jpm |
23 |
import org.tela_botanica.client.modeles.personne.Personne;
|
|
|
24 |
import org.tela_botanica.client.modeles.publication.Publication;
|
|
|
25 |
import org.tela_botanica.client.modeles.structure.Structure;
|
1322 |
gduche |
26 |
import org.tela_botanica.client.synchronisation.Sequenceur;
|
938 |
jpm |
27 |
import org.tela_botanica.client.util.Debug;
|
961 |
jpm |
28 |
import org.tela_botanica.client.util.UtilNombre;
|
|
|
29 |
import org.tela_botanica.client.util.UtilString;
|
936 |
jpm |
30 |
import org.tela_botanica.client.vues.DetailVue;
|
453 |
jp_milcent |
31 |
|
|
|
32 |
import com.extjs.gxt.ui.client.Style.Scroll;
|
|
|
33 |
import com.extjs.gxt.ui.client.util.Format;
|
|
|
34 |
import com.extjs.gxt.ui.client.util.Params;
|
|
|
35 |
import com.extjs.gxt.ui.client.widget.ContentPanel;
|
|
|
36 |
import com.extjs.gxt.ui.client.widget.Html;
|
|
|
37 |
import com.extjs.gxt.ui.client.widget.TabItem;
|
|
|
38 |
import com.extjs.gxt.ui.client.widget.TabPanel;
|
|
|
39 |
import com.extjs.gxt.ui.client.widget.layout.AnchorLayout;
|
938 |
jpm |
40 |
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
|
453 |
jp_milcent |
41 |
|
|
|
42 |
public class CollectionDetailVue extends DetailVue implements Rafraichissable {
|
|
|
43 |
|
883 |
jpm |
44 |
private Collection collection = null;
|
|
|
45 |
private boolean collectionChargementOk = false;
|
|
|
46 |
private boolean personnesLieesChargementOk = false;
|
|
|
47 |
private boolean publicationsLieesChargementOk = false;
|
997 |
jpm |
48 |
private boolean commentairesLieesChargementOk = false;
|
468 |
jp_milcent |
49 |
private Structure structure = null;
|
883 |
jpm |
50 |
|
453 |
jp_milcent |
51 |
private String enteteTpl = null;
|
|
|
52 |
private String generalTpl = null;
|
883 |
jpm |
53 |
private String personneTpl = null;
|
|
|
54 |
private String tableauPersonnesLieesTpl = null;
|
|
|
55 |
private String lignePersonneLieeTpl = null;
|
687 |
jp_milcent |
56 |
private String publicationTpl = null;
|
883 |
jpm |
57 |
private String tableauPublicationsLieesTpl = null;
|
|
|
58 |
private String lignePublicationLieeTpl = null;
|
630 |
jp_milcent |
59 |
private String descriptionTpl = null;
|
|
|
60 |
private String contenuTpl = null;
|
|
|
61 |
private String inventaireTpl = null;
|
997 |
jpm |
62 |
private String commentaireTpl = null;
|
|
|
63 |
private String tableauCommentairesLieesTpl = null;
|
|
|
64 |
private String ligneCommentaireLieeTpl = null;
|
453 |
jp_milcent |
65 |
|
|
|
66 |
private ContentPanel panneauPrincipal = null;
|
|
|
67 |
private Html entete = null;
|
|
|
68 |
private TabPanel onglets = null;
|
|
|
69 |
private TabItem generalOnglet = null;
|
862 |
jpm |
70 |
private TabItem personneOnglet = null;
|
687 |
jp_milcent |
71 |
private TabItem publicationOnglet = null;
|
630 |
jp_milcent |
72 |
private TabItem descriptionOnglet = null;
|
|
|
73 |
private TabItem contenuOnglet = null;
|
|
|
74 |
private TabItem inventaireOnglet = null;
|
997 |
jpm |
75 |
private TabItem commentaireOnglet = null;
|
961 |
jpm |
76 |
private String tableauUniteRangementTpl;
|
|
|
77 |
private String ligneUniteRangementTpl;
|
|
|
78 |
private String tableauUniteBaseTpl;
|
|
|
79 |
private String ligneUniteBaseTpl;
|
883 |
jpm |
80 |
|
1322 |
gduche |
81 |
private Sequenceur sequenceur;
|
453 |
jp_milcent |
82 |
|
1322 |
gduche |
83 |
public CollectionDetailVue(Mediateur mediateurCourant, Sequenceur sequenceur) {
|
453 |
jp_milcent |
84 |
super(mediateurCourant);
|
1322 |
gduche |
85 |
this.sequenceur = sequenceur;
|
453 |
jp_milcent |
86 |
initialiserTousLesTpl();
|
|
|
87 |
chargerOntologie();
|
|
|
88 |
|
|
|
89 |
panneauPrincipal = new ContentPanel();
|
938 |
jpm |
90 |
panneauPrincipal.setLayout(new FitLayout());
|
453 |
jp_milcent |
91 |
panneauPrincipal.setHeaderVisible(false);
|
|
|
92 |
panneauPrincipal.setBodyBorder(false);
|
|
|
93 |
|
|
|
94 |
entete = new Html();
|
|
|
95 |
entete.setId(ComposantId.ZONE_DETAIL_ENTETE);
|
|
|
96 |
panneauPrincipal.setTopComponent(entete);
|
|
|
97 |
|
|
|
98 |
onglets = new TabPanel();
|
|
|
99 |
onglets.setId(ComposantId.ZONE_DETAIL_CORPS);
|
|
|
100 |
onglets.setBodyBorder(false);
|
|
|
101 |
|
|
|
102 |
generalOnglet = new TabItem(i18nC.structureInfoGeneral());
|
|
|
103 |
generalOnglet.setLayout(new AnchorLayout());
|
|
|
104 |
generalOnglet.setScrollMode(Scroll.AUTO);
|
|
|
105 |
onglets.add(generalOnglet);
|
|
|
106 |
|
862 |
jpm |
107 |
personneOnglet = new TabItem(i18nC.collectionPersonne());
|
|
|
108 |
personneOnglet.setLayout(new AnchorLayout());
|
|
|
109 |
personneOnglet.setScrollMode(Scroll.AUTO);
|
|
|
110 |
onglets.add(personneOnglet);
|
630 |
jp_milcent |
111 |
|
687 |
jp_milcent |
112 |
publicationOnglet = new TabItem(i18nC.collectionPublication());
|
|
|
113 |
publicationOnglet.setLayout(new AnchorLayout());
|
|
|
114 |
publicationOnglet.setScrollMode(Scroll.AUTO);
|
|
|
115 |
onglets.add(publicationOnglet);
|
|
|
116 |
|
630 |
jp_milcent |
117 |
descriptionOnglet = new TabItem(i18nC.collectionDescription());
|
|
|
118 |
descriptionOnglet.setLayout(new AnchorLayout());
|
|
|
119 |
descriptionOnglet.setScrollMode(Scroll.AUTO);
|
|
|
120 |
onglets.add(descriptionOnglet);
|
|
|
121 |
|
|
|
122 |
contenuOnglet = new TabItem(i18nC.collectionContenu());
|
|
|
123 |
contenuOnglet.setLayout(new AnchorLayout());
|
|
|
124 |
contenuOnglet.setScrollMode(Scroll.AUTO);
|
|
|
125 |
onglets.add(contenuOnglet);
|
862 |
jpm |
126 |
|
630 |
jp_milcent |
127 |
inventaireOnglet = new TabItem(i18nC.collectionInventaire());
|
|
|
128 |
inventaireOnglet.setLayout(new AnchorLayout());
|
|
|
129 |
inventaireOnglet.setScrollMode(Scroll.AUTO);
|
|
|
130 |
onglets.add(inventaireOnglet);
|
|
|
131 |
|
997 |
jpm |
132 |
commentaireOnglet = new TabItem(i18nC.collectionCommentaire());
|
|
|
133 |
commentaireOnglet.setLayout(new AnchorLayout());
|
|
|
134 |
commentaireOnglet.setScrollMode(Scroll.AUTO);
|
|
|
135 |
onglets.add(commentaireOnglet);
|
|
|
136 |
|
453 |
jp_milcent |
137 |
panneauPrincipal.add(onglets);
|
|
|
138 |
add(panneauPrincipal);
|
|
|
139 |
}
|
|
|
140 |
|
|
|
141 |
private void initialiserTousLesTpl() {
|
|
|
142 |
initialiserEnteteHtmlTpl();
|
|
|
143 |
initialiserGeneralTpl();
|
883 |
jpm |
144 |
initialiserPersonneTpl();
|
|
|
145 |
initialiserTableauPersonnesLieesTpl();
|
|
|
146 |
initialiserLignePersonneLieeTpl();
|
687 |
jp_milcent |
147 |
initialiserPublicationTpl();
|
883 |
jpm |
148 |
initialiserTableauPublicationsLieesTpl();
|
|
|
149 |
initialiserLignePublicationLieeTpl();
|
630 |
jp_milcent |
150 |
initialiserContenuTpl();
|
|
|
151 |
initialiserDescriptionTpl();
|
961 |
jpm |
152 |
initialiserTableauUniteRangementTpl();
|
|
|
153 |
initialiserLigneUniteRangementTpl();
|
|
|
154 |
initialiserTableauUniteBaseTpl();
|
|
|
155 |
initialiserLigneUniteBaseTpl();
|
630 |
jp_milcent |
156 |
initialiserInventaireTpl();
|
997 |
jpm |
157 |
initialiserCommentaireTpl();
|
|
|
158 |
initialiserTableauCommentairesLieesTpl();
|
|
|
159 |
initialiserLigneCommentaireLieeTpl();
|
453 |
jp_milcent |
160 |
}
|
|
|
161 |
|
|
|
162 |
private void initialiserEnteteHtmlTpl() {
|
|
|
163 |
enteteTpl =
|
|
|
164 |
"<div id='{css_id}'>"+
|
|
|
165 |
" <h1>{nom}</h1>"+
|
1764 |
aurelien |
166 |
" <h2>{structure}<span class='{css_meta}'><br /> {i18n_id}:{id} - {guid}</span></h2>" +
|
453 |
jp_milcent |
167 |
"</div>";
|
|
|
168 |
}
|
|
|
169 |
|
|
|
170 |
private void initialiserGeneralTpl() {
|
|
|
171 |
generalTpl =
|
|
|
172 |
"<div class='{css_corps}'>"+
|
|
|
173 |
" <div class='{css_fieldset}'>"+
|
|
|
174 |
" <h2>{i18n_titre_identification}</h2>"+
|
630 |
jp_milcent |
175 |
" <span class='{css_label}'>{i18n_nom_alternatif} :</span> {nom_alternatif}<br />"+
|
|
|
176 |
" <span class='{css_label}'>{i18n_mere} :</span> {mere}<br />"+
|
687 |
jp_milcent |
177 |
" <span class='{css_label}'>{i18n_type_ncd} :</span> {type_ncd}<br />"+
|
|
|
178 |
" <span class='{css_label}'>{i18n_type_depot} :</span> {type_depot}<br />"+
|
961 |
jpm |
179 |
" <span class='{css_label}'>{i18n_code} :</span> {code}<br />"+
|
|
|
180 |
" <span class='{css_label}'>{i18n_cote} :</span> {cote}<br />"+
|
453 |
jp_milcent |
181 |
" </div>"+
|
477 |
jp_milcent |
182 |
" <div class='{css_fieldset}'>"+
|
630 |
jp_milcent |
183 |
" <h2>{i18n_general_collection_titre}</h2>"+
|
477 |
jp_milcent |
184 |
" <span class='{css_label}'>{i18n_description} :</span> {description}<br />"+
|
630 |
jp_milcent |
185 |
" <span class='{css_label}'>{i18n_historique} :</span> {historique}<br />"+
|
|
|
186 |
" <span class='{css_label}'>{i18n_web} :</span> {web}<br />"+
|
961 |
jpm |
187 |
" </div>"+
|
|
|
188 |
" <hr class='{css_clear}'/>"+
|
|
|
189 |
" <div class='{css_fieldset}'>"+
|
|
|
190 |
" <h2>{i18n_couverture_collection_titre}</h2>"+
|
|
|
191 |
" <span class='{css_label}'>{i18n_couverture_geo} :</span> {couverture_geo}<br />"+
|
477 |
jp_milcent |
192 |
" </div>"+
|
961 |
jpm |
193 |
" <div class='{css_fieldset}'>"+
|
|
|
194 |
" <h2>{i18n_specimen_type_titre}</h2>"+
|
|
|
195 |
" <span class='{css_label}'>{i18n_specimen_type_presence} :</span> {specimen_type_presence}<br />"+
|
|
|
196 |
" <span class='{css_label}'>{i18n_specimen_type_nombre} :</span> {specimen_type_nombre}<br />"+
|
|
|
197 |
" <span class='{css_label}'>{i18n_specimen_type_classement} :</span> {specimen_type_classement}<br />"+
|
|
|
198 |
" </div>"+
|
477 |
jp_milcent |
199 |
" <hr class='{css_clear}'/>"+
|
453 |
jp_milcent |
200 |
"</div>";
|
|
|
201 |
}
|
|
|
202 |
|
883 |
jpm |
203 |
private void initialiserPersonneTpl() {
|
|
|
204 |
personneTpl =
|
630 |
jp_milcent |
205 |
"<div class='{css_corps}'>"+
|
961 |
jpm |
206 |
" <h2>{i18n_titre_personne}</h2>"+
|
|
|
207 |
" {tableau_personnes_liees}"+
|
630 |
jp_milcent |
208 |
"</div>";
|
|
|
209 |
}
|
|
|
210 |
|
883 |
jpm |
211 |
private void initialiserTableauPersonnesLieesTpl() {
|
|
|
212 |
tableauPersonnesLieesTpl =
|
|
|
213 |
"<table>"+
|
|
|
214 |
" <thead>"+
|
|
|
215 |
" <tr>" +
|
961 |
jpm |
216 |
" <th>{i18n_relation}</th>" +
|
|
|
217 |
" <th>{i18n_nom_complet}</th>" +
|
|
|
218 |
" <th>{i18n_nom}</th>" +
|
883 |
jpm |
219 |
" <th>{i18n_prenom}</th>" +
|
961 |
jpm |
220 |
" <th>{i18n_naissance_date}</th>" +
|
|
|
221 |
" <th>{i18n_naissance_lieu}</th>" +
|
|
|
222 |
" <th>{i18n_etre_decede}</th>" +
|
|
|
223 |
" <th>{i18n_deces_date}</th>" +
|
|
|
224 |
" <th>{i18n_deces_lieu}</th>" +
|
883 |
jpm |
225 |
" </tr>"+
|
|
|
226 |
" </thead>"+
|
|
|
227 |
" <tbody>"+
|
|
|
228 |
" {lignes}"+
|
|
|
229 |
" </tbody>"+
|
|
|
230 |
"</table>";
|
|
|
231 |
}
|
|
|
232 |
|
|
|
233 |
private void initialiserLignePersonneLieeTpl() {
|
|
|
234 |
lignePersonneLieeTpl =
|
|
|
235 |
"<tr>"+
|
961 |
jpm |
236 |
" <td>{relation}</td>"+
|
|
|
237 |
" <td>{nom_complet}</td>"+
|
|
|
238 |
" <td>{nom}</td>"+
|
883 |
jpm |
239 |
" <td>{prenom}</td>"+
|
961 |
jpm |
240 |
" <td>{naissance_date}</td>"+
|
|
|
241 |
" <td>{naissance_lieu}</td>"+
|
|
|
242 |
" <td>{etre_decede}</td>"+
|
|
|
243 |
" <td>{deces_date}</td>"+
|
|
|
244 |
" <td>{deces_lieu}</td>"+
|
883 |
jpm |
245 |
"</tr>";
|
|
|
246 |
}
|
|
|
247 |
|
687 |
jp_milcent |
248 |
private void initialiserPublicationTpl() {
|
|
|
249 |
publicationTpl =
|
|
|
250 |
"<div class='{css_corps}'>"+
|
961 |
jpm |
251 |
" <h2>{i18n_titre_publication}</h2>"+
|
|
|
252 |
" {tableau_publications_liees}"+
|
687 |
jp_milcent |
253 |
"</div>";
|
|
|
254 |
}
|
|
|
255 |
|
883 |
jpm |
256 |
private void initialiserTableauPublicationsLieesTpl() {
|
|
|
257 |
tableauPublicationsLieesTpl =
|
|
|
258 |
"<table>"+
|
|
|
259 |
" <thead>"+
|
|
|
260 |
" <tr>" +
|
|
|
261 |
" <th>{i18n_auteur}</th>" +
|
|
|
262 |
" <th>{i18n_titre}</th>" +
|
961 |
jpm |
263 |
" <th>{i18n_revue}</th>" +
|
|
|
264 |
" <th>{i18n_editeur}</th>" +
|
|
|
265 |
" <th>{i18n_annee}</th>" +
|
|
|
266 |
" <th>{i18n_nvt}</th>" +
|
|
|
267 |
" <th>{i18n_fascicule}</th>" +
|
|
|
268 |
" <th>{i18n_page}</th>" +
|
1800 |
aurelien |
269 |
" <th>{i18n_source}</th>" +
|
883 |
jpm |
270 |
" </tr>"+
|
|
|
271 |
" </thead>"+
|
|
|
272 |
" <tbody>"+
|
|
|
273 |
" {lignes}"+
|
|
|
274 |
" </tbody>"+
|
|
|
275 |
"</table>";
|
|
|
276 |
}
|
|
|
277 |
|
|
|
278 |
private void initialiserLignePublicationLieeTpl() {
|
|
|
279 |
lignePublicationLieeTpl =
|
|
|
280 |
"<tr>"+
|
|
|
281 |
" <td>{auteur}</td>"+
|
|
|
282 |
" <td>{titre}</td>"+
|
961 |
jpm |
283 |
" <td>{revue}</td>"+
|
|
|
284 |
" <td>{editeur}</td>"+
|
|
|
285 |
" <td>{annee}</td>"+
|
|
|
286 |
" <td>{nvt}</td>"+
|
|
|
287 |
" <td>{fascicule}</td>"+
|
|
|
288 |
" <td>{page}</td>"+
|
1800 |
aurelien |
289 |
" <td>{source}</td>"+
|
883 |
jpm |
290 |
"</tr>";
|
|
|
291 |
}
|
|
|
292 |
|
630 |
jp_milcent |
293 |
private void initialiserDescriptionTpl() {
|
|
|
294 |
descriptionTpl =
|
|
|
295 |
"<div class='{css_corps}'>"+
|
966 |
jpm |
296 |
" <div>"+
|
630 |
jp_milcent |
297 |
" <h2>{i18n_titre_description}</h2>"+
|
875 |
jpm |
298 |
" <span class='{css_label}'>{i18n_type_botanique} :</span> {type_botanique}<br />"+
|
|
|
299 |
" <span class='{css_label}'>{i18n_nbre_echantillon} :</span> {nbre_echantillon}<br />"+
|
961 |
jpm |
300 |
" <span class='{css_label}'>{i18n_etat_unite_rangement} :</span> {etat_unite_rangement}<br />"+
|
1898 |
aurelien |
301 |
" {tableau_unite_rangement}<br />"+
|
1918 |
aurelien |
302 |
" <span class='{css_label}'>{i18n_nb_planches_herbier} :</span> {nb_planches_herbier}<br />"+
|
|
|
303 |
" <span class='{css_label}'>{i18n_nb_especes} :</span> {nb_especes}<br />"+
|
961 |
jpm |
304 |
" </div>"+
|
|
|
305 |
" <div>"+
|
|
|
306 |
" <h2>{i18n_titre_conservation}</h2>"+
|
|
|
307 |
" <span class='{css_label}'>{i18n_type_papier} :</span> {type_papier}<br />"+
|
|
|
308 |
" <span class='{css_label}'>{i18n_conservation_methode} :</span> {conservation_methode}<br />"+
|
|
|
309 |
" </div>"+
|
|
|
310 |
" <div>"+
|
|
|
311 |
" <h2>{i18n_titre_etiquette}</h2>"+
|
|
|
312 |
" <span class='{css_label}'>{i18n_specimen_fixation_pourcent} :</span> {specimen_fixation_pourcent}<br />"+
|
|
|
313 |
" <span class='{css_label}'>{i18n_etiquette_fixation_pourcent} :</span> {etiquette_fixation_pourcent}<br />"+
|
|
|
314 |
" <span class='{css_label}'>{i18n_specimen_fixation_methode} :</span> {specimen_fixation_methode}<br />"+
|
|
|
315 |
" <span class='{css_label}'>{i18n_etiquette_fixation_methode_support} :</span> {etiquette_fixation_methode_support}<br />"+
|
|
|
316 |
" <span class='{css_label}'>{i18n_etiquette_fixation_methode_specimen} :</span> {etiquette_fixation_methode_specimen}<br />"+
|
|
|
317 |
" <span class='{css_label}'>{i18n_etiquette_type_ecriture} :</span> {etiquette_type_ecriture}<br />"+
|
|
|
318 |
" </div>"+
|
|
|
319 |
" <div>"+
|
|
|
320 |
" <h2>{i18n_titre_traitement}</h2>"+
|
|
|
321 |
" <span class='{css_label}'>{i18n_traitement} :</span> {traitement}<br />"+
|
|
|
322 |
" <span class='{css_label}'>{i18n_traitement_poison} :</span> {traitement_poison}<br />"+
|
|
|
323 |
" <span class='{css_label}'>{i18n_traitement_insecte} :</span> {traitement_insecte}<br />"+
|
|
|
324 |
" </div>"+
|
966 |
jpm |
325 |
" <div>"+
|
|
|
326 |
" <h2>{i18n_titre_etat_degradation}</h2>"+
|
|
|
327 |
" <span class='{css_label}'>{i18n_etat_general} :</span> {etat_general}<br />"+
|
|
|
328 |
" <span class='{css_label}'>{i18n_degradation_specimen} :</span> {degradation_specimen}<br />"+
|
|
|
329 |
" <span class='{css_label}'>{i18n_degradation_presentation} :</span> {degradation_presentation}<br />"+
|
|
|
330 |
" <span class='{css_label}'>{i18n_determination} :</span> {determination}<br />"+
|
|
|
331 |
" </div>"+
|
630 |
jp_milcent |
332 |
"</div>";
|
|
|
333 |
}
|
|
|
334 |
|
961 |
jpm |
335 |
private void initialiserTableauUniteRangementTpl() {
|
|
|
336 |
tableauUniteRangementTpl =
|
|
|
337 |
"<table>"+
|
|
|
338 |
" <thead>"+
|
|
|
339 |
" <tr>" +
|
|
|
340 |
" <th>{i18n_type}</th>" +
|
|
|
341 |
" <th>{i18n_nombre}</th>" +
|
|
|
342 |
" <th>{i18n_precision}</th>" +
|
|
|
343 |
" <th>{i18n_format}</th>" +
|
|
|
344 |
" </tr>"+
|
|
|
345 |
" </thead>"+
|
|
|
346 |
" <tbody>"+
|
|
|
347 |
" {lignes}"+
|
|
|
348 |
" </tbody>"+
|
|
|
349 |
"</table>";
|
|
|
350 |
}
|
|
|
351 |
|
|
|
352 |
private void initialiserLigneUniteRangementTpl() {
|
|
|
353 |
ligneUniteRangementTpl =
|
|
|
354 |
"<tr>"+
|
|
|
355 |
" <td>{type}</td>"+
|
|
|
356 |
" <td>{nombre}</td>"+
|
|
|
357 |
" <td>{precision}</td>"+
|
|
|
358 |
" <td>{format}</td>"+
|
|
|
359 |
"</tr>";
|
|
|
360 |
}
|
|
|
361 |
|
|
|
362 |
private void initialiserTableauUniteBaseTpl() {
|
|
|
363 |
tableauUniteBaseTpl =
|
|
|
364 |
"<table>"+
|
|
|
365 |
" <thead>"+
|
|
|
366 |
" <tr>" +
|
|
|
367 |
" <th colspan='4'>{i18n_unite_base}</th>" +
|
|
|
368 |
" <th colspan='2'>{i18n_part}</th>" +
|
|
|
369 |
" <th colspan='2'>{i18n_sp}</th>" +
|
|
|
370 |
" </tr>"+
|
|
|
371 |
" <tr>" +
|
|
|
372 |
" <th>{i18n_type}</th>" +
|
|
|
373 |
" <th>{i18n_nombre}</th>" +
|
|
|
374 |
" <th>{i18n_precision}</th>" +
|
|
|
375 |
" <th>{i18n_format}</th>" +
|
|
|
376 |
" <th>{i18n_nombre}</th>" +
|
|
|
377 |
" <th>{i18n_precision}</th>" +
|
|
|
378 |
" <th>{i18n_nombre}</th>" +
|
|
|
379 |
" <th>{i18n_precision}</th>" +
|
|
|
380 |
" </tr>"+
|
|
|
381 |
" </thead>"+
|
|
|
382 |
" <tbody>"+
|
|
|
383 |
" {lignes}"+
|
|
|
384 |
" </tbody>"+
|
|
|
385 |
"</table>";
|
|
|
386 |
}
|
|
|
387 |
|
|
|
388 |
private void initialiserLigneUniteBaseTpl() {
|
|
|
389 |
ligneUniteBaseTpl =
|
|
|
390 |
"<tr>"+
|
|
|
391 |
" <td>{type}</td>"+
|
|
|
392 |
" <td>{nombre}</td>"+
|
|
|
393 |
" <td>{precision}</td>"+
|
|
|
394 |
" <td>{format}</td>"+
|
|
|
395 |
" <td>{part_nombre}</td>"+
|
|
|
396 |
" <td>{part_precision}</td>"+
|
|
|
397 |
" <td>{sp_nombre}</td>"+
|
|
|
398 |
" <td>{sp_precision}</td>"+
|
|
|
399 |
"</tr>";
|
|
|
400 |
}
|
|
|
401 |
|
630 |
jp_milcent |
402 |
private void initialiserContenuTpl() {
|
|
|
403 |
contenuTpl =
|
|
|
404 |
"<div class='{css_corps}'>"+
|
|
|
405 |
" <div class='{css_fieldset}'>"+
|
966 |
jpm |
406 |
" <h2>{i18n_titre_nature}</h2>"+
|
|
|
407 |
" <span class='{css_label}'>{i18n_nature} :</span> {nature}<br />"+
|
|
|
408 |
" <span class='{css_label}'>{i18n_specialite} :</span> {specialite}<br />"+
|
630 |
jp_milcent |
409 |
" </div>"+
|
966 |
jpm |
410 |
" <div class='{css_fieldset}'>"+
|
|
|
411 |
" <h2>{i18n_titre_constitution}</h2>"+
|
|
|
412 |
" <span class='{css_label}'>{i18n_periode} :</span> {periode}<br />"+
|
|
|
413 |
" <span class='{css_label}'>{i18n_date_debut} :</span> {date_debut}<br />"+
|
|
|
414 |
" <span class='{css_label}'>{i18n_date_fin} :</span> {date_fin}<br />"+
|
|
|
415 |
" </div>"+
|
630 |
jp_milcent |
416 |
" <hr class='{css_clear}'/>"+
|
966 |
jpm |
417 |
" <div class='{css_fieldset}'>"+
|
|
|
418 |
" <h2>{i18n_titre_classement}</h2>"+
|
|
|
419 |
" <span class='{css_label}'>{i18n_classement_etat} :</span> {classement_etat}<br />"+
|
|
|
420 |
" <span class='{css_label}'>{i18n_classement} :</span> {classement}<br />"+
|
|
|
421 |
" </div>"+
|
|
|
422 |
" <div class='{css_fieldset}'>"+
|
|
|
423 |
" <h2>{i18n_titre_etiquette}</h2>"+
|
|
|
424 |
" <span class='{css_label}'>{i18n_etiquette_renseignement} :</span> {etiquette_renseignement}<br />"+
|
|
|
425 |
" <span class='{css_label}'>{i18n_precision_localite} :</span> {precision_localite}<br />"+
|
|
|
426 |
" <span class='{css_label}'>{i18n_precision_date} :</span> {precision_date}<br />"+
|
|
|
427 |
" <span class='{css_label}'>{i18n_etiquette_annotation} :</span> {etiquette_annotation}<br />"+
|
|
|
428 |
" </div>"+
|
|
|
429 |
" <hr class='{css_clear}'/>"+
|
|
|
430 |
" <div class='{css_fieldset}'>"+
|
|
|
431 |
" <h2>{i18n_titre_integree}</h2>"+
|
|
|
432 |
" <span class='{css_label}'>{i18n_collection_integration} :</span> {collection_integration}<br />"+
|
|
|
433 |
" <span class='{css_label}'>{i18n_collection_integration_info} :</span> {collection_integration_info}<br />"+
|
|
|
434 |
" </div>"+
|
630 |
jp_milcent |
435 |
"</div>";
|
|
|
436 |
}
|
|
|
437 |
|
|
|
438 |
private void initialiserInventaireTpl() {
|
|
|
439 |
inventaireTpl =
|
|
|
440 |
"<div class='{css_corps}'>"+
|
|
|
441 |
" <div class='{css_fieldset}'>"+
|
|
|
442 |
" <h2>{i18n_titre_inventaire}</h2>"+
|
966 |
jpm |
443 |
" <span class='{css_label}'>{i18n_existence} :</span> {existence}<br />"+
|
|
|
444 |
" <span class='{css_label}'>{i18n_participation_auteur} :</span> {participation_auteur}<br />"+
|
|
|
445 |
" <span class='{css_label}'>{i18n_forme} :</span> {forme}<br />"+
|
|
|
446 |
" <span class='{css_label}'>{i18n_info} :</span> {info}<br />"+
|
|
|
447 |
" <span class='{css_label}'>{i18n_digital} :</span> {digital}<br />"+
|
|
|
448 |
" <span class='{css_label}'>{i18n_digital_pourcent} :</span> {digital_pourcent}<br />"+
|
|
|
449 |
" <span class='{css_label}'>{i18n_etat} :</span> {etat}<br />"+
|
630 |
jp_milcent |
450 |
" </div>"+
|
|
|
451 |
" <hr class='{css_clear}'/>"+
|
|
|
452 |
"</div>";
|
|
|
453 |
}
|
|
|
454 |
|
997 |
jpm |
455 |
private void initialiserCommentaireTpl() {
|
|
|
456 |
commentaireTpl =
|
|
|
457 |
"<div class='{css_corps}'>"+
|
|
|
458 |
" <h2>{i18n_titre_commentaire}</h2>"+
|
|
|
459 |
" {tableau_commentaires_liees}"+
|
|
|
460 |
"</div>";
|
|
|
461 |
}
|
|
|
462 |
|
|
|
463 |
private void initialiserTableauCommentairesLieesTpl() {
|
|
|
464 |
tableauCommentairesLieesTpl =
|
|
|
465 |
"<table>"+
|
|
|
466 |
" <thead>"+
|
|
|
467 |
" <tr>" +
|
|
|
468 |
" <th>{i18n_type}</th>" +
|
|
|
469 |
" <th>{i18n_titre}</th>" +
|
|
|
470 |
" <th>{i18n_ponderation}</th>" +
|
|
|
471 |
" <th>{i18n_public}</th>" +
|
|
|
472 |
" </tr>"+
|
|
|
473 |
" </thead>"+
|
|
|
474 |
" <tbody>"+
|
|
|
475 |
" {lignes}"+
|
|
|
476 |
" </tbody>"+
|
|
|
477 |
"</table>";
|
|
|
478 |
}
|
|
|
479 |
|
|
|
480 |
private void initialiserLigneCommentaireLieeTpl() {
|
|
|
481 |
ligneCommentaireLieeTpl =
|
|
|
482 |
"<tr>"+
|
|
|
483 |
" <td>{type}</td>"+
|
|
|
484 |
" <td>{titre}</td>"+
|
|
|
485 |
" <td>{ponderation}</td>"+
|
|
|
486 |
" <td>{public}</td>"+
|
|
|
487 |
"</tr>"+
|
|
|
488 |
"<tr>"+
|
|
|
489 |
" <td colspan='4'>{texte}</td>"+
|
|
|
490 |
"</tr>";
|
|
|
491 |
}
|
|
|
492 |
|
453 |
jp_milcent |
493 |
private void chargerOntologie() {
|
961 |
jpm |
494 |
String[] listesCodes = {"typeCollectionBota", "typeCollectionNcd", "typeDepot", "groupementPrincipe",
|
|
|
495 |
"realisationBut", "onpi", "ea", "typeClassement", "relationPersonneCollection", "ion",
|
969 |
jpm |
496 |
"typeUniteRangement", "etat", "typeUniteBase", "typePapier", "methodeRangement", "methodeFixation",
|
|
|
497 |
"methodeFixationSurSpecimen", "typeEcriture", "poisonTraitement", "insecteTraitement", "specimenDegradation",
|
|
|
498 |
"niveauImportance", "supportDegradation", "niveauDetermination", "natureVegetale", "siecleNaturaliste",
|
975 |
jpm |
499 |
"dateDebut", "dateFin", "etat", "onep", "onp", "inventaireForme", "inventaireLogiciel", "inventaireEtat",
|
997 |
jpm |
500 |
"etatClassement", "typeCommentaireCollection"};
|
1322 |
gduche |
501 |
lancerChargementListesValeurs(listesCodes, sequenceur);
|
1373 |
cyprien |
502 |
sequenceur.enfilerRafraichissement(this, new Information("ontologie_chargee"));
|
453 |
jp_milcent |
503 |
}
|
|
|
504 |
|
811 |
jpm |
505 |
public void rafraichir(Object nouvellesDonnees) {
|
|
|
506 |
if (nouvellesDonnees instanceof Collection) {
|
|
|
507 |
collection = (Collection) nouvellesDonnees;
|
813 |
jpm |
508 |
collectionChargementOk = true;
|
811 |
jpm |
509 |
} else if (nouvellesDonnees instanceof ValeurListe) {
|
813 |
jpm |
510 |
ValeurListe listeValeursReceptionnee = (ValeurListe) nouvellesDonnees;
|
816 |
jpm |
511 |
receptionerListeValeurs(listeValeursReceptionnee);
|
883 |
jpm |
512 |
} else if (nouvellesDonnees instanceof Information) {
|
|
|
513 |
Information info = (Information) nouvellesDonnees;
|
|
|
514 |
if (info.getType().equals("liste_collection_a_personne")) {
|
|
|
515 |
lierCollectionAPersonne((CollectionAPersonneListe) info.getDonnee(0));
|
|
|
516 |
} else if (info.getType().equals("liste_collection_a_publication")) {
|
|
|
517 |
lierCollectionAPublication((CollectionAPublicationListe) info.getDonnee(0));
|
997 |
jpm |
518 |
} else if (info.getType().equals("liste_collection_a_commentaire")) {
|
|
|
519 |
lierCollectionACommentaire((CollectionACommentaireListe) info.getDonnee(0));
|
1322 |
gduche |
520 |
} else if (info.getType().equals("ontologie_chargee")) {
|
|
|
521 |
ontologieChargementOk = true;
|
883 |
jpm |
522 |
}
|
453 |
jp_milcent |
523 |
} else {
|
950 |
jpm |
524 |
Debug.log(Mediateur.i18nM.erreurRafraichir(nouvellesDonnees.getClass(), this.getClass()));
|
453 |
jp_milcent |
525 |
}
|
813 |
jpm |
526 |
|
|
|
527 |
if (avoirDonneesChargees()) {
|
|
|
528 |
afficherDetail();
|
|
|
529 |
}
|
453 |
jp_milcent |
530 |
}
|
|
|
531 |
|
883 |
jpm |
532 |
protected void lierCollectionAPersonne(CollectionAPersonneListe personnes) {
|
|
|
533 |
collection.setPersonnesLiees(personnes);
|
|
|
534 |
personnesLieesChargementOk = true;
|
|
|
535 |
}
|
|
|
536 |
|
|
|
537 |
protected void lierCollectionAPublication(CollectionAPublicationListe publications) {
|
|
|
538 |
collection.setPublicationsLiees(publications);
|
|
|
539 |
publicationsLieesChargementOk = true;
|
|
|
540 |
}
|
|
|
541 |
|
997 |
jpm |
542 |
protected void lierCollectionACommentaire(CollectionACommentaireListe commentaires) {
|
|
|
543 |
collection.setCommentairesLiees(commentaires);
|
|
|
544 |
commentairesLieesChargementOk = true;
|
|
|
545 |
}
|
|
|
546 |
|
813 |
jpm |
547 |
private boolean avoirDonneesChargees() {
|
|
|
548 |
boolean ok = false;
|
1764 |
aurelien |
549 |
if (collectionChargementOk && ontologieChargementOk && personnesLieesChargementOk && publicationsLieesChargementOk && commentairesLieesChargementOk) {
|
813 |
jpm |
550 |
ok = true;
|
|
|
551 |
}
|
|
|
552 |
return ok;
|
|
|
553 |
}
|
|
|
554 |
|
453 |
jp_milcent |
555 |
private void afficherDetail() {
|
|
|
556 |
if (collection != null) {
|
|
|
557 |
afficherEntete();
|
|
|
558 |
afficherIdentification();
|
883 |
jpm |
559 |
afficherPersonne();
|
687 |
jp_milcent |
560 |
afficherPublication();
|
630 |
jp_milcent |
561 |
afficherDescription();
|
|
|
562 |
afficherContenu();
|
|
|
563 |
afficherInventaire();
|
997 |
jpm |
564 |
afficherCommentaire();
|
453 |
jp_milcent |
565 |
}
|
|
|
566 |
layout();
|
|
|
567 |
}
|
|
|
568 |
|
|
|
569 |
private void afficherEntete() {
|
|
|
570 |
Params enteteParams = new Params();
|
|
|
571 |
enteteParams.set("css_id", ComposantId.ZONE_DETAIL_ENTETE);
|
|
|
572 |
enteteParams.set("css_meta", ComposantClass.META);
|
|
|
573 |
|
813 |
jpm |
574 |
enteteParams.set("i18n_id", i18nC.id());
|
|
|
575 |
|
453 |
jp_milcent |
576 |
enteteParams.set("nom", collection.getNom());
|
468 |
jp_milcent |
577 |
enteteParams.set("structure", collection.getStructureNom());
|
453 |
jp_milcent |
578 |
enteteParams.set("id", collection.getId());
|
|
|
579 |
enteteParams.set("guid", collection.getGuid());
|
|
|
580 |
|
|
|
581 |
String eHtml = Format.substitute(enteteTpl, enteteParams);
|
|
|
582 |
entete.getElement().setInnerHTML(eHtml);
|
|
|
583 |
}
|
|
|
584 |
|
|
|
585 |
private void afficherIdentification() {
|
|
|
586 |
Params generalParams = new Params();
|
|
|
587 |
generalParams.set("i18n_titre_identification", i18nC.titreAdministratif());
|
961 |
jpm |
588 |
generalParams.set("i18n_nom_alternatif", i18nC.intituleAlternatifCollection());
|
477 |
jp_milcent |
589 |
generalParams.set("i18n_mere", i18nC.collectionMere());
|
687 |
jp_milcent |
590 |
generalParams.set("i18n_type_ncd", i18nC.typeCollectionNcd());
|
|
|
591 |
generalParams.set("i18n_type_depot", i18nC.typeDepot());
|
961 |
jpm |
592 |
generalParams.set("i18n_code", i18nC.codeAlternatifCollection());
|
|
|
593 |
generalParams.set("i18n_cote", i18nC.cote());
|
|
|
594 |
|
630 |
jp_milcent |
595 |
generalParams.set("i18n_general_collection_titre", i18nC.collectionGeneralTitre());
|
477 |
jp_milcent |
596 |
generalParams.set("i18n_description", i18nC.description());
|
|
|
597 |
generalParams.set("i18n_historique", i18nC.historique());
|
|
|
598 |
generalParams.set("i18n_web", i18nC.siteWeb());
|
961 |
jpm |
599 |
|
|
|
600 |
generalParams.set("i18n_couverture_collection_titre", i18nC.collectionCouvertureTitre());
|
|
|
601 |
generalParams.set("i18n_couverture_geo", i18nC.couvertureGeo());
|
477 |
jp_milcent |
602 |
|
961 |
jpm |
603 |
generalParams.set("i18n_specimen_type_titre", i18nC.collectionSpecimenTypeTitre());
|
|
|
604 |
generalParams.set("i18n_specimen_type_presence", i18nC.specimenTypeCollectionDetail());
|
|
|
605 |
generalParams.set("i18n_specimen_type_nombre", i18nC.nbreSpecimenTypeCollectionDetail());
|
|
|
606 |
generalParams.set("i18n_specimen_type_classement", i18nC.classementSpecimenTypeCollectionDetail());
|
|
|
607 |
|
630 |
jp_milcent |
608 |
String nomAlternatif = construireTxtTruck(collection.getNomAlternatif());
|
|
|
609 |
String typeNcd = construireTxtListeOntologie(collection.getTypeNcd());
|
|
|
610 |
String typeDepot = construireTxtListeOntologie(collection.getTypeDepot());
|
961 |
jpm |
611 |
String code = construireTxtTruck(collection.getCode());
|
|
|
612 |
|
1369 |
cyprien |
613 |
String urls = construireTxtTruck(collection.getUrls(), false);
|
961 |
jpm |
614 |
|
|
|
615 |
String couvertureGeo = construireTxtTruck(collection.getCouvertureLieu());
|
|
|
616 |
String specimenTypePresence = construireTxtListeOntologie(collection.getSpecimenType());
|
|
|
617 |
String specimenTypeNombrePrecision = construireTxtListeOntologie(collection.getSpecimenTypeNbrePrecision());
|
|
|
618 |
String specimenTypeNombre = "";
|
975 |
jpm |
619 |
if (!collection.getSpecimenTypeNbre().equals("0") && !collection.getSpecimenTypeNbre().equals("")) {
|
961 |
jpm |
620 |
specimenTypeNombre = collection.getSpecimenTypeNbre()+" ("+specimenTypeNombrePrecision+")";
|
|
|
621 |
}
|
|
|
622 |
String specimenTypeClassement = construireTxtListeOntologie(collection.getSpecimenTypeClassement());
|
630 |
jp_milcent |
623 |
|
|
|
624 |
generalParams.set("nom_alternatif", nomAlternatif);
|
|
|
625 |
generalParams.set("mere", collection.getCollectionMereNom());
|
687 |
jp_milcent |
626 |
generalParams.set("type_ncd", typeNcd);
|
|
|
627 |
generalParams.set("type_depot", typeDepot);
|
961 |
jpm |
628 |
generalParams.set("code", code);
|
|
|
629 |
generalParams.set("cote", collection.getCote());
|
|
|
630 |
|
477 |
jp_milcent |
631 |
generalParams.set("description", collection.getDescription());
|
630 |
jp_milcent |
632 |
generalParams.set("historique", collection.getHistorique());
|
|
|
633 |
generalParams.set("web", urls);
|
961 |
jpm |
634 |
|
|
|
635 |
generalParams.set("couverture_geo", couvertureGeo);
|
453 |
jp_milcent |
636 |
|
961 |
jpm |
637 |
generalParams.set("specimen_type_presence", specimenTypePresence);
|
|
|
638 |
generalParams.set("specimen_type_nombre", specimenTypeNombre);
|
|
|
639 |
generalParams.set("specimen_type_classement", specimenTypeClassement);
|
|
|
640 |
|
453 |
jp_milcent |
641 |
afficherOnglet(generalTpl, generalParams, generalOnglet);
|
|
|
642 |
}
|
|
|
643 |
|
883 |
jpm |
644 |
private void afficherPersonne() {
|
|
|
645 |
String tableauPersonneHtml = "";
|
914 |
jpm |
646 |
if (collection.getPersonnesLiees() != null && collection.getPersonnesLiees().size() > 0) {
|
883 |
jpm |
647 |
tableauPersonneHtml = construireTableauPersonnesLiees();
|
|
|
648 |
}
|
630 |
jp_milcent |
649 |
|
883 |
jpm |
650 |
Params personneParams = new Params();
|
|
|
651 |
personneParams.set("i18n_titre_personne", i18nC.collectionPersonneTitre());
|
|
|
652 |
personneParams.set("tableau_personnes_liees", tableauPersonneHtml);
|
|
|
653 |
|
|
|
654 |
afficherOnglet(personneTpl, personneParams, personneOnglet);
|
630 |
jp_milcent |
655 |
}
|
|
|
656 |
|
883 |
jpm |
657 |
private String construireTableauPersonnesLiees() {
|
|
|
658 |
Params contenuParams = new Params();
|
961 |
jpm |
659 |
contenuParams.set("i18n_relation", i18nC.typeRelationPersonneCollection());
|
|
|
660 |
contenuParams.set("i18n_nom_complet", i18nC.personneNomComplet());
|
883 |
jpm |
661 |
contenuParams.set("i18n_prenom", i18nC.personnePrenom());
|
|
|
662 |
contenuParams.set("i18n_nom", i18nC.personneNom());
|
961 |
jpm |
663 |
contenuParams.set("i18n_naissance_date", i18nC.personneDateNaissance());
|
|
|
664 |
contenuParams.set("i18n_naissance_lieu", i18nC.personneLieuNaissance());
|
|
|
665 |
contenuParams.set("i18n_etre_decede", i18nC.personneDeces());
|
|
|
666 |
contenuParams.set("i18n_deces_date", i18nC.personneDateDeces());
|
|
|
667 |
contenuParams.set("i18n_deces_lieu", i18nC.personneLieuDeces());
|
883 |
jpm |
668 |
|
|
|
669 |
String lignesPersonnel = "";
|
968 |
jpm |
670 |
if (collection.getPersonnesLiees() != null) {
|
|
|
671 |
Iterator<String> it = collection.getPersonnesLiees().keySet().iterator();
|
|
|
672 |
while (it.hasNext()) {
|
|
|
673 |
CollectionAPersonne relationCollectionAPersonne = collection.getPersonnesLiees().get(it.next());
|
|
|
674 |
Personne personne = relationCollectionAPersonne.getPersonne();
|
|
|
675 |
|
|
|
676 |
String relation = construireTxtListeOntologie(relationCollectionAPersonne.getIdRole());
|
|
|
677 |
String etreDecede = construireTxtListeOntologie(personne.getDeces());
|
|
|
678 |
|
|
|
679 |
Params ligneParams = new Params();
|
|
|
680 |
ligneParams.set("relation", relation);
|
|
|
681 |
ligneParams.set("nom_complet", personne.getNomComplet());
|
|
|
682 |
ligneParams.set("nom", personne.getNom());
|
|
|
683 |
ligneParams.set("prenom", personne.getPrenom());
|
|
|
684 |
ligneParams.set("naissance_date", personne.getNaissanceDate());
|
|
|
685 |
ligneParams.set("naissance_lieu", personne.getNaissanceLieu());
|
|
|
686 |
ligneParams.set("etre_decede", etreDecede);
|
|
|
687 |
ligneParams.set("deces_date", personne.getDecesDate());
|
|
|
688 |
ligneParams.set("deces_lieu", personne.getDecesLieu());
|
|
|
689 |
|
|
|
690 |
lignesPersonnel += Format.substitute(lignePersonneLieeTpl, ligneParams);
|
|
|
691 |
}
|
|
|
692 |
}
|
883 |
jpm |
693 |
|
968 |
jpm |
694 |
String cHtml = i18nC.nonRenseigne();
|
|
|
695 |
if (!UtilString.isEmpty(lignesPersonnel)) {
|
|
|
696 |
contenuParams.set("lignes", lignesPersonnel);
|
|
|
697 |
cHtml = Format.substitute(tableauPersonnesLieesTpl, contenuParams);
|
883 |
jpm |
698 |
}
|
|
|
699 |
return cHtml;
|
|
|
700 |
}
|
|
|
701 |
|
687 |
jp_milcent |
702 |
private void afficherPublication() {
|
|
|
703 |
Params publicationParams = new Params();
|
|
|
704 |
publicationParams.set("i18n_titre_publication", i18nC.collectionPublicationTitre());
|
|
|
705 |
|
883 |
jpm |
706 |
String tableauPublicationHtml = "";
|
914 |
jpm |
707 |
if (collection.getPersonnesLiees() != null && collection.getPersonnesLiees().size() > 0) {
|
883 |
jpm |
708 |
tableauPublicationHtml = construireTableauPublicationsLiees();
|
|
|
709 |
}
|
|
|
710 |
publicationParams.set("tableau_publications_liees", tableauPublicationHtml);
|
|
|
711 |
|
687 |
jp_milcent |
712 |
afficherOnglet(publicationTpl, publicationParams, publicationOnglet);
|
|
|
713 |
}
|
|
|
714 |
|
883 |
jpm |
715 |
private String construireTableauPublicationsLiees() {
|
|
|
716 |
Params contenuParams = new Params();
|
|
|
717 |
contenuParams.set("i18n_auteur", i18nC.publicationAuteurs());
|
|
|
718 |
contenuParams.set("i18n_titre", i18nC.publicationTitre());
|
961 |
jpm |
719 |
contenuParams.set("i18n_revue", i18nC.publicationRevueCollection());
|
|
|
720 |
contenuParams.set("i18n_editeur", i18nC.publicationEditeur());
|
|
|
721 |
contenuParams.set("i18n_annee", i18nC.publicationDateParution());
|
|
|
722 |
contenuParams.set("i18n_nvt", i18nC.publicationNvt());
|
|
|
723 |
contenuParams.set("i18n_fascicule", i18nC.publicationFascicule());
|
|
|
724 |
contenuParams.set("i18n_page", i18nC.publicationPage());
|
1800 |
aurelien |
725 |
contenuParams.set("i18n_source", i18nC.collectionPublicationSource());
|
883 |
jpm |
726 |
|
|
|
727 |
String lignesPublication = "";
|
968 |
jpm |
728 |
if (collection.getPublicationsLiees() != null) {
|
|
|
729 |
Iterator<String> it = collection.getPublicationsLiees().keySet().iterator();
|
|
|
730 |
while (it.hasNext()) {
|
|
|
731 |
CollectionAPublication relationCollectionAPublication = collection.getPublicationsLiees().get(it.next());
|
|
|
732 |
Publication publication = relationCollectionAPublication.getPublication();
|
|
|
733 |
Params ligneParams = new Params();
|
|
|
734 |
ligneParams.set("auteur", publication.getAuteur());
|
|
|
735 |
ligneParams.set("titre", publication.getTitre());
|
|
|
736 |
ligneParams.set("revue", publication.getCollection());
|
1896 |
aurelien |
737 |
ligneParams.set("editeur", publication.getNomEditeur());
|
968 |
jpm |
738 |
ligneParams.set("annee", publication.getAnneeParution());
|
|
|
739 |
ligneParams.set("nvt", publication.getIndicationNvt());
|
|
|
740 |
ligneParams.set("fascicule", publication.getFascicule());
|
|
|
741 |
ligneParams.set("page", publication.getPages());
|
1800 |
aurelien |
742 |
ligneParams.set("source", relationCollectionAPublication.getSource() == "1" ? i18nC.oui() : i18nC.non());
|
968 |
jpm |
743 |
lignesPublication += Format.substitute(lignePublicationLieeTpl, ligneParams);
|
|
|
744 |
}
|
883 |
jpm |
745 |
}
|
968 |
jpm |
746 |
|
|
|
747 |
String cHtml = i18nC.nonRenseigne();
|
|
|
748 |
if (!UtilString.isEmpty(lignesPublication)) {
|
|
|
749 |
contenuParams.set("lignes", lignesPublication);
|
|
|
750 |
cHtml = Format.substitute(tableauPublicationsLieesTpl, contenuParams);
|
|
|
751 |
}
|
883 |
jpm |
752 |
return cHtml;
|
|
|
753 |
}
|
|
|
754 |
|
630 |
jp_milcent |
755 |
private void afficherDescription() {
|
|
|
756 |
Params descriptionParams = new Params();
|
1898 |
aurelien |
757 |
descriptionParams.set("i18n_titre_description", i18nC.collectionEtatGeneralEtNombreEchantillons());
|
875 |
jpm |
758 |
descriptionParams.set("i18n_type_botanique", i18nC.typeCollectionBotanique());
|
|
|
759 |
descriptionParams.set("i18n_nbre_echantillon", i18nC.nbreEchantillon());
|
630 |
jp_milcent |
760 |
|
961 |
jpm |
761 |
descriptionParams.set("i18n_titre_unite_rangement", i18nC.collectionUniteRangementTitre());
|
966 |
jpm |
762 |
descriptionParams.set("i18n_etat_unite_rangement", i18nC.collectionUniteRangementEtatGeneralDetail());
|
961 |
jpm |
763 |
descriptionParams.set("i18n_titre_unite_base", i18nC.collectionUniteBaseTitre());
|
|
|
764 |
|
|
|
765 |
descriptionParams.set("i18n_titre_conservation", i18nC.collectionTitreConservation());
|
|
|
766 |
descriptionParams.set("i18n_type_papier", i18nC.typePapierConservationDetail());
|
|
|
767 |
descriptionParams.set("i18n_conservation_methode", i18nC.methodeConservationDetail());
|
|
|
768 |
|
|
|
769 |
descriptionParams.set("i18n_titre_etiquette", i18nC.collectionTitreEtiquette());
|
|
|
770 |
descriptionParams.set("i18n_specimen_fixation_pourcent", i18nC.specimenFixationPourcent());
|
|
|
771 |
descriptionParams.set("i18n_etiquette_fixation_pourcent", i18nC.etiquetteFixationPourcent());
|
|
|
772 |
descriptionParams.set("i18n_specimen_fixation_methode", i18nC.specimenMethodeFixationDetail());
|
|
|
773 |
descriptionParams.set("i18n_etiquette_fixation_methode_support", i18nC.etiquetteMethodeFixationSurSupportDetail());
|
|
|
774 |
descriptionParams.set("i18n_etiquette_fixation_methode_specimen", i18nC.etiquetteMethodeFixationSurSpecimenDetail());
|
|
|
775 |
descriptionParams.set("i18n_etiquette_type_ecriture", i18nC.typeEcritureDetail());
|
|
|
776 |
|
|
|
777 |
descriptionParams.set("i18n_titre_traitement", i18nC.collectionTitreTraitement());
|
|
|
778 |
descriptionParams.set("i18n_traitement", i18nC.collectionTraitementDetail());
|
|
|
779 |
descriptionParams.set("i18n_traitement_poison", i18nC.collectionTraitementPoisonDetail());
|
|
|
780 |
descriptionParams.set("i18n_traitement_insecte", i18nC.collectionTraitementInsecteDetail());
|
|
|
781 |
|
966 |
jpm |
782 |
descriptionParams.set("i18n_titre_etat_degradation", i18nC.collectionTitreEtatEtDegradation());
|
|
|
783 |
descriptionParams.set("i18n_etat_general", i18nC.collectionEtatGeneralDetail());
|
|
|
784 |
descriptionParams.set("i18n_degradation_specimen", i18nC.degradationSpecimenDetail());
|
|
|
785 |
descriptionParams.set("i18n_degradation_presentation", i18nC.degradationPresentationDetail());
|
|
|
786 |
descriptionParams.set("i18n_determination", i18nC.collectionDeterminationDetail());
|
|
|
787 |
|
875 |
jpm |
788 |
String typeBota = construireTxtListeOntologie(collection.getBotanique().getType());
|
|
|
789 |
descriptionParams.set("type_botanique", typeBota);
|
|
|
790 |
descriptionParams.set("nbre_echantillon", collection.getBotanique().getNbreEchantillon());
|
|
|
791 |
|
961 |
jpm |
792 |
CollectionBotanique collectionBotanique = collection.getBotanique();
|
|
|
793 |
String etatUniteRangement = construireTxtListeOntologie(collectionBotanique.getUniteRangementEtat());
|
|
|
794 |
String tableauUniteRangementHtml = construireTableauUniteRangement();
|
1918 |
aurelien |
795 |
|
961 |
jpm |
796 |
descriptionParams.set("tableau_unite_rangement", tableauUniteRangementHtml);
|
|
|
797 |
descriptionParams.set("etat_unite_rangement", etatUniteRangement);
|
|
|
798 |
|
1918 |
aurelien |
799 |
descriptionParams.set("i18n_nb_planches_herbier", i18nC.collectionNbPlanchesHerbier());
|
|
|
800 |
descriptionParams.set("i18n_nb_especes", i18nC.collectionNbEspeces());
|
|
|
801 |
|
|
|
802 |
descriptionParams.set("nb_planches_herbier", collectionBotanique.getNbPlanchesHerbiers());
|
|
|
803 |
descriptionParams.set("nb_especes", collectionBotanique.getNbEspeces());
|
|
|
804 |
|
961 |
jpm |
805 |
String typePapier = construireTxtListeOntologie(collectionBotanique.getConservationPapierType());
|
|
|
806 |
String conservationMethode = construireTxtListeOntologie(collectionBotanique.getConservationMethode());
|
|
|
807 |
descriptionParams.set("type_papier", typePapier);
|
|
|
808 |
descriptionParams.set("conservation_methode", conservationMethode);
|
|
|
809 |
|
|
|
810 |
String specimenFixationMethode = construireTxtListeOntologie(collectionBotanique.getSpecimenFixationMethode());
|
|
|
811 |
String etiquetteFixationMethodeSupport = construireTxtListeOntologie(collectionBotanique.getEtiquetteFixationSupport());
|
|
|
812 |
String etiquetteFixationMethodeSpecimen = construireTxtListeOntologie(collectionBotanique.getEtiquetteFixationSpecimen());
|
|
|
813 |
String etiquetteTypeEcriture = construireTxtListeOntologie(collectionBotanique.getEtiquetteEcriture());
|
|
|
814 |
descriptionParams.set("specimen_fixation_pourcent", collectionBotanique.getSpecimenFixationPourcent());
|
|
|
815 |
descriptionParams.set("etiquette_fixation_pourcent", collectionBotanique.getEtiquetteFixationPourcent());
|
|
|
816 |
descriptionParams.set("specimen_fixation_methode", specimenFixationMethode);
|
|
|
817 |
descriptionParams.set("etiquette_fixation_methode_support", etiquetteFixationMethodeSupport);
|
|
|
818 |
descriptionParams.set("etiquette_fixation_methode_specimen", etiquetteFixationMethodeSpecimen);
|
|
|
819 |
descriptionParams.set("etiquette_type_ecriture", etiquetteTypeEcriture);
|
|
|
820 |
|
|
|
821 |
String traitement = construireTxtListeOntologie(collectionBotanique.getTraitement());
|
|
|
822 |
String traitementPoison = construireTxtListeOntologie(collectionBotanique.getTraitementPoison());
|
|
|
823 |
String traitementInsecte = construireTxtListeOntologie(collectionBotanique.getTraitementInsecte());
|
|
|
824 |
descriptionParams.set("traitement", traitement);
|
|
|
825 |
descriptionParams.set("traitement_poison", traitementPoison);
|
|
|
826 |
descriptionParams.set("traitement_insecte", traitementInsecte);
|
|
|
827 |
|
966 |
jpm |
828 |
String etatGeneral = construireTxtListeOntologie(collectionBotanique.getEtatGeneral());
|
|
|
829 |
boolean valeurEstOntologie = false;
|
|
|
830 |
boolean typeEstOntologie = true;
|
|
|
831 |
boolean donneeEstOntologie = true;
|
|
|
832 |
String degradationSpecimen = construireTxtListeOntologie(collectionBotanique.getDegradationSpecimen(), valeurEstOntologie, typeEstOntologie, donneeEstOntologie);
|
|
|
833 |
String degradationPresentation = construireTxtListeOntologie(collectionBotanique.getDegradationPresentation(), valeurEstOntologie, typeEstOntologie, donneeEstOntologie);
|
|
|
834 |
String determination = construireTxtListeOntologie(collectionBotanique.getDetermination());
|
|
|
835 |
descriptionParams.set("etat_general", etatGeneral);
|
|
|
836 |
descriptionParams.set("degradation_specimen", degradationSpecimen);
|
|
|
837 |
descriptionParams.set("degradation_presentation", degradationPresentation);
|
|
|
838 |
descriptionParams.set("determination", determination);
|
|
|
839 |
|
630 |
jp_milcent |
840 |
afficherOnglet(descriptionTpl, descriptionParams, descriptionOnglet);
|
|
|
841 |
}
|
|
|
842 |
|
961 |
jpm |
843 |
private String construireTableauUniteRangement() {
|
|
|
844 |
Params contenuParams = new Params();
|
|
|
845 |
contenuParams.set("i18n_type", i18nC.collectionUniteType());
|
|
|
846 |
contenuParams.set("i18n_nombre", i18nC.collectionUniteNbre());
|
|
|
847 |
contenuParams.set("i18n_precision", i18nC.collectionUnitePrecision());
|
|
|
848 |
contenuParams.set("i18n_format", i18nC.collectionUniteFormat());
|
|
|
849 |
|
|
|
850 |
CollectionBotanique collectionBotanique = collection.getBotanique();
|
|
|
851 |
HashMap<String,UniteRangement> unites = CollectionFormDescription.parserValeurUniteRangement(collectionBotanique.getUniteRangement());
|
|
|
852 |
|
|
|
853 |
String lignesUnite = "";
|
|
|
854 |
Iterator<String> it = unites.keySet().iterator();
|
|
|
855 |
while (it.hasNext()) {
|
|
|
856 |
String cle = it.next();
|
|
|
857 |
UniteRangement unite = unites.get(cle);
|
|
|
858 |
if (unite.getNombre() != 0) {
|
|
|
859 |
Params ligneParams = new Params();
|
|
|
860 |
if (unite.getTypeAutre()) {
|
|
|
861 |
ligneParams.set("type", unite.getType());
|
|
|
862 |
} else {
|
|
|
863 |
ligneParams.set("type", construireTxtListeOntologie(unite.getId()));
|
|
|
864 |
}
|
|
|
865 |
ligneParams.set("nombre", UtilNombre.formaterEnEntier(unite.getNombre()));
|
|
|
866 |
ligneParams.set("precision", unite.getPrecision());
|
|
|
867 |
ligneParams.set("format", unite.getFormat());
|
|
|
868 |
|
|
|
869 |
lignesUnite += Format.substitute(ligneUniteRangementTpl, ligneParams);
|
|
|
870 |
}
|
|
|
871 |
}
|
|
|
872 |
|
|
|
873 |
String cHtml = i18nC.nonRenseigne();
|
|
|
874 |
if (!UtilString.isEmpty(lignesUnite)) {
|
|
|
875 |
contenuParams.set("lignes", lignesUnite);
|
|
|
876 |
cHtml = Format.substitute(tableauUniteRangementTpl, contenuParams);
|
|
|
877 |
}
|
|
|
878 |
return cHtml;
|
|
|
879 |
}
|
|
|
880 |
|
630 |
jp_milcent |
881 |
private void afficherContenu() {
|
|
|
882 |
Params contenuParams = new Params();
|
966 |
jpm |
883 |
contenuParams.set("i18n_titre_nature", i18nC.collectionNatureTitre());
|
|
|
884 |
contenuParams.set("i18n_nature", i18nC.natureVegetaleContenuDetail());
|
|
|
885 |
contenuParams.set("i18n_specialite", i18nC.specialiteCollectionDetail());
|
630 |
jp_milcent |
886 |
|
966 |
jpm |
887 |
contenuParams.set("i18n_titre_constitution", i18nC.collectionConstitutionTitre());
|
|
|
888 |
contenuParams.set("i18n_periode", i18nC.periodeConstitutionDetail());
|
|
|
889 |
contenuParams.set("i18n_date_debut", i18nC.dateDebutCollectionDetail());
|
|
|
890 |
contenuParams.set("i18n_date_fin", i18nC.dateFinCollectionDetail());
|
|
|
891 |
|
|
|
892 |
contenuParams.set("i18n_titre_classement", i18nC.collectionClassementTitre());
|
|
|
893 |
contenuParams.set("i18n_classement_etat", i18nC.etatClassementCollectionDetail());
|
|
|
894 |
contenuParams.set("i18n_classement", i18nC.annotationClassementCollectionDetail());
|
|
|
895 |
|
|
|
896 |
contenuParams.set("i18n_titre_etiquette", i18nC.collectionEtiquetteTitre());
|
|
|
897 |
contenuParams.set("i18n_etiquette_renseignement", i18nC.etiquetteRenseignementDetail());
|
|
|
898 |
contenuParams.set("i18n_precision_localite", i18nC.precisionLocaliteDetail());
|
|
|
899 |
contenuParams.set("i18n_precision_date", i18nC.precisionDateDetail());
|
|
|
900 |
contenuParams.set("i18n_etiquette_annotation", i18nC.etiquetteAnnotationDetail());
|
|
|
901 |
|
|
|
902 |
contenuParams.set("i18n_titre_integree", i18nC.collectionIntegreeTitre());
|
|
|
903 |
contenuParams.set("i18n_collection_integration", i18nC.integreCollectionDetail());
|
|
|
904 |
contenuParams.set("i18n_collection_integration_info", i18nC.infoIntegreCollectionDetail());
|
|
|
905 |
|
|
|
906 |
CollectionBotanique collectionBotanique = collection.getBotanique();
|
|
|
907 |
String nature = construireTxtListeOntologie(collectionBotanique.getNature());
|
|
|
908 |
contenuParams.set("nature", nature);
|
|
|
909 |
contenuParams.set("specialite", collectionBotanique.getSpecialite());
|
|
|
910 |
|
|
|
911 |
String periode = construireTxtListeOntologie(collection.getPeriodeConstitution());
|
|
|
912 |
String dateDebut = collectionBotanique.getRecolteDateDebut();
|
|
|
913 |
String dateDebutPrecision = construireTxtListeOntologie(collectionBotanique.getRecolteDateDebutType());
|
|
|
914 |
String dateDebutRecolte = (UtilString.isEmpty(dateDebut)) ? "" : dateDebut+" ("+dateDebutPrecision+")";
|
|
|
915 |
String dateFin = collectionBotanique.getRecolteDateFin();
|
|
|
916 |
String dateFinPrecision = construireTxtListeOntologie(collectionBotanique.getRecolteDateFinType());
|
|
|
917 |
String dateFinRecolte = (UtilString.isEmpty(dateFin)) ? "" : dateFin+" ("+dateFinPrecision+")";
|
|
|
918 |
contenuParams.set("periode", periode);
|
|
|
919 |
contenuParams.set("date_debut", dateDebutRecolte);
|
|
|
920 |
contenuParams.set("date_fin", dateFinRecolte);
|
|
|
921 |
|
|
|
922 |
String classementEtat = construireTxtListeOntologie(collectionBotanique.getClassementEtat());
|
|
|
923 |
contenuParams.set("classement_etat", classementEtat);
|
|
|
924 |
contenuParams.set("classement", collectionBotanique.getClassementAnnotation());
|
|
|
925 |
|
|
|
926 |
String etiquetteRenseignements = "";
|
|
|
927 |
HashMap<String,String> infos = CollectionFormContenu.parserEtiquetteRenseignement(collectionBotanique.getEtiquetteRenseignement());
|
|
|
928 |
if (infos != null) {
|
|
|
929 |
Iterator<String> it = infos.keySet().iterator();
|
|
|
930 |
while (it.hasNext()) {
|
|
|
931 |
String cle = it.next();
|
|
|
932 |
if (cle.equals("AT")) {
|
|
|
933 |
etiquetteRenseignements += i18nC.etiquetteAuteurCollection();
|
|
|
934 |
} else if (cle.equals("F")) {
|
|
|
935 |
etiquetteRenseignements += i18nC.etiquetteFamille();
|
|
|
936 |
} else if (cle.equals("G")) {
|
|
|
937 |
etiquetteRenseignements += i18nC.etiquetteGenre();
|
|
|
938 |
} else if (cle.equals("SP")) {
|
|
|
939 |
etiquetteRenseignements += i18nC.etiquetteSp();
|
|
|
940 |
} else if (cle.equals("ASP")) {
|
|
|
941 |
etiquetteRenseignements += i18nC.etiquetteAuteurSp();
|
|
|
942 |
} else if (cle.equals("L")) {
|
|
|
943 |
etiquetteRenseignements += i18nC.etiquetteLocalite();
|
|
|
944 |
} else if (cle.equals("D")) {
|
|
|
945 |
etiquetteRenseignements += i18nC.etiquetteDateRecolte();
|
|
|
946 |
} else {
|
|
|
947 |
etiquetteRenseignements += i18nC.inconnue();
|
|
|
948 |
}
|
1329 |
cyprien |
949 |
if (it.hasNext()) etiquetteRenseignements += ": "+infos.get(cle)+"%, ";
|
|
|
950 |
else etiquetteRenseignements += ": "+infos.get(cle)+"%.";
|
966 |
jpm |
951 |
}
|
|
|
952 |
}
|
|
|
953 |
String precisionLocalite = construireTxtListeOntologie(collectionBotanique.getPrecisionLocalite());
|
|
|
954 |
String precisionDate = construireTxtListeOntologie(collectionBotanique.getPrecisionDate());
|
|
|
955 |
contenuParams.set("etiquette_renseignement", etiquetteRenseignements);
|
|
|
956 |
contenuParams.set("precision_localite", precisionLocalite);
|
|
|
957 |
contenuParams.set("precision_date", precisionDate);
|
|
|
958 |
contenuParams.set("etiquette_annotation", collectionBotanique.getAnnotationsDiverses());
|
|
|
959 |
|
|
|
960 |
String collectionIntegration = construireTxtListeOntologie(collectionBotanique.getCollectionIntegre());
|
|
|
961 |
String collectionIntegrationInfo = construireTxtListeOntologie(collectionBotanique.getCollectionIntegreInfo());
|
|
|
962 |
contenuParams.set("collection_integration", collectionIntegration);
|
|
|
963 |
contenuParams.set("collection_integration_info", collectionIntegrationInfo);
|
|
|
964 |
|
630 |
jp_milcent |
965 |
afficherOnglet(contenuTpl, contenuParams, contenuOnglet);
|
|
|
966 |
}
|
|
|
967 |
|
|
|
968 |
private void afficherInventaire() {
|
|
|
969 |
Params inventaireParams = new Params();
|
|
|
970 |
inventaireParams.set("i18n_titre_inventaire", i18nC.collectionInventaireTitre());
|
966 |
jpm |
971 |
inventaireParams.set("i18n_existence", i18nC.existenceInventaireCollectionDetail());
|
|
|
972 |
inventaireParams.set("i18n_participation_auteur", i18nC.auteurInventaireCollectionDetail());
|
|
|
973 |
inventaireParams.set("i18n_forme", i18nC.formeInventaireCollectionDetail());
|
|
|
974 |
inventaireParams.set("i18n_info", i18nC.infoInventaireCollectionDetail());
|
|
|
975 |
inventaireParams.set("i18n_digital", i18nC.digitalInventaireCollectionDetail());
|
|
|
976 |
inventaireParams.set("i18n_digital_pourcent", i18nC.pourcentDigitalInventaireCollectionDetail());
|
|
|
977 |
inventaireParams.set("i18n_etat", i18nC.etatInventaireCollectionDetail());
|
1210 |
cyprien |
978 |
//DELETEME inventaireParams.set("i18n_type_donnee", i18nC.typeDonneeInventaireCollectionDetail());
|
630 |
jp_milcent |
979 |
|
966 |
jpm |
980 |
CollectionBotanique collectionBotanique = collection.getBotanique();
|
1918 |
aurelien |
981 |
String existence = OntologiesLocales.getValeurOntologie(OntologiesLocales.getListeOuiNonPeutEtre(), collectionBotanique.getInventaire());
|
|
|
982 |
String participationAuteur = OntologiesLocales.getValeurOntologie(OntologiesLocales.getListeOuiNonPeutEtre(), collectionBotanique.getInventaireAuteur());
|
966 |
jpm |
983 |
String forme = construireTxtListeOntologie(collectionBotanique.getInventaireForme());
|
|
|
984 |
String digital = construireTxtListeOntologie(collectionBotanique.getInventaireDigital());
|
|
|
985 |
String digitalPourcent = collectionBotanique.getInventaireDigitalPourcent()+"%";
|
|
|
986 |
String etat = construireTxtListeOntologie(collectionBotanique.getInventaireEtat());
|
|
|
987 |
inventaireParams.set("existence", existence);
|
|
|
988 |
inventaireParams.set("participation_auteur", participationAuteur);
|
|
|
989 |
inventaireParams.set("forme", forme);
|
|
|
990 |
inventaireParams.set("info", collectionBotanique.getInventaireInfo());
|
|
|
991 |
inventaireParams.set("digital", digital);
|
|
|
992 |
inventaireParams.set("digital_pourcent", digitalPourcent);
|
|
|
993 |
inventaireParams.set("etat", etat);
|
|
|
994 |
|
630 |
jp_milcent |
995 |
afficherOnglet(inventaireTpl, inventaireParams, inventaireOnglet);
|
|
|
996 |
}
|
|
|
997 |
|
997 |
jpm |
998 |
private void afficherCommentaire() {
|
|
|
999 |
String tableauCommentaireHtml = "";
|
|
|
1000 |
if (collection.getCommentairesLiees() != null && collection.getCommentairesLiees().size() > 0) {
|
|
|
1001 |
tableauCommentaireHtml = construireTableauCommentairesLiees();
|
|
|
1002 |
}
|
|
|
1003 |
|
|
|
1004 |
Params personneParams = new Params();
|
|
|
1005 |
personneParams.set("i18n_titre_commentaire", i18nC.collectionCommentaireTitre());
|
|
|
1006 |
personneParams.set("tableau_commentaires_liees", tableauCommentaireHtml);
|
|
|
1007 |
|
|
|
1008 |
afficherOnglet(commentaireTpl, personneParams, commentaireOnglet);
|
|
|
1009 |
}
|
|
|
1010 |
|
|
|
1011 |
private String construireTableauCommentairesLiees() {
|
|
|
1012 |
Params contenuParams = new Params();
|
|
|
1013 |
contenuParams.set("i18n_type", i18nC.commentaireType());
|
|
|
1014 |
contenuParams.set("i18n_titre", i18nC.commentaireTitre());
|
|
|
1015 |
contenuParams.set("i18n_texte", i18nC.commentaireTexte());
|
|
|
1016 |
contenuParams.set("i18n_ponderation", i18nC.commentairePonderation());
|
|
|
1017 |
contenuParams.set("i18n_public", i18nC.commentairePublic());
|
|
|
1018 |
|
|
|
1019 |
String lignesCommentaire = "";
|
|
|
1020 |
if (collection.getCommentairesLiees() != null) {
|
|
|
1021 |
Iterator<String> it = collection.getCommentairesLiees().keySet().iterator();
|
|
|
1022 |
while (it.hasNext()) {
|
|
|
1023 |
CollectionACommentaire relationCollectionACommentaire = collection.getCommentairesLiees().get(it.next());
|
|
|
1024 |
Commentaire commentaire = relationCollectionACommentaire.getCommentaire();
|
|
|
1025 |
|
|
|
1026 |
String type = construireTxtListeOntologie(relationCollectionACommentaire.getType());
|
|
|
1027 |
String acces = (commentaire.etrePublic() ? i18nC.donneePublic() : i18nC.donneePrivee());
|
|
|
1028 |
|
|
|
1029 |
Params ligneParams = new Params();
|
|
|
1030 |
ligneParams.set("type", type);
|
|
|
1031 |
ligneParams.set("titre", commentaire.getTitre());
|
|
|
1032 |
ligneParams.set("texte", commentaire.getTexte());
|
|
|
1033 |
ligneParams.set("ponderation", commentaire.getPonderation()+"/100");
|
|
|
1034 |
ligneParams.set("public", acces);
|
|
|
1035 |
|
|
|
1036 |
lignesCommentaire += Format.substitute(ligneCommentaireLieeTpl, ligneParams);
|
|
|
1037 |
}
|
|
|
1038 |
}
|
|
|
1039 |
|
|
|
1040 |
String cHtml = i18nC.nonRenseigne();
|
|
|
1041 |
if (!UtilString.isEmpty(lignesCommentaire)) {
|
|
|
1042 |
contenuParams.set("lignes", lignesCommentaire);
|
|
|
1043 |
cHtml = Format.substitute(tableauCommentairesLieesTpl, contenuParams);
|
|
|
1044 |
}
|
|
|
1045 |
return cHtml;
|
|
|
1046 |
}
|
|
|
1047 |
|
468 |
jp_milcent |
1048 |
protected String getNomStructure() {
|
|
|
1049 |
String nomStructure = "";
|
|
|
1050 |
if (structure != null) {
|
|
|
1051 |
nomStructure = structure.getNom();
|
|
|
1052 |
} else {
|
|
|
1053 |
nomStructure = collection.getIdStructure();
|
453 |
jp_milcent |
1054 |
}
|
468 |
jp_milcent |
1055 |
return nomStructure;
|
453 |
jp_milcent |
1056 |
}
|
|
|
1057 |
}
|