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;
|
453 |
jp_milcent |
11 |
import org.tela_botanica.client.modeles.ValeurListe;
|
935 |
jpm |
12 |
import org.tela_botanica.client.modeles.collection.Collection;
|
997 |
jpm |
13 |
import org.tela_botanica.client.modeles.collection.CollectionACommentaire;
|
|
|
14 |
import org.tela_botanica.client.modeles.collection.CollectionACommentaireListe;
|
935 |
jpm |
15 |
import org.tela_botanica.client.modeles.collection.CollectionAPersonne;
|
|
|
16 |
import org.tela_botanica.client.modeles.collection.CollectionAPersonneListe;
|
|
|
17 |
import org.tela_botanica.client.modeles.collection.CollectionAPublication;
|
|
|
18 |
import org.tela_botanica.client.modeles.collection.CollectionAPublicationListe;
|
961 |
jpm |
19 |
import org.tela_botanica.client.modeles.collection.CollectionBotanique;
|
|
|
20 |
import org.tela_botanica.client.modeles.collection.UniteBase;
|
|
|
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 />"+
|
|
|
302 |
" {tableau_unite_base}<br />"+
|
961 |
jpm |
303 |
" </div>"+
|
|
|
304 |
" <div>"+
|
|
|
305 |
" <h2>{i18n_titre_conservation}</h2>"+
|
|
|
306 |
" <span class='{css_label}'>{i18n_type_papier} :</span> {type_papier}<br />"+
|
|
|
307 |
" <span class='{css_label}'>{i18n_conservation_methode} :</span> {conservation_methode}<br />"+
|
|
|
308 |
" </div>"+
|
|
|
309 |
" <div>"+
|
|
|
310 |
" <h2>{i18n_titre_etiquette}</h2>"+
|
|
|
311 |
" <span class='{css_label}'>{i18n_specimen_fixation_pourcent} :</span> {specimen_fixation_pourcent}<br />"+
|
|
|
312 |
" <span class='{css_label}'>{i18n_etiquette_fixation_pourcent} :</span> {etiquette_fixation_pourcent}<br />"+
|
|
|
313 |
" <span class='{css_label}'>{i18n_specimen_fixation_methode} :</span> {specimen_fixation_methode}<br />"+
|
|
|
314 |
" <span class='{css_label}'>{i18n_etiquette_fixation_methode_support} :</span> {etiquette_fixation_methode_support}<br />"+
|
|
|
315 |
" <span class='{css_label}'>{i18n_etiquette_fixation_methode_specimen} :</span> {etiquette_fixation_methode_specimen}<br />"+
|
|
|
316 |
" <span class='{css_label}'>{i18n_etiquette_type_ecriture} :</span> {etiquette_type_ecriture}<br />"+
|
|
|
317 |
" </div>"+
|
|
|
318 |
" <div>"+
|
|
|
319 |
" <h2>{i18n_titre_traitement}</h2>"+
|
|
|
320 |
" <span class='{css_label}'>{i18n_traitement} :</span> {traitement}<br />"+
|
|
|
321 |
" <span class='{css_label}'>{i18n_traitement_poison} :</span> {traitement_poison}<br />"+
|
|
|
322 |
" <span class='{css_label}'>{i18n_traitement_insecte} :</span> {traitement_insecte}<br />"+
|
|
|
323 |
" </div>"+
|
966 |
jpm |
324 |
" <div>"+
|
|
|
325 |
" <h2>{i18n_titre_etat_degradation}</h2>"+
|
|
|
326 |
" <span class='{css_label}'>{i18n_etat_general} :</span> {etat_general}<br />"+
|
|
|
327 |
" <span class='{css_label}'>{i18n_degradation_specimen} :</span> {degradation_specimen}<br />"+
|
|
|
328 |
" <span class='{css_label}'>{i18n_degradation_presentation} :</span> {degradation_presentation}<br />"+
|
|
|
329 |
" <span class='{css_label}'>{i18n_determination} :</span> {determination}<br />"+
|
|
|
330 |
" </div>"+
|
630 |
jp_milcent |
331 |
"</div>";
|
|
|
332 |
}
|
|
|
333 |
|
961 |
jpm |
334 |
private void initialiserTableauUniteRangementTpl() {
|
|
|
335 |
tableauUniteRangementTpl =
|
|
|
336 |
"<table>"+
|
|
|
337 |
" <thead>"+
|
|
|
338 |
" <tr>" +
|
|
|
339 |
" <th>{i18n_type}</th>" +
|
|
|
340 |
" <th>{i18n_nombre}</th>" +
|
|
|
341 |
" <th>{i18n_precision}</th>" +
|
|
|
342 |
" <th>{i18n_format}</th>" +
|
|
|
343 |
" </tr>"+
|
|
|
344 |
" </thead>"+
|
|
|
345 |
" <tbody>"+
|
|
|
346 |
" {lignes}"+
|
|
|
347 |
" </tbody>"+
|
|
|
348 |
"</table>";
|
|
|
349 |
}
|
|
|
350 |
|
|
|
351 |
private void initialiserLigneUniteRangementTpl() {
|
|
|
352 |
ligneUniteRangementTpl =
|
|
|
353 |
"<tr>"+
|
|
|
354 |
" <td>{type}</td>"+
|
|
|
355 |
" <td>{nombre}</td>"+
|
|
|
356 |
" <td>{precision}</td>"+
|
|
|
357 |
" <td>{format}</td>"+
|
|
|
358 |
"</tr>";
|
|
|
359 |
}
|
|
|
360 |
|
|
|
361 |
private void initialiserTableauUniteBaseTpl() {
|
|
|
362 |
tableauUniteBaseTpl =
|
|
|
363 |
"<table>"+
|
|
|
364 |
" <thead>"+
|
|
|
365 |
" <tr>" +
|
|
|
366 |
" <th colspan='4'>{i18n_unite_base}</th>" +
|
|
|
367 |
" <th colspan='2'>{i18n_part}</th>" +
|
|
|
368 |
" <th colspan='2'>{i18n_sp}</th>" +
|
|
|
369 |
" </tr>"+
|
|
|
370 |
" <tr>" +
|
|
|
371 |
" <th>{i18n_type}</th>" +
|
|
|
372 |
" <th>{i18n_nombre}</th>" +
|
|
|
373 |
" <th>{i18n_precision}</th>" +
|
|
|
374 |
" <th>{i18n_format}</th>" +
|
|
|
375 |
" <th>{i18n_nombre}</th>" +
|
|
|
376 |
" <th>{i18n_precision}</th>" +
|
|
|
377 |
" <th>{i18n_nombre}</th>" +
|
|
|
378 |
" <th>{i18n_precision}</th>" +
|
|
|
379 |
" </tr>"+
|
|
|
380 |
" </thead>"+
|
|
|
381 |
" <tbody>"+
|
|
|
382 |
" {lignes}"+
|
|
|
383 |
" </tbody>"+
|
|
|
384 |
"</table>";
|
|
|
385 |
}
|
|
|
386 |
|
|
|
387 |
private void initialiserLigneUniteBaseTpl() {
|
|
|
388 |
ligneUniteBaseTpl =
|
|
|
389 |
"<tr>"+
|
|
|
390 |
" <td>{type}</td>"+
|
|
|
391 |
" <td>{nombre}</td>"+
|
|
|
392 |
" <td>{precision}</td>"+
|
|
|
393 |
" <td>{format}</td>"+
|
|
|
394 |
" <td>{part_nombre}</td>"+
|
|
|
395 |
" <td>{part_precision}</td>"+
|
|
|
396 |
" <td>{sp_nombre}</td>"+
|
|
|
397 |
" <td>{sp_precision}</td>"+
|
|
|
398 |
"</tr>";
|
|
|
399 |
}
|
|
|
400 |
|
630 |
jp_milcent |
401 |
private void initialiserContenuTpl() {
|
|
|
402 |
contenuTpl =
|
|
|
403 |
"<div class='{css_corps}'>"+
|
|
|
404 |
" <div class='{css_fieldset}'>"+
|
966 |
jpm |
405 |
" <h2>{i18n_titre_nature}</h2>"+
|
|
|
406 |
" <span class='{css_label}'>{i18n_nature} :</span> {nature}<br />"+
|
|
|
407 |
" <span class='{css_label}'>{i18n_specialite} :</span> {specialite}<br />"+
|
630 |
jp_milcent |
408 |
" </div>"+
|
966 |
jpm |
409 |
" <div class='{css_fieldset}'>"+
|
|
|
410 |
" <h2>{i18n_titre_constitution}</h2>"+
|
|
|
411 |
" <span class='{css_label}'>{i18n_periode} :</span> {periode}<br />"+
|
|
|
412 |
" <span class='{css_label}'>{i18n_date_debut} :</span> {date_debut}<br />"+
|
|
|
413 |
" <span class='{css_label}'>{i18n_date_fin} :</span> {date_fin}<br />"+
|
|
|
414 |
" </div>"+
|
630 |
jp_milcent |
415 |
" <hr class='{css_clear}'/>"+
|
966 |
jpm |
416 |
" <div class='{css_fieldset}'>"+
|
|
|
417 |
" <h2>{i18n_titre_classement}</h2>"+
|
|
|
418 |
" <span class='{css_label}'>{i18n_classement_etat} :</span> {classement_etat}<br />"+
|
|
|
419 |
" <span class='{css_label}'>{i18n_classement} :</span> {classement}<br />"+
|
|
|
420 |
" </div>"+
|
|
|
421 |
" <div class='{css_fieldset}'>"+
|
|
|
422 |
" <h2>{i18n_titre_etiquette}</h2>"+
|
|
|
423 |
" <span class='{css_label}'>{i18n_etiquette_renseignement} :</span> {etiquette_renseignement}<br />"+
|
|
|
424 |
" <span class='{css_label}'>{i18n_precision_localite} :</span> {precision_localite}<br />"+
|
|
|
425 |
" <span class='{css_label}'>{i18n_precision_date} :</span> {precision_date}<br />"+
|
|
|
426 |
" <span class='{css_label}'>{i18n_etiquette_annotation} :</span> {etiquette_annotation}<br />"+
|
|
|
427 |
" </div>"+
|
|
|
428 |
" <hr class='{css_clear}'/>"+
|
|
|
429 |
" <div class='{css_fieldset}'>"+
|
|
|
430 |
" <h2>{i18n_titre_integree}</h2>"+
|
|
|
431 |
" <span class='{css_label}'>{i18n_collection_integration} :</span> {collection_integration}<br />"+
|
|
|
432 |
" <span class='{css_label}'>{i18n_collection_integration_info} :</span> {collection_integration_info}<br />"+
|
|
|
433 |
" </div>"+
|
630 |
jp_milcent |
434 |
"</div>";
|
|
|
435 |
}
|
|
|
436 |
|
|
|
437 |
private void initialiserInventaireTpl() {
|
|
|
438 |
inventaireTpl =
|
|
|
439 |
"<div class='{css_corps}'>"+
|
|
|
440 |
" <div class='{css_fieldset}'>"+
|
|
|
441 |
" <h2>{i18n_titre_inventaire}</h2>"+
|
966 |
jpm |
442 |
" <span class='{css_label}'>{i18n_existence} :</span> {existence}<br />"+
|
|
|
443 |
" <span class='{css_label}'>{i18n_participation_auteur} :</span> {participation_auteur}<br />"+
|
|
|
444 |
" <span class='{css_label}'>{i18n_forme} :</span> {forme}<br />"+
|
|
|
445 |
" <span class='{css_label}'>{i18n_info} :</span> {info}<br />"+
|
|
|
446 |
" <span class='{css_label}'>{i18n_digital} :</span> {digital}<br />"+
|
|
|
447 |
" <span class='{css_label}'>{i18n_digital_pourcent} :</span> {digital_pourcent}<br />"+
|
|
|
448 |
" <span class='{css_label}'>{i18n_etat} :</span> {etat}<br />"+
|
630 |
jp_milcent |
449 |
" </div>"+
|
|
|
450 |
" <hr class='{css_clear}'/>"+
|
|
|
451 |
"</div>";
|
|
|
452 |
}
|
|
|
453 |
|
997 |
jpm |
454 |
private void initialiserCommentaireTpl() {
|
|
|
455 |
commentaireTpl =
|
|
|
456 |
"<div class='{css_corps}'>"+
|
|
|
457 |
" <h2>{i18n_titre_commentaire}</h2>"+
|
|
|
458 |
" {tableau_commentaires_liees}"+
|
|
|
459 |
"</div>";
|
|
|
460 |
}
|
|
|
461 |
|
|
|
462 |
private void initialiserTableauCommentairesLieesTpl() {
|
|
|
463 |
tableauCommentairesLieesTpl =
|
|
|
464 |
"<table>"+
|
|
|
465 |
" <thead>"+
|
|
|
466 |
" <tr>" +
|
|
|
467 |
" <th>{i18n_type}</th>" +
|
|
|
468 |
" <th>{i18n_titre}</th>" +
|
|
|
469 |
" <th>{i18n_ponderation}</th>" +
|
|
|
470 |
" <th>{i18n_public}</th>" +
|
|
|
471 |
" </tr>"+
|
|
|
472 |
" </thead>"+
|
|
|
473 |
" <tbody>"+
|
|
|
474 |
" {lignes}"+
|
|
|
475 |
" </tbody>"+
|
|
|
476 |
"</table>";
|
|
|
477 |
}
|
|
|
478 |
|
|
|
479 |
private void initialiserLigneCommentaireLieeTpl() {
|
|
|
480 |
ligneCommentaireLieeTpl =
|
|
|
481 |
"<tr>"+
|
|
|
482 |
" <td>{type}</td>"+
|
|
|
483 |
" <td>{titre}</td>"+
|
|
|
484 |
" <td>{ponderation}</td>"+
|
|
|
485 |
" <td>{public}</td>"+
|
|
|
486 |
"</tr>"+
|
|
|
487 |
"<tr>"+
|
|
|
488 |
" <td colspan='4'>{texte}</td>"+
|
|
|
489 |
"</tr>";
|
|
|
490 |
}
|
|
|
491 |
|
453 |
jp_milcent |
492 |
private void chargerOntologie() {
|
961 |
jpm |
493 |
String[] listesCodes = {"typeCollectionBota", "typeCollectionNcd", "typeDepot", "groupementPrincipe",
|
|
|
494 |
"realisationBut", "onpi", "ea", "typeClassement", "relationPersonneCollection", "ion",
|
969 |
jpm |
495 |
"typeUniteRangement", "etat", "typeUniteBase", "typePapier", "methodeRangement", "methodeFixation",
|
|
|
496 |
"methodeFixationSurSpecimen", "typeEcriture", "poisonTraitement", "insecteTraitement", "specimenDegradation",
|
|
|
497 |
"niveauImportance", "supportDegradation", "niveauDetermination", "natureVegetale", "siecleNaturaliste",
|
975 |
jpm |
498 |
"dateDebut", "dateFin", "etat", "onep", "onp", "inventaireForme", "inventaireLogiciel", "inventaireEtat",
|
997 |
jpm |
499 |
"etatClassement", "typeCommentaireCollection"};
|
1322 |
gduche |
500 |
lancerChargementListesValeurs(listesCodes, sequenceur);
|
1373 |
cyprien |
501 |
sequenceur.enfilerRafraichissement(this, new Information("ontologie_chargee"));
|
453 |
jp_milcent |
502 |
}
|
|
|
503 |
|
811 |
jpm |
504 |
public void rafraichir(Object nouvellesDonnees) {
|
|
|
505 |
if (nouvellesDonnees instanceof Collection) {
|
|
|
506 |
collection = (Collection) nouvellesDonnees;
|
813 |
jpm |
507 |
collectionChargementOk = true;
|
811 |
jpm |
508 |
} else if (nouvellesDonnees instanceof ValeurListe) {
|
813 |
jpm |
509 |
ValeurListe listeValeursReceptionnee = (ValeurListe) nouvellesDonnees;
|
816 |
jpm |
510 |
receptionerListeValeurs(listeValeursReceptionnee);
|
883 |
jpm |
511 |
} else if (nouvellesDonnees instanceof Information) {
|
|
|
512 |
Information info = (Information) nouvellesDonnees;
|
|
|
513 |
if (info.getType().equals("liste_collection_a_personne")) {
|
|
|
514 |
lierCollectionAPersonne((CollectionAPersonneListe) info.getDonnee(0));
|
|
|
515 |
} else if (info.getType().equals("liste_collection_a_publication")) {
|
|
|
516 |
lierCollectionAPublication((CollectionAPublicationListe) info.getDonnee(0));
|
997 |
jpm |
517 |
} else if (info.getType().equals("liste_collection_a_commentaire")) {
|
|
|
518 |
lierCollectionACommentaire((CollectionACommentaireListe) info.getDonnee(0));
|
1322 |
gduche |
519 |
} else if (info.getType().equals("ontologie_chargee")) {
|
|
|
520 |
ontologieChargementOk = true;
|
883 |
jpm |
521 |
}
|
453 |
jp_milcent |
522 |
} else {
|
950 |
jpm |
523 |
Debug.log(Mediateur.i18nM.erreurRafraichir(nouvellesDonnees.getClass(), this.getClass()));
|
453 |
jp_milcent |
524 |
}
|
813 |
jpm |
525 |
|
|
|
526 |
if (avoirDonneesChargees()) {
|
|
|
527 |
afficherDetail();
|
|
|
528 |
}
|
453 |
jp_milcent |
529 |
}
|
|
|
530 |
|
883 |
jpm |
531 |
protected void lierCollectionAPersonne(CollectionAPersonneListe personnes) {
|
|
|
532 |
collection.setPersonnesLiees(personnes);
|
|
|
533 |
personnesLieesChargementOk = true;
|
|
|
534 |
}
|
|
|
535 |
|
|
|
536 |
protected void lierCollectionAPublication(CollectionAPublicationListe publications) {
|
|
|
537 |
collection.setPublicationsLiees(publications);
|
|
|
538 |
publicationsLieesChargementOk = true;
|
|
|
539 |
}
|
|
|
540 |
|
997 |
jpm |
541 |
protected void lierCollectionACommentaire(CollectionACommentaireListe commentaires) {
|
|
|
542 |
collection.setCommentairesLiees(commentaires);
|
|
|
543 |
commentairesLieesChargementOk = true;
|
|
|
544 |
}
|
|
|
545 |
|
813 |
jpm |
546 |
private boolean avoirDonneesChargees() {
|
|
|
547 |
boolean ok = false;
|
1764 |
aurelien |
548 |
if (collectionChargementOk && ontologieChargementOk && personnesLieesChargementOk && publicationsLieesChargementOk && commentairesLieesChargementOk) {
|
813 |
jpm |
549 |
ok = true;
|
|
|
550 |
}
|
|
|
551 |
return ok;
|
|
|
552 |
}
|
|
|
553 |
|
453 |
jp_milcent |
554 |
private void afficherDetail() {
|
|
|
555 |
if (collection != null) {
|
|
|
556 |
afficherEntete();
|
|
|
557 |
afficherIdentification();
|
883 |
jpm |
558 |
afficherPersonne();
|
687 |
jp_milcent |
559 |
afficherPublication();
|
630 |
jp_milcent |
560 |
afficherDescription();
|
|
|
561 |
afficherContenu();
|
|
|
562 |
afficherInventaire();
|
997 |
jpm |
563 |
afficherCommentaire();
|
453 |
jp_milcent |
564 |
}
|
|
|
565 |
layout();
|
|
|
566 |
}
|
|
|
567 |
|
|
|
568 |
private void afficherEntete() {
|
|
|
569 |
Params enteteParams = new Params();
|
|
|
570 |
enteteParams.set("css_id", ComposantId.ZONE_DETAIL_ENTETE);
|
|
|
571 |
enteteParams.set("css_meta", ComposantClass.META);
|
|
|
572 |
|
813 |
jpm |
573 |
enteteParams.set("i18n_id", i18nC.id());
|
|
|
574 |
|
453 |
jp_milcent |
575 |
enteteParams.set("nom", collection.getNom());
|
468 |
jp_milcent |
576 |
enteteParams.set("structure", collection.getStructureNom());
|
453 |
jp_milcent |
577 |
enteteParams.set("id", collection.getId());
|
|
|
578 |
enteteParams.set("guid", collection.getGuid());
|
|
|
579 |
|
|
|
580 |
String eHtml = Format.substitute(enteteTpl, enteteParams);
|
|
|
581 |
entete.getElement().setInnerHTML(eHtml);
|
|
|
582 |
}
|
|
|
583 |
|
|
|
584 |
private void afficherIdentification() {
|
|
|
585 |
Params generalParams = new Params();
|
|
|
586 |
generalParams.set("i18n_titre_identification", i18nC.titreAdministratif());
|
961 |
jpm |
587 |
generalParams.set("i18n_nom_alternatif", i18nC.intituleAlternatifCollection());
|
477 |
jp_milcent |
588 |
generalParams.set("i18n_mere", i18nC.collectionMere());
|
687 |
jp_milcent |
589 |
generalParams.set("i18n_type_ncd", i18nC.typeCollectionNcd());
|
|
|
590 |
generalParams.set("i18n_type_depot", i18nC.typeDepot());
|
961 |
jpm |
591 |
generalParams.set("i18n_code", i18nC.codeAlternatifCollection());
|
|
|
592 |
generalParams.set("i18n_cote", i18nC.cote());
|
|
|
593 |
|
630 |
jp_milcent |
594 |
generalParams.set("i18n_general_collection_titre", i18nC.collectionGeneralTitre());
|
477 |
jp_milcent |
595 |
generalParams.set("i18n_description", i18nC.description());
|
|
|
596 |
generalParams.set("i18n_historique", i18nC.historique());
|
|
|
597 |
generalParams.set("i18n_web", i18nC.siteWeb());
|
961 |
jpm |
598 |
|
|
|
599 |
generalParams.set("i18n_couverture_collection_titre", i18nC.collectionCouvertureTitre());
|
|
|
600 |
generalParams.set("i18n_couverture_geo", i18nC.couvertureGeo());
|
477 |
jp_milcent |
601 |
|
961 |
jpm |
602 |
generalParams.set("i18n_specimen_type_titre", i18nC.collectionSpecimenTypeTitre());
|
|
|
603 |
generalParams.set("i18n_specimen_type_presence", i18nC.specimenTypeCollectionDetail());
|
|
|
604 |
generalParams.set("i18n_specimen_type_nombre", i18nC.nbreSpecimenTypeCollectionDetail());
|
|
|
605 |
generalParams.set("i18n_specimen_type_classement", i18nC.classementSpecimenTypeCollectionDetail());
|
|
|
606 |
|
630 |
jp_milcent |
607 |
String nomAlternatif = construireTxtTruck(collection.getNomAlternatif());
|
|
|
608 |
String typeNcd = construireTxtListeOntologie(collection.getTypeNcd());
|
|
|
609 |
String typeDepot = construireTxtListeOntologie(collection.getTypeDepot());
|
961 |
jpm |
610 |
String code = construireTxtTruck(collection.getCode());
|
|
|
611 |
|
1369 |
cyprien |
612 |
String urls = construireTxtTruck(collection.getUrls(), false);
|
961 |
jpm |
613 |
|
|
|
614 |
String couvertureGeo = construireTxtTruck(collection.getCouvertureLieu());
|
|
|
615 |
String specimenTypePresence = construireTxtListeOntologie(collection.getSpecimenType());
|
|
|
616 |
String specimenTypeNombrePrecision = construireTxtListeOntologie(collection.getSpecimenTypeNbrePrecision());
|
|
|
617 |
String specimenTypeNombre = "";
|
975 |
jpm |
618 |
if (!collection.getSpecimenTypeNbre().equals("0") && !collection.getSpecimenTypeNbre().equals("")) {
|
961 |
jpm |
619 |
specimenTypeNombre = collection.getSpecimenTypeNbre()+" ("+specimenTypeNombrePrecision+")";
|
|
|
620 |
}
|
|
|
621 |
String specimenTypeClassement = construireTxtListeOntologie(collection.getSpecimenTypeClassement());
|
630 |
jp_milcent |
622 |
|
|
|
623 |
generalParams.set("nom_alternatif", nomAlternatif);
|
|
|
624 |
generalParams.set("mere", collection.getCollectionMereNom());
|
687 |
jp_milcent |
625 |
generalParams.set("type_ncd", typeNcd);
|
|
|
626 |
generalParams.set("type_depot", typeDepot);
|
961 |
jpm |
627 |
generalParams.set("code", code);
|
|
|
628 |
generalParams.set("cote", collection.getCote());
|
|
|
629 |
|
477 |
jp_milcent |
630 |
generalParams.set("description", collection.getDescription());
|
630 |
jp_milcent |
631 |
generalParams.set("historique", collection.getHistorique());
|
|
|
632 |
generalParams.set("web", urls);
|
961 |
jpm |
633 |
|
|
|
634 |
generalParams.set("couverture_geo", couvertureGeo);
|
453 |
jp_milcent |
635 |
|
961 |
jpm |
636 |
generalParams.set("specimen_type_presence", specimenTypePresence);
|
|
|
637 |
generalParams.set("specimen_type_nombre", specimenTypeNombre);
|
|
|
638 |
generalParams.set("specimen_type_classement", specimenTypeClassement);
|
|
|
639 |
|
453 |
jp_milcent |
640 |
afficherOnglet(generalTpl, generalParams, generalOnglet);
|
|
|
641 |
}
|
|
|
642 |
|
883 |
jpm |
643 |
private void afficherPersonne() {
|
|
|
644 |
String tableauPersonneHtml = "";
|
914 |
jpm |
645 |
if (collection.getPersonnesLiees() != null && collection.getPersonnesLiees().size() > 0) {
|
883 |
jpm |
646 |
tableauPersonneHtml = construireTableauPersonnesLiees();
|
|
|
647 |
}
|
630 |
jp_milcent |
648 |
|
883 |
jpm |
649 |
Params personneParams = new Params();
|
|
|
650 |
personneParams.set("i18n_titre_personne", i18nC.collectionPersonneTitre());
|
|
|
651 |
personneParams.set("tableau_personnes_liees", tableauPersonneHtml);
|
|
|
652 |
|
|
|
653 |
afficherOnglet(personneTpl, personneParams, personneOnglet);
|
630 |
jp_milcent |
654 |
}
|
|
|
655 |
|
883 |
jpm |
656 |
private String construireTableauPersonnesLiees() {
|
|
|
657 |
Params contenuParams = new Params();
|
961 |
jpm |
658 |
contenuParams.set("i18n_relation", i18nC.typeRelationPersonneCollection());
|
|
|
659 |
contenuParams.set("i18n_nom_complet", i18nC.personneNomComplet());
|
883 |
jpm |
660 |
contenuParams.set("i18n_prenom", i18nC.personnePrenom());
|
|
|
661 |
contenuParams.set("i18n_nom", i18nC.personneNom());
|
961 |
jpm |
662 |
contenuParams.set("i18n_naissance_date", i18nC.personneDateNaissance());
|
|
|
663 |
contenuParams.set("i18n_naissance_lieu", i18nC.personneLieuNaissance());
|
|
|
664 |
contenuParams.set("i18n_etre_decede", i18nC.personneDeces());
|
|
|
665 |
contenuParams.set("i18n_deces_date", i18nC.personneDateDeces());
|
|
|
666 |
contenuParams.set("i18n_deces_lieu", i18nC.personneLieuDeces());
|
883 |
jpm |
667 |
|
|
|
668 |
String lignesPersonnel = "";
|
968 |
jpm |
669 |
if (collection.getPersonnesLiees() != null) {
|
|
|
670 |
Iterator<String> it = collection.getPersonnesLiees().keySet().iterator();
|
|
|
671 |
while (it.hasNext()) {
|
|
|
672 |
CollectionAPersonne relationCollectionAPersonne = collection.getPersonnesLiees().get(it.next());
|
|
|
673 |
Personne personne = relationCollectionAPersonne.getPersonne();
|
|
|
674 |
|
|
|
675 |
String relation = construireTxtListeOntologie(relationCollectionAPersonne.getIdRole());
|
|
|
676 |
String etreDecede = construireTxtListeOntologie(personne.getDeces());
|
|
|
677 |
|
|
|
678 |
Params ligneParams = new Params();
|
|
|
679 |
ligneParams.set("relation", relation);
|
|
|
680 |
ligneParams.set("nom_complet", personne.getNomComplet());
|
|
|
681 |
ligneParams.set("nom", personne.getNom());
|
|
|
682 |
ligneParams.set("prenom", personne.getPrenom());
|
|
|
683 |
ligneParams.set("naissance_date", personne.getNaissanceDate());
|
|
|
684 |
ligneParams.set("naissance_lieu", personne.getNaissanceLieu());
|
|
|
685 |
ligneParams.set("etre_decede", etreDecede);
|
|
|
686 |
ligneParams.set("deces_date", personne.getDecesDate());
|
|
|
687 |
ligneParams.set("deces_lieu", personne.getDecesLieu());
|
|
|
688 |
|
|
|
689 |
lignesPersonnel += Format.substitute(lignePersonneLieeTpl, ligneParams);
|
|
|
690 |
}
|
|
|
691 |
}
|
883 |
jpm |
692 |
|
968 |
jpm |
693 |
String cHtml = i18nC.nonRenseigne();
|
|
|
694 |
if (!UtilString.isEmpty(lignesPersonnel)) {
|
|
|
695 |
contenuParams.set("lignes", lignesPersonnel);
|
|
|
696 |
cHtml = Format.substitute(tableauPersonnesLieesTpl, contenuParams);
|
883 |
jpm |
697 |
}
|
|
|
698 |
return cHtml;
|
|
|
699 |
}
|
|
|
700 |
|
687 |
jp_milcent |
701 |
private void afficherPublication() {
|
|
|
702 |
Params publicationParams = new Params();
|
|
|
703 |
publicationParams.set("i18n_titre_publication", i18nC.collectionPublicationTitre());
|
|
|
704 |
|
883 |
jpm |
705 |
String tableauPublicationHtml = "";
|
914 |
jpm |
706 |
if (collection.getPersonnesLiees() != null && collection.getPersonnesLiees().size() > 0) {
|
883 |
jpm |
707 |
tableauPublicationHtml = construireTableauPublicationsLiees();
|
|
|
708 |
}
|
|
|
709 |
publicationParams.set("tableau_publications_liees", tableauPublicationHtml);
|
|
|
710 |
|
687 |
jp_milcent |
711 |
afficherOnglet(publicationTpl, publicationParams, publicationOnglet);
|
|
|
712 |
}
|
|
|
713 |
|
883 |
jpm |
714 |
private String construireTableauPublicationsLiees() {
|
|
|
715 |
Params contenuParams = new Params();
|
|
|
716 |
contenuParams.set("i18n_auteur", i18nC.publicationAuteurs());
|
|
|
717 |
contenuParams.set("i18n_titre", i18nC.publicationTitre());
|
961 |
jpm |
718 |
contenuParams.set("i18n_revue", i18nC.publicationRevueCollection());
|
|
|
719 |
contenuParams.set("i18n_editeur", i18nC.publicationEditeur());
|
|
|
720 |
contenuParams.set("i18n_annee", i18nC.publicationDateParution());
|
|
|
721 |
contenuParams.set("i18n_nvt", i18nC.publicationNvt());
|
|
|
722 |
contenuParams.set("i18n_fascicule", i18nC.publicationFascicule());
|
|
|
723 |
contenuParams.set("i18n_page", i18nC.publicationPage());
|
1800 |
aurelien |
724 |
contenuParams.set("i18n_source", i18nC.collectionPublicationSource());
|
883 |
jpm |
725 |
|
|
|
726 |
String lignesPublication = "";
|
968 |
jpm |
727 |
if (collection.getPublicationsLiees() != null) {
|
|
|
728 |
Iterator<String> it = collection.getPublicationsLiees().keySet().iterator();
|
|
|
729 |
while (it.hasNext()) {
|
|
|
730 |
CollectionAPublication relationCollectionAPublication = collection.getPublicationsLiees().get(it.next());
|
|
|
731 |
Publication publication = relationCollectionAPublication.getPublication();
|
|
|
732 |
Params ligneParams = new Params();
|
|
|
733 |
ligneParams.set("auteur", publication.getAuteur());
|
|
|
734 |
ligneParams.set("titre", publication.getTitre());
|
|
|
735 |
ligneParams.set("revue", publication.getCollection());
|
1896 |
aurelien |
736 |
ligneParams.set("editeur", publication.getNomEditeur());
|
968 |
jpm |
737 |
ligneParams.set("annee", publication.getAnneeParution());
|
|
|
738 |
ligneParams.set("nvt", publication.getIndicationNvt());
|
|
|
739 |
ligneParams.set("fascicule", publication.getFascicule());
|
|
|
740 |
ligneParams.set("page", publication.getPages());
|
1800 |
aurelien |
741 |
ligneParams.set("source", relationCollectionAPublication.getSource() == "1" ? i18nC.oui() : i18nC.non());
|
968 |
jpm |
742 |
lignesPublication += Format.substitute(lignePublicationLieeTpl, ligneParams);
|
|
|
743 |
}
|
883 |
jpm |
744 |
}
|
968 |
jpm |
745 |
|
|
|
746 |
String cHtml = i18nC.nonRenseigne();
|
|
|
747 |
if (!UtilString.isEmpty(lignesPublication)) {
|
|
|
748 |
contenuParams.set("lignes", lignesPublication);
|
|
|
749 |
cHtml = Format.substitute(tableauPublicationsLieesTpl, contenuParams);
|
|
|
750 |
}
|
883 |
jpm |
751 |
return cHtml;
|
|
|
752 |
}
|
|
|
753 |
|
630 |
jp_milcent |
754 |
private void afficherDescription() {
|
|
|
755 |
Params descriptionParams = new Params();
|
1898 |
aurelien |
756 |
descriptionParams.set("i18n_titre_description", i18nC.collectionEtatGeneralEtNombreEchantillons());
|
875 |
jpm |
757 |
descriptionParams.set("i18n_type_botanique", i18nC.typeCollectionBotanique());
|
|
|
758 |
descriptionParams.set("i18n_nbre_echantillon", i18nC.nbreEchantillon());
|
630 |
jp_milcent |
759 |
|
961 |
jpm |
760 |
descriptionParams.set("i18n_titre_unite_rangement", i18nC.collectionUniteRangementTitre());
|
966 |
jpm |
761 |
descriptionParams.set("i18n_etat_unite_rangement", i18nC.collectionUniteRangementEtatGeneralDetail());
|
961 |
jpm |
762 |
descriptionParams.set("i18n_titre_unite_base", i18nC.collectionUniteBaseTitre());
|
|
|
763 |
|
|
|
764 |
descriptionParams.set("i18n_titre_conservation", i18nC.collectionTitreConservation());
|
|
|
765 |
descriptionParams.set("i18n_type_papier", i18nC.typePapierConservationDetail());
|
|
|
766 |
descriptionParams.set("i18n_conservation_methode", i18nC.methodeConservationDetail());
|
|
|
767 |
|
|
|
768 |
descriptionParams.set("i18n_titre_etiquette", i18nC.collectionTitreEtiquette());
|
|
|
769 |
descriptionParams.set("i18n_specimen_fixation_pourcent", i18nC.specimenFixationPourcent());
|
|
|
770 |
descriptionParams.set("i18n_etiquette_fixation_pourcent", i18nC.etiquetteFixationPourcent());
|
|
|
771 |
descriptionParams.set("i18n_specimen_fixation_methode", i18nC.specimenMethodeFixationDetail());
|
|
|
772 |
descriptionParams.set("i18n_etiquette_fixation_methode_support", i18nC.etiquetteMethodeFixationSurSupportDetail());
|
|
|
773 |
descriptionParams.set("i18n_etiquette_fixation_methode_specimen", i18nC.etiquetteMethodeFixationSurSpecimenDetail());
|
|
|
774 |
descriptionParams.set("i18n_etiquette_type_ecriture", i18nC.typeEcritureDetail());
|
|
|
775 |
|
|
|
776 |
descriptionParams.set("i18n_titre_traitement", i18nC.collectionTitreTraitement());
|
|
|
777 |
descriptionParams.set("i18n_traitement", i18nC.collectionTraitementDetail());
|
|
|
778 |
descriptionParams.set("i18n_traitement_poison", i18nC.collectionTraitementPoisonDetail());
|
|
|
779 |
descriptionParams.set("i18n_traitement_insecte", i18nC.collectionTraitementInsecteDetail());
|
|
|
780 |
|
966 |
jpm |
781 |
descriptionParams.set("i18n_titre_etat_degradation", i18nC.collectionTitreEtatEtDegradation());
|
|
|
782 |
descriptionParams.set("i18n_etat_general", i18nC.collectionEtatGeneralDetail());
|
|
|
783 |
descriptionParams.set("i18n_degradation_specimen", i18nC.degradationSpecimenDetail());
|
|
|
784 |
descriptionParams.set("i18n_degradation_presentation", i18nC.degradationPresentationDetail());
|
|
|
785 |
descriptionParams.set("i18n_determination", i18nC.collectionDeterminationDetail());
|
|
|
786 |
|
875 |
jpm |
787 |
String typeBota = construireTxtListeOntologie(collection.getBotanique().getType());
|
|
|
788 |
descriptionParams.set("type_botanique", typeBota);
|
|
|
789 |
descriptionParams.set("nbre_echantillon", collection.getBotanique().getNbreEchantillon());
|
|
|
790 |
|
961 |
jpm |
791 |
CollectionBotanique collectionBotanique = collection.getBotanique();
|
|
|
792 |
String etatUniteRangement = construireTxtListeOntologie(collectionBotanique.getUniteRangementEtat());
|
|
|
793 |
String tableauUniteRangementHtml = construireTableauUniteRangement();
|
|
|
794 |
String tableauUniteBaseHtml = construireTableauUniteBase();
|
|
|
795 |
descriptionParams.set("tableau_unite_rangement", tableauUniteRangementHtml);
|
|
|
796 |
descriptionParams.set("etat_unite_rangement", etatUniteRangement);
|
|
|
797 |
descriptionParams.set("tableau_unite_base", tableauUniteBaseHtml);
|
|
|
798 |
|
|
|
799 |
String typePapier = construireTxtListeOntologie(collectionBotanique.getConservationPapierType());
|
|
|
800 |
String conservationMethode = construireTxtListeOntologie(collectionBotanique.getConservationMethode());
|
|
|
801 |
descriptionParams.set("type_papier", typePapier);
|
|
|
802 |
descriptionParams.set("conservation_methode", conservationMethode);
|
|
|
803 |
|
|
|
804 |
String specimenFixationMethode = construireTxtListeOntologie(collectionBotanique.getSpecimenFixationMethode());
|
|
|
805 |
String etiquetteFixationMethodeSupport = construireTxtListeOntologie(collectionBotanique.getEtiquetteFixationSupport());
|
|
|
806 |
String etiquetteFixationMethodeSpecimen = construireTxtListeOntologie(collectionBotanique.getEtiquetteFixationSpecimen());
|
|
|
807 |
String etiquetteTypeEcriture = construireTxtListeOntologie(collectionBotanique.getEtiquetteEcriture());
|
|
|
808 |
descriptionParams.set("specimen_fixation_pourcent", collectionBotanique.getSpecimenFixationPourcent());
|
|
|
809 |
descriptionParams.set("etiquette_fixation_pourcent", collectionBotanique.getEtiquetteFixationPourcent());
|
|
|
810 |
descriptionParams.set("specimen_fixation_methode", specimenFixationMethode);
|
|
|
811 |
descriptionParams.set("etiquette_fixation_methode_support", etiquetteFixationMethodeSupport);
|
|
|
812 |
descriptionParams.set("etiquette_fixation_methode_specimen", etiquetteFixationMethodeSpecimen);
|
|
|
813 |
descriptionParams.set("etiquette_type_ecriture", etiquetteTypeEcriture);
|
|
|
814 |
|
|
|
815 |
String traitement = construireTxtListeOntologie(collectionBotanique.getTraitement());
|
|
|
816 |
String traitementPoison = construireTxtListeOntologie(collectionBotanique.getTraitementPoison());
|
|
|
817 |
String traitementInsecte = construireTxtListeOntologie(collectionBotanique.getTraitementInsecte());
|
|
|
818 |
descriptionParams.set("traitement", traitement);
|
|
|
819 |
descriptionParams.set("traitement_poison", traitementPoison);
|
|
|
820 |
descriptionParams.set("traitement_insecte", traitementInsecte);
|
|
|
821 |
|
966 |
jpm |
822 |
String etatGeneral = construireTxtListeOntologie(collectionBotanique.getEtatGeneral());
|
|
|
823 |
boolean valeurEstOntologie = false;
|
|
|
824 |
boolean typeEstOntologie = true;
|
|
|
825 |
boolean donneeEstOntologie = true;
|
|
|
826 |
String degradationSpecimen = construireTxtListeOntologie(collectionBotanique.getDegradationSpecimen(), valeurEstOntologie, typeEstOntologie, donneeEstOntologie);
|
|
|
827 |
String degradationPresentation = construireTxtListeOntologie(collectionBotanique.getDegradationPresentation(), valeurEstOntologie, typeEstOntologie, donneeEstOntologie);
|
|
|
828 |
String determination = construireTxtListeOntologie(collectionBotanique.getDetermination());
|
|
|
829 |
descriptionParams.set("etat_general", etatGeneral);
|
|
|
830 |
descriptionParams.set("degradation_specimen", degradationSpecimen);
|
|
|
831 |
descriptionParams.set("degradation_presentation", degradationPresentation);
|
|
|
832 |
descriptionParams.set("determination", determination);
|
|
|
833 |
|
630 |
jp_milcent |
834 |
afficherOnglet(descriptionTpl, descriptionParams, descriptionOnglet);
|
|
|
835 |
}
|
|
|
836 |
|
961 |
jpm |
837 |
private String construireTableauUniteRangement() {
|
|
|
838 |
Params contenuParams = new Params();
|
|
|
839 |
contenuParams.set("i18n_type", i18nC.collectionUniteType());
|
|
|
840 |
contenuParams.set("i18n_nombre", i18nC.collectionUniteNbre());
|
|
|
841 |
contenuParams.set("i18n_precision", i18nC.collectionUnitePrecision());
|
|
|
842 |
contenuParams.set("i18n_format", i18nC.collectionUniteFormat());
|
|
|
843 |
|
|
|
844 |
CollectionBotanique collectionBotanique = collection.getBotanique();
|
|
|
845 |
HashMap<String,UniteRangement> unites = CollectionFormDescription.parserValeurUniteRangement(collectionBotanique.getUniteRangement());
|
|
|
846 |
|
|
|
847 |
String lignesUnite = "";
|
|
|
848 |
Iterator<String> it = unites.keySet().iterator();
|
|
|
849 |
while (it.hasNext()) {
|
|
|
850 |
String cle = it.next();
|
|
|
851 |
UniteRangement unite = unites.get(cle);
|
|
|
852 |
if (unite.getNombre() != 0) {
|
|
|
853 |
Params ligneParams = new Params();
|
|
|
854 |
if (unite.getTypeAutre()) {
|
|
|
855 |
ligneParams.set("type", unite.getType());
|
|
|
856 |
} else {
|
|
|
857 |
ligneParams.set("type", construireTxtListeOntologie(unite.getId()));
|
|
|
858 |
}
|
|
|
859 |
ligneParams.set("nombre", UtilNombre.formaterEnEntier(unite.getNombre()));
|
|
|
860 |
ligneParams.set("precision", unite.getPrecision());
|
|
|
861 |
ligneParams.set("format", unite.getFormat());
|
|
|
862 |
|
|
|
863 |
lignesUnite += Format.substitute(ligneUniteRangementTpl, ligneParams);
|
|
|
864 |
}
|
|
|
865 |
}
|
|
|
866 |
|
|
|
867 |
String cHtml = i18nC.nonRenseigne();
|
|
|
868 |
if (!UtilString.isEmpty(lignesUnite)) {
|
|
|
869 |
contenuParams.set("lignes", lignesUnite);
|
|
|
870 |
cHtml = Format.substitute(tableauUniteRangementTpl, contenuParams);
|
|
|
871 |
}
|
|
|
872 |
return cHtml;
|
|
|
873 |
}
|
|
|
874 |
|
|
|
875 |
private String construireTableauUniteBase() {
|
|
|
876 |
Params contenuParams = new Params();
|
|
|
877 |
contenuParams.set("i18n_unite_base", i18nC.collectionUniteBase());
|
|
|
878 |
contenuParams.set("i18n_part", i18nC.collectionUniteBasePart());
|
|
|
879 |
contenuParams.set("i18n_sp", i18nC.collectionUniteBaseSp());
|
|
|
880 |
|
|
|
881 |
contenuParams.set("i18n_type", i18nC.collectionUniteType());
|
|
|
882 |
contenuParams.set("i18n_nombre", i18nC.collectionUniteNbre());
|
|
|
883 |
contenuParams.set("i18n_precision", i18nC.collectionUnitePrecision());
|
|
|
884 |
contenuParams.set("i18n_format", i18nC.collectionUniteFormat());
|
|
|
885 |
|
|
|
886 |
CollectionBotanique collectionBotanique = collection.getBotanique();
|
|
|
887 |
HashMap<String,UniteBase> unites = CollectionFormDescription.parserValeurUniteBase(collectionBotanique.getUniteBase());
|
|
|
888 |
|
|
|
889 |
String lignesUnite = "";
|
|
|
890 |
Iterator<String> it = unites.keySet().iterator();
|
|
|
891 |
while (it.hasNext()) {
|
|
|
892 |
String cle = it.next();
|
|
|
893 |
UniteBase unite = unites.get(cle);
|
|
|
894 |
if (unite.getNombre() != 0 || unite.getNombrePart() != 0 || unite.getNombreSp() != 0) {
|
|
|
895 |
Params ligneParams = new Params();
|
|
|
896 |
if (unite.getTypeAutre()) {
|
|
|
897 |
ligneParams.set("type", unite.getType());
|
|
|
898 |
} else {
|
|
|
899 |
ligneParams.set("type", construireTxtListeOntologie(unite.getId()));
|
|
|
900 |
}
|
|
|
901 |
ligneParams.set("nombre", UtilNombre.formaterEnEntier(unite.getNombre()));
|
|
|
902 |
ligneParams.set("precision", unite.getPrecision());
|
|
|
903 |
ligneParams.set("format", unite.getFormat());
|
975 |
jpm |
904 |
ligneParams.set("part_nombre", UtilNombre.formaterEnEntier(unite.getNombrePart()));
|
961 |
jpm |
905 |
ligneParams.set("part_precision", unite.getPrecisionPart());
|
975 |
jpm |
906 |
ligneParams.set("sp_nombre", UtilNombre.formaterEnEntier(unite.getNombreSp()));
|
961 |
jpm |
907 |
ligneParams.set("sp_precision", unite.getPrecisionSp());
|
|
|
908 |
|
|
|
909 |
lignesUnite += Format.substitute(ligneUniteBaseTpl, ligneParams);
|
|
|
910 |
}
|
|
|
911 |
}
|
|
|
912 |
|
|
|
913 |
String cHtml = i18nC.nonRenseigne();
|
|
|
914 |
if (!UtilString.isEmpty(lignesUnite)) {
|
|
|
915 |
contenuParams.set("lignes", lignesUnite);
|
|
|
916 |
cHtml = Format.substitute(tableauUniteBaseTpl, contenuParams);
|
|
|
917 |
}
|
|
|
918 |
return cHtml;
|
|
|
919 |
}
|
|
|
920 |
|
630 |
jp_milcent |
921 |
private void afficherContenu() {
|
|
|
922 |
Params contenuParams = new Params();
|
966 |
jpm |
923 |
contenuParams.set("i18n_titre_nature", i18nC.collectionNatureTitre());
|
|
|
924 |
contenuParams.set("i18n_nature", i18nC.natureVegetaleContenuDetail());
|
|
|
925 |
contenuParams.set("i18n_specialite", i18nC.specialiteCollectionDetail());
|
630 |
jp_milcent |
926 |
|
966 |
jpm |
927 |
contenuParams.set("i18n_titre_constitution", i18nC.collectionConstitutionTitre());
|
|
|
928 |
contenuParams.set("i18n_periode", i18nC.periodeConstitutionDetail());
|
|
|
929 |
contenuParams.set("i18n_date_debut", i18nC.dateDebutCollectionDetail());
|
|
|
930 |
contenuParams.set("i18n_date_fin", i18nC.dateFinCollectionDetail());
|
|
|
931 |
|
|
|
932 |
contenuParams.set("i18n_titre_classement", i18nC.collectionClassementTitre());
|
|
|
933 |
contenuParams.set("i18n_classement_etat", i18nC.etatClassementCollectionDetail());
|
|
|
934 |
contenuParams.set("i18n_classement", i18nC.annotationClassementCollectionDetail());
|
|
|
935 |
|
|
|
936 |
contenuParams.set("i18n_titre_etiquette", i18nC.collectionEtiquetteTitre());
|
|
|
937 |
contenuParams.set("i18n_etiquette_renseignement", i18nC.etiquetteRenseignementDetail());
|
|
|
938 |
contenuParams.set("i18n_precision_localite", i18nC.precisionLocaliteDetail());
|
|
|
939 |
contenuParams.set("i18n_precision_date", i18nC.precisionDateDetail());
|
|
|
940 |
contenuParams.set("i18n_etiquette_annotation", i18nC.etiquetteAnnotationDetail());
|
|
|
941 |
|
|
|
942 |
contenuParams.set("i18n_titre_integree", i18nC.collectionIntegreeTitre());
|
|
|
943 |
contenuParams.set("i18n_collection_integration", i18nC.integreCollectionDetail());
|
|
|
944 |
contenuParams.set("i18n_collection_integration_info", i18nC.infoIntegreCollectionDetail());
|
|
|
945 |
|
|
|
946 |
CollectionBotanique collectionBotanique = collection.getBotanique();
|
|
|
947 |
String nature = construireTxtListeOntologie(collectionBotanique.getNature());
|
|
|
948 |
contenuParams.set("nature", nature);
|
|
|
949 |
contenuParams.set("specialite", collectionBotanique.getSpecialite());
|
|
|
950 |
|
|
|
951 |
String periode = construireTxtListeOntologie(collection.getPeriodeConstitution());
|
|
|
952 |
String dateDebut = collectionBotanique.getRecolteDateDebut();
|
|
|
953 |
String dateDebutPrecision = construireTxtListeOntologie(collectionBotanique.getRecolteDateDebutType());
|
|
|
954 |
String dateDebutRecolte = (UtilString.isEmpty(dateDebut)) ? "" : dateDebut+" ("+dateDebutPrecision+")";
|
|
|
955 |
String dateFin = collectionBotanique.getRecolteDateFin();
|
|
|
956 |
String dateFinPrecision = construireTxtListeOntologie(collectionBotanique.getRecolteDateFinType());
|
|
|
957 |
String dateFinRecolte = (UtilString.isEmpty(dateFin)) ? "" : dateFin+" ("+dateFinPrecision+")";
|
|
|
958 |
contenuParams.set("periode", periode);
|
|
|
959 |
contenuParams.set("date_debut", dateDebutRecolte);
|
|
|
960 |
contenuParams.set("date_fin", dateFinRecolte);
|
|
|
961 |
|
|
|
962 |
String classementEtat = construireTxtListeOntologie(collectionBotanique.getClassementEtat());
|
|
|
963 |
contenuParams.set("classement_etat", classementEtat);
|
|
|
964 |
contenuParams.set("classement", collectionBotanique.getClassementAnnotation());
|
|
|
965 |
|
|
|
966 |
String etiquetteRenseignements = "";
|
|
|
967 |
HashMap<String,String> infos = CollectionFormContenu.parserEtiquetteRenseignement(collectionBotanique.getEtiquetteRenseignement());
|
|
|
968 |
if (infos != null) {
|
|
|
969 |
Iterator<String> it = infos.keySet().iterator();
|
|
|
970 |
while (it.hasNext()) {
|
|
|
971 |
String cle = it.next();
|
|
|
972 |
if (cle.equals("AT")) {
|
|
|
973 |
etiquetteRenseignements += i18nC.etiquetteAuteurCollection();
|
|
|
974 |
} else if (cle.equals("F")) {
|
|
|
975 |
etiquetteRenseignements += i18nC.etiquetteFamille();
|
|
|
976 |
} else if (cle.equals("G")) {
|
|
|
977 |
etiquetteRenseignements += i18nC.etiquetteGenre();
|
|
|
978 |
} else if (cle.equals("SP")) {
|
|
|
979 |
etiquetteRenseignements += i18nC.etiquetteSp();
|
|
|
980 |
} else if (cle.equals("ASP")) {
|
|
|
981 |
etiquetteRenseignements += i18nC.etiquetteAuteurSp();
|
|
|
982 |
} else if (cle.equals("L")) {
|
|
|
983 |
etiquetteRenseignements += i18nC.etiquetteLocalite();
|
|
|
984 |
} else if (cle.equals("D")) {
|
|
|
985 |
etiquetteRenseignements += i18nC.etiquetteDateRecolte();
|
|
|
986 |
} else {
|
|
|
987 |
etiquetteRenseignements += i18nC.inconnue();
|
|
|
988 |
}
|
1329 |
cyprien |
989 |
if (it.hasNext()) etiquetteRenseignements += ": "+infos.get(cle)+"%, ";
|
|
|
990 |
else etiquetteRenseignements += ": "+infos.get(cle)+"%.";
|
966 |
jpm |
991 |
}
|
|
|
992 |
}
|
|
|
993 |
String precisionLocalite = construireTxtListeOntologie(collectionBotanique.getPrecisionLocalite());
|
|
|
994 |
String precisionDate = construireTxtListeOntologie(collectionBotanique.getPrecisionDate());
|
|
|
995 |
contenuParams.set("etiquette_renseignement", etiquetteRenseignements);
|
|
|
996 |
contenuParams.set("precision_localite", precisionLocalite);
|
|
|
997 |
contenuParams.set("precision_date", precisionDate);
|
|
|
998 |
contenuParams.set("etiquette_annotation", collectionBotanique.getAnnotationsDiverses());
|
|
|
999 |
|
|
|
1000 |
String collectionIntegration = construireTxtListeOntologie(collectionBotanique.getCollectionIntegre());
|
|
|
1001 |
String collectionIntegrationInfo = construireTxtListeOntologie(collectionBotanique.getCollectionIntegreInfo());
|
|
|
1002 |
contenuParams.set("collection_integration", collectionIntegration);
|
|
|
1003 |
contenuParams.set("collection_integration_info", collectionIntegrationInfo);
|
|
|
1004 |
|
630 |
jp_milcent |
1005 |
afficherOnglet(contenuTpl, contenuParams, contenuOnglet);
|
|
|
1006 |
}
|
|
|
1007 |
|
|
|
1008 |
private void afficherInventaire() {
|
|
|
1009 |
Params inventaireParams = new Params();
|
|
|
1010 |
inventaireParams.set("i18n_titre_inventaire", i18nC.collectionInventaireTitre());
|
966 |
jpm |
1011 |
inventaireParams.set("i18n_existence", i18nC.existenceInventaireCollectionDetail());
|
|
|
1012 |
inventaireParams.set("i18n_participation_auteur", i18nC.auteurInventaireCollectionDetail());
|
|
|
1013 |
inventaireParams.set("i18n_forme", i18nC.formeInventaireCollectionDetail());
|
|
|
1014 |
inventaireParams.set("i18n_info", i18nC.infoInventaireCollectionDetail());
|
|
|
1015 |
inventaireParams.set("i18n_digital", i18nC.digitalInventaireCollectionDetail());
|
|
|
1016 |
inventaireParams.set("i18n_digital_pourcent", i18nC.pourcentDigitalInventaireCollectionDetail());
|
|
|
1017 |
inventaireParams.set("i18n_etat", i18nC.etatInventaireCollectionDetail());
|
1210 |
cyprien |
1018 |
//DELETEME inventaireParams.set("i18n_type_donnee", i18nC.typeDonneeInventaireCollectionDetail());
|
630 |
jp_milcent |
1019 |
|
966 |
jpm |
1020 |
CollectionBotanique collectionBotanique = collection.getBotanique();
|
|
|
1021 |
String existence = construireTxtListeOntologie(collectionBotanique.getInventaire());
|
|
|
1022 |
String participationAuteur = construireTxtListeOntologie(collectionBotanique.getInventaireAuteur());
|
|
|
1023 |
String forme = construireTxtListeOntologie(collectionBotanique.getInventaireForme());
|
|
|
1024 |
String digital = construireTxtListeOntologie(collectionBotanique.getInventaireDigital());
|
|
|
1025 |
String digitalPourcent = collectionBotanique.getInventaireDigitalPourcent()+"%";
|
|
|
1026 |
String etat = construireTxtListeOntologie(collectionBotanique.getInventaireEtat());
|
|
|
1027 |
inventaireParams.set("existence", existence);
|
|
|
1028 |
inventaireParams.set("participation_auteur", participationAuteur);
|
|
|
1029 |
inventaireParams.set("forme", forme);
|
|
|
1030 |
inventaireParams.set("info", collectionBotanique.getInventaireInfo());
|
|
|
1031 |
inventaireParams.set("digital", digital);
|
|
|
1032 |
inventaireParams.set("digital_pourcent", digitalPourcent);
|
|
|
1033 |
inventaireParams.set("etat", etat);
|
1210 |
cyprien |
1034 |
//DELETEME inventaireParams.set("type_donnee", collectionBotanique.getInventaireDonneesTypes());
|
966 |
jpm |
1035 |
|
630 |
jp_milcent |
1036 |
afficherOnglet(inventaireTpl, inventaireParams, inventaireOnglet);
|
|
|
1037 |
}
|
|
|
1038 |
|
997 |
jpm |
1039 |
private void afficherCommentaire() {
|
|
|
1040 |
String tableauCommentaireHtml = "";
|
|
|
1041 |
if (collection.getCommentairesLiees() != null && collection.getCommentairesLiees().size() > 0) {
|
|
|
1042 |
tableauCommentaireHtml = construireTableauCommentairesLiees();
|
|
|
1043 |
}
|
|
|
1044 |
|
|
|
1045 |
Params personneParams = new Params();
|
|
|
1046 |
personneParams.set("i18n_titre_commentaire", i18nC.collectionCommentaireTitre());
|
|
|
1047 |
personneParams.set("tableau_commentaires_liees", tableauCommentaireHtml);
|
|
|
1048 |
|
|
|
1049 |
afficherOnglet(commentaireTpl, personneParams, commentaireOnglet);
|
|
|
1050 |
}
|
|
|
1051 |
|
|
|
1052 |
private String construireTableauCommentairesLiees() {
|
|
|
1053 |
Params contenuParams = new Params();
|
|
|
1054 |
contenuParams.set("i18n_type", i18nC.commentaireType());
|
|
|
1055 |
contenuParams.set("i18n_titre", i18nC.commentaireTitre());
|
|
|
1056 |
contenuParams.set("i18n_texte", i18nC.commentaireTexte());
|
|
|
1057 |
contenuParams.set("i18n_ponderation", i18nC.commentairePonderation());
|
|
|
1058 |
contenuParams.set("i18n_public", i18nC.commentairePublic());
|
|
|
1059 |
|
|
|
1060 |
String lignesCommentaire = "";
|
|
|
1061 |
if (collection.getCommentairesLiees() != null) {
|
|
|
1062 |
Iterator<String> it = collection.getCommentairesLiees().keySet().iterator();
|
|
|
1063 |
while (it.hasNext()) {
|
|
|
1064 |
CollectionACommentaire relationCollectionACommentaire = collection.getCommentairesLiees().get(it.next());
|
|
|
1065 |
Commentaire commentaire = relationCollectionACommentaire.getCommentaire();
|
|
|
1066 |
|
|
|
1067 |
String type = construireTxtListeOntologie(relationCollectionACommentaire.getType());
|
|
|
1068 |
String acces = (commentaire.etrePublic() ? i18nC.donneePublic() : i18nC.donneePrivee());
|
|
|
1069 |
|
|
|
1070 |
Params ligneParams = new Params();
|
|
|
1071 |
ligneParams.set("type", type);
|
|
|
1072 |
ligneParams.set("titre", commentaire.getTitre());
|
|
|
1073 |
ligneParams.set("texte", commentaire.getTexte());
|
|
|
1074 |
ligneParams.set("ponderation", commentaire.getPonderation()+"/100");
|
|
|
1075 |
ligneParams.set("public", acces);
|
|
|
1076 |
|
|
|
1077 |
lignesCommentaire += Format.substitute(ligneCommentaireLieeTpl, ligneParams);
|
|
|
1078 |
}
|
|
|
1079 |
}
|
|
|
1080 |
|
|
|
1081 |
String cHtml = i18nC.nonRenseigne();
|
|
|
1082 |
if (!UtilString.isEmpty(lignesCommentaire)) {
|
|
|
1083 |
contenuParams.set("lignes", lignesCommentaire);
|
|
|
1084 |
cHtml = Format.substitute(tableauCommentairesLieesTpl, contenuParams);
|
|
|
1085 |
}
|
|
|
1086 |
return cHtml;
|
|
|
1087 |
}
|
|
|
1088 |
|
468 |
jp_milcent |
1089 |
protected String getNomStructure() {
|
|
|
1090 |
String nomStructure = "";
|
|
|
1091 |
if (structure != null) {
|
|
|
1092 |
nomStructure = structure.getNom();
|
|
|
1093 |
} else {
|
|
|
1094 |
nomStructure = collection.getIdStructure();
|
453 |
jp_milcent |
1095 |
}
|
468 |
jp_milcent |
1096 |
return nomStructure;
|
453 |
jp_milcent |
1097 |
}
|
|
|
1098 |
}
|