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