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.projet.ProjetListe;
|
|
|
25 |
import org.tela_botanica.client.modeles.publication.Publication;
|
|
|
26 |
import org.tela_botanica.client.modeles.structure.Structure;
|
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 |
|
453 |
jp_milcent |
81 |
|
|
|
82 |
public CollectionDetailVue(Mediateur mediateurCourant) {
|
|
|
83 |
super(mediateurCourant);
|
|
|
84 |
initialiserTousLesTpl();
|
|
|
85 |
chargerOntologie();
|
|
|
86 |
|
|
|
87 |
panneauPrincipal = new ContentPanel();
|
938 |
jpm |
88 |
panneauPrincipal.setLayout(new FitLayout());
|
453 |
jp_milcent |
89 |
panneauPrincipal.setHeaderVisible(false);
|
|
|
90 |
panneauPrincipal.setBodyBorder(false);
|
|
|
91 |
|
|
|
92 |
entete = new Html();
|
|
|
93 |
entete.setId(ComposantId.ZONE_DETAIL_ENTETE);
|
|
|
94 |
panneauPrincipal.setTopComponent(entete);
|
|
|
95 |
|
|
|
96 |
onglets = new TabPanel();
|
|
|
97 |
onglets.setId(ComposantId.ZONE_DETAIL_CORPS);
|
|
|
98 |
onglets.setBodyBorder(false);
|
|
|
99 |
|
|
|
100 |
generalOnglet = new TabItem(i18nC.structureInfoGeneral());
|
|
|
101 |
generalOnglet.setLayout(new AnchorLayout());
|
|
|
102 |
generalOnglet.setScrollMode(Scroll.AUTO);
|
|
|
103 |
onglets.add(generalOnglet);
|
|
|
104 |
|
862 |
jpm |
105 |
personneOnglet = new TabItem(i18nC.collectionPersonne());
|
|
|
106 |
personneOnglet.setLayout(new AnchorLayout());
|
|
|
107 |
personneOnglet.setScrollMode(Scroll.AUTO);
|
|
|
108 |
onglets.add(personneOnglet);
|
630 |
jp_milcent |
109 |
|
687 |
jp_milcent |
110 |
publicationOnglet = new TabItem(i18nC.collectionPublication());
|
|
|
111 |
publicationOnglet.setLayout(new AnchorLayout());
|
|
|
112 |
publicationOnglet.setScrollMode(Scroll.AUTO);
|
|
|
113 |
onglets.add(publicationOnglet);
|
|
|
114 |
|
630 |
jp_milcent |
115 |
descriptionOnglet = new TabItem(i18nC.collectionDescription());
|
|
|
116 |
descriptionOnglet.setLayout(new AnchorLayout());
|
|
|
117 |
descriptionOnglet.setScrollMode(Scroll.AUTO);
|
|
|
118 |
onglets.add(descriptionOnglet);
|
|
|
119 |
|
|
|
120 |
contenuOnglet = new TabItem(i18nC.collectionContenu());
|
|
|
121 |
contenuOnglet.setLayout(new AnchorLayout());
|
|
|
122 |
contenuOnglet.setScrollMode(Scroll.AUTO);
|
|
|
123 |
onglets.add(contenuOnglet);
|
862 |
jpm |
124 |
|
630 |
jp_milcent |
125 |
inventaireOnglet = new TabItem(i18nC.collectionInventaire());
|
|
|
126 |
inventaireOnglet.setLayout(new AnchorLayout());
|
|
|
127 |
inventaireOnglet.setScrollMode(Scroll.AUTO);
|
|
|
128 |
onglets.add(inventaireOnglet);
|
|
|
129 |
|
997 |
jpm |
130 |
commentaireOnglet = new TabItem(i18nC.collectionCommentaire());
|
|
|
131 |
commentaireOnglet.setLayout(new AnchorLayout());
|
|
|
132 |
commentaireOnglet.setScrollMode(Scroll.AUTO);
|
|
|
133 |
onglets.add(commentaireOnglet);
|
|
|
134 |
|
453 |
jp_milcent |
135 |
panneauPrincipal.add(onglets);
|
|
|
136 |
add(panneauPrincipal);
|
|
|
137 |
}
|
|
|
138 |
|
|
|
139 |
private void initialiserTousLesTpl() {
|
|
|
140 |
initialiserEnteteHtmlTpl();
|
|
|
141 |
initialiserGeneralTpl();
|
883 |
jpm |
142 |
initialiserPersonneTpl();
|
|
|
143 |
initialiserTableauPersonnesLieesTpl();
|
|
|
144 |
initialiserLignePersonneLieeTpl();
|
687 |
jp_milcent |
145 |
initialiserPublicationTpl();
|
883 |
jpm |
146 |
initialiserTableauPublicationsLieesTpl();
|
|
|
147 |
initialiserLignePublicationLieeTpl();
|
630 |
jp_milcent |
148 |
initialiserContenuTpl();
|
|
|
149 |
initialiserDescriptionTpl();
|
961 |
jpm |
150 |
initialiserTableauUniteRangementTpl();
|
|
|
151 |
initialiserLigneUniteRangementTpl();
|
|
|
152 |
initialiserTableauUniteBaseTpl();
|
|
|
153 |
initialiserLigneUniteBaseTpl();
|
630 |
jp_milcent |
154 |
initialiserInventaireTpl();
|
997 |
jpm |
155 |
initialiserCommentaireTpl();
|
|
|
156 |
initialiserTableauCommentairesLieesTpl();
|
|
|
157 |
initialiserLigneCommentaireLieeTpl();
|
453 |
jp_milcent |
158 |
}
|
|
|
159 |
|
|
|
160 |
private void initialiserEnteteHtmlTpl() {
|
|
|
161 |
enteteTpl =
|
|
|
162 |
"<div id='{css_id}'>"+
|
|
|
163 |
" <h1>{nom}</h1>"+
|
813 |
jpm |
164 |
" <h2>{structure}<span class='{css_meta}'>{projet} <br /> {i18n_id}:{id} - {guid}</span></h2>" +
|
453 |
jp_milcent |
165 |
"</div>";
|
|
|
166 |
}
|
|
|
167 |
|
|
|
168 |
private void initialiserGeneralTpl() {
|
|
|
169 |
generalTpl =
|
|
|
170 |
"<div class='{css_corps}'>"+
|
|
|
171 |
" <div class='{css_fieldset}'>"+
|
|
|
172 |
" <h2>{i18n_titre_identification}</h2>"+
|
630 |
jp_milcent |
173 |
" <span class='{css_label}'>{i18n_nom_alternatif} :</span> {nom_alternatif}<br />"+
|
|
|
174 |
" <span class='{css_label}'>{i18n_mere} :</span> {mere}<br />"+
|
687 |
jp_milcent |
175 |
" <span class='{css_label}'>{i18n_type_ncd} :</span> {type_ncd}<br />"+
|
|
|
176 |
" <span class='{css_label}'>{i18n_type_depot} :</span> {type_depot}<br />"+
|
961 |
jpm |
177 |
" <span class='{css_label}'>{i18n_id_alternatif} :</span> {id_alternatif}<br />"+
|
|
|
178 |
" <span class='{css_label}'>{i18n_code} :</span> {code}<br />"+
|
|
|
179 |
" <span class='{css_label}'>{i18n_cote} :</span> {cote}<br />"+
|
453 |
jp_milcent |
180 |
" </div>"+
|
477 |
jp_milcent |
181 |
" <div class='{css_fieldset}'>"+
|
630 |
jp_milcent |
182 |
" <h2>{i18n_general_collection_titre}</h2>"+
|
477 |
jp_milcent |
183 |
" <span class='{css_label}'>{i18n_description} :</span> {description}<br />"+
|
|
|
184 |
" <span class='{css_label}'>{i18n_description_specialiste} :</span> {description_specialiste}<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>"+
|
630 |
jp_milcent |
191 |
" <span class='{css_label}'>{i18n_groupement_principe} :</span> {groupement_principe}<br />"+
|
|
|
192 |
" <span class='{css_label}'>{i18n_groupement_but} :</span> {groupement_but}<br />"+
|
961 |
jpm |
193 |
" <span class='{css_label}'>{i18n_couverture_geo} :</span> {couverture_geo}<br />"+
|
477 |
jp_milcent |
194 |
" </div>"+
|
961 |
jpm |
195 |
" <div class='{css_fieldset}'>"+
|
|
|
196 |
" <h2>{i18n_specimen_type_titre}</h2>"+
|
|
|
197 |
" <span class='{css_label}'>{i18n_specimen_type_presence} :</span> {specimen_type_presence}<br />"+
|
|
|
198 |
" <span class='{css_label}'>{i18n_specimen_type_nombre} :</span> {specimen_type_nombre}<br />"+
|
|
|
199 |
" <span class='{css_label}'>{i18n_specimen_type_classement} :</span> {specimen_type_classement}<br />"+
|
|
|
200 |
" </div>"+
|
477 |
jp_milcent |
201 |
" <hr class='{css_clear}'/>"+
|
453 |
jp_milcent |
202 |
"</div>";
|
|
|
203 |
}
|
|
|
204 |
|
883 |
jpm |
205 |
private void initialiserPersonneTpl() {
|
|
|
206 |
personneTpl =
|
630 |
jp_milcent |
207 |
"<div class='{css_corps}'>"+
|
961 |
jpm |
208 |
" <h2>{i18n_titre_personne}</h2>"+
|
|
|
209 |
" {tableau_personnes_liees}"+
|
630 |
jp_milcent |
210 |
"</div>";
|
|
|
211 |
}
|
|
|
212 |
|
883 |
jpm |
213 |
private void initialiserTableauPersonnesLieesTpl() {
|
|
|
214 |
tableauPersonnesLieesTpl =
|
|
|
215 |
"<table>"+
|
|
|
216 |
" <thead>"+
|
|
|
217 |
" <tr>" +
|
961 |
jpm |
218 |
" <th>{i18n_relation}</th>" +
|
|
|
219 |
" <th>{i18n_nom_complet}</th>" +
|
|
|
220 |
" <th>{i18n_nom}</th>" +
|
883 |
jpm |
221 |
" <th>{i18n_prenom}</th>" +
|
961 |
jpm |
222 |
" <th>{i18n_naissance_date}</th>" +
|
|
|
223 |
" <th>{i18n_naissance_lieu}</th>" +
|
|
|
224 |
" <th>{i18n_etre_decede}</th>" +
|
|
|
225 |
" <th>{i18n_deces_date}</th>" +
|
|
|
226 |
" <th>{i18n_deces_lieu}</th>" +
|
883 |
jpm |
227 |
" </tr>"+
|
|
|
228 |
" </thead>"+
|
|
|
229 |
" <tbody>"+
|
|
|
230 |
" {lignes}"+
|
|
|
231 |
" </tbody>"+
|
|
|
232 |
"</table>";
|
|
|
233 |
}
|
|
|
234 |
|
|
|
235 |
private void initialiserLignePersonneLieeTpl() {
|
|
|
236 |
lignePersonneLieeTpl =
|
|
|
237 |
"<tr>"+
|
961 |
jpm |
238 |
" <td>{relation}</td>"+
|
|
|
239 |
" <td>{nom_complet}</td>"+
|
|
|
240 |
" <td>{nom}</td>"+
|
883 |
jpm |
241 |
" <td>{prenom}</td>"+
|
961 |
jpm |
242 |
" <td>{naissance_date}</td>"+
|
|
|
243 |
" <td>{naissance_lieu}</td>"+
|
|
|
244 |
" <td>{etre_decede}</td>"+
|
|
|
245 |
" <td>{deces_date}</td>"+
|
|
|
246 |
" <td>{deces_lieu}</td>"+
|
883 |
jpm |
247 |
"</tr>";
|
|
|
248 |
}
|
|
|
249 |
|
687 |
jp_milcent |
250 |
private void initialiserPublicationTpl() {
|
|
|
251 |
publicationTpl =
|
|
|
252 |
"<div class='{css_corps}'>"+
|
961 |
jpm |
253 |
" <h2>{i18n_titre_publication}</h2>"+
|
|
|
254 |
" {tableau_publications_liees}"+
|
687 |
jp_milcent |
255 |
"</div>";
|
|
|
256 |
}
|
|
|
257 |
|
883 |
jpm |
258 |
private void initialiserTableauPublicationsLieesTpl() {
|
|
|
259 |
tableauPublicationsLieesTpl =
|
|
|
260 |
"<table>"+
|
|
|
261 |
" <thead>"+
|
|
|
262 |
" <tr>" +
|
|
|
263 |
" <th>{i18n_auteur}</th>" +
|
|
|
264 |
" <th>{i18n_titre}</th>" +
|
961 |
jpm |
265 |
" <th>{i18n_revue}</th>" +
|
|
|
266 |
" <th>{i18n_editeur}</th>" +
|
|
|
267 |
" <th>{i18n_annee}</th>" +
|
|
|
268 |
" <th>{i18n_nvt}</th>" +
|
|
|
269 |
" <th>{i18n_fascicule}</th>" +
|
|
|
270 |
" <th>{i18n_page}</th>" +
|
883 |
jpm |
271 |
" </tr>"+
|
|
|
272 |
" </thead>"+
|
|
|
273 |
" <tbody>"+
|
|
|
274 |
" {lignes}"+
|
|
|
275 |
" </tbody>"+
|
|
|
276 |
"</table>";
|
|
|
277 |
}
|
|
|
278 |
|
|
|
279 |
private void initialiserLignePublicationLieeTpl() {
|
|
|
280 |
lignePublicationLieeTpl =
|
|
|
281 |
"<tr>"+
|
|
|
282 |
" <td>{auteur}</td>"+
|
|
|
283 |
" <td>{titre}</td>"+
|
961 |
jpm |
284 |
" <td>{revue}</td>"+
|
|
|
285 |
" <td>{editeur}</td>"+
|
|
|
286 |
" <td>{annee}</td>"+
|
|
|
287 |
" <td>{nvt}</td>"+
|
|
|
288 |
" <td>{fascicule}</td>"+
|
|
|
289 |
" <td>{page}</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 />"+
|
|
|
455 |
" <span class='{css_label}'>{i18n_type_donnee} :</span> {type_donnee}<br />"+
|
630 |
jp_milcent |
456 |
" </div>"+
|
|
|
457 |
" <hr class='{css_clear}'/>"+
|
|
|
458 |
"</div>";
|
|
|
459 |
}
|
|
|
460 |
|
997 |
jpm |
461 |
private void initialiserCommentaireTpl() {
|
|
|
462 |
commentaireTpl =
|
|
|
463 |
"<div class='{css_corps}'>"+
|
|
|
464 |
" <h2>{i18n_titre_commentaire}</h2>"+
|
|
|
465 |
" {tableau_commentaires_liees}"+
|
|
|
466 |
"</div>";
|
|
|
467 |
}
|
|
|
468 |
|
|
|
469 |
private void initialiserTableauCommentairesLieesTpl() {
|
|
|
470 |
tableauCommentairesLieesTpl =
|
|
|
471 |
"<table>"+
|
|
|
472 |
" <thead>"+
|
|
|
473 |
" <tr>" +
|
|
|
474 |
" <th>{i18n_type}</th>" +
|
|
|
475 |
" <th>{i18n_titre}</th>" +
|
|
|
476 |
" <th>{i18n_ponderation}</th>" +
|
|
|
477 |
" <th>{i18n_public}</th>" +
|
|
|
478 |
" </tr>"+
|
|
|
479 |
" </thead>"+
|
|
|
480 |
" <tbody>"+
|
|
|
481 |
" {lignes}"+
|
|
|
482 |
" </tbody>"+
|
|
|
483 |
"</table>";
|
|
|
484 |
}
|
|
|
485 |
|
|
|
486 |
private void initialiserLigneCommentaireLieeTpl() {
|
|
|
487 |
ligneCommentaireLieeTpl =
|
|
|
488 |
"<tr>"+
|
|
|
489 |
" <td>{type}</td>"+
|
|
|
490 |
" <td>{titre}</td>"+
|
|
|
491 |
" <td>{ponderation}</td>"+
|
|
|
492 |
" <td>{public}</td>"+
|
|
|
493 |
"</tr>"+
|
|
|
494 |
"<tr>"+
|
|
|
495 |
" <td colspan='4'>{texte}</td>"+
|
|
|
496 |
"</tr>";
|
|
|
497 |
}
|
|
|
498 |
|
453 |
jp_milcent |
499 |
private void chargerOntologie() {
|
961 |
jpm |
500 |
String[] listesCodes = {"typeCollectionBota", "typeCollectionNcd", "typeDepot", "groupementPrincipe",
|
|
|
501 |
"realisationBut", "onpi", "ea", "typeClassement", "relationPersonneCollection", "ion",
|
969 |
jpm |
502 |
"typeUniteRangement", "etat", "typeUniteBase", "typePapier", "methodeRangement", "methodeFixation",
|
|
|
503 |
"methodeFixationSurSpecimen", "typeEcriture", "poisonTraitement", "insecteTraitement", "specimenDegradation",
|
|
|
504 |
"niveauImportance", "supportDegradation", "niveauDetermination", "natureVegetale", "siecleNaturaliste",
|
975 |
jpm |
505 |
"dateDebut", "dateFin", "etat", "onep", "onp", "inventaireForme", "inventaireLogiciel", "inventaireEtat",
|
997 |
jpm |
506 |
"etatClassement", "typeCommentaireCollection"};
|
813 |
jpm |
507 |
lancerChargementListesValeurs(listesCodes);
|
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 ProjetListe) {
|
|
|
515 |
projets = (ProjetListe) nouvellesDonnees;
|
813 |
jpm |
516 |
projetsChargementOk = true;
|
811 |
jpm |
517 |
} else if (nouvellesDonnees instanceof ValeurListe) {
|
813 |
jpm |
518 |
ValeurListe listeValeursReceptionnee = (ValeurListe) nouvellesDonnees;
|
816 |
jpm |
519 |
receptionerListeValeurs(listeValeursReceptionnee);
|
883 |
jpm |
520 |
} else if (nouvellesDonnees instanceof Information) {
|
|
|
521 |
Information info = (Information) nouvellesDonnees;
|
|
|
522 |
if (info.getType().equals("liste_collection_a_personne")) {
|
|
|
523 |
lierCollectionAPersonne((CollectionAPersonneListe) info.getDonnee(0));
|
|
|
524 |
} else if (info.getType().equals("liste_collection_a_publication")) {
|
|
|
525 |
lierCollectionAPublication((CollectionAPublicationListe) info.getDonnee(0));
|
997 |
jpm |
526 |
} else if (info.getType().equals("liste_collection_a_commentaire")) {
|
|
|
527 |
lierCollectionACommentaire((CollectionACommentaireListe) info.getDonnee(0));
|
883 |
jpm |
528 |
}
|
453 |
jp_milcent |
529 |
} else {
|
950 |
jpm |
530 |
Debug.log(Mediateur.i18nM.erreurRafraichir(nouvellesDonnees.getClass(), this.getClass()));
|
453 |
jp_milcent |
531 |
}
|
813 |
jpm |
532 |
|
|
|
533 |
if (avoirDonneesChargees()) {
|
|
|
534 |
afficherDetail();
|
|
|
535 |
}
|
453 |
jp_milcent |
536 |
}
|
|
|
537 |
|
883 |
jpm |
538 |
protected void lierCollectionAPersonne(CollectionAPersonneListe personnes) {
|
|
|
539 |
collection.setPersonnesLiees(personnes);
|
|
|
540 |
personnesLieesChargementOk = true;
|
|
|
541 |
}
|
|
|
542 |
|
|
|
543 |
protected void lierCollectionAPublication(CollectionAPublicationListe publications) {
|
|
|
544 |
collection.setPublicationsLiees(publications);
|
|
|
545 |
publicationsLieesChargementOk = true;
|
|
|
546 |
}
|
|
|
547 |
|
997 |
jpm |
548 |
protected void lierCollectionACommentaire(CollectionACommentaireListe commentaires) {
|
|
|
549 |
collection.setCommentairesLiees(commentaires);
|
|
|
550 |
commentairesLieesChargementOk = true;
|
|
|
551 |
}
|
|
|
552 |
|
813 |
jpm |
553 |
private boolean avoirDonneesChargees() {
|
|
|
554 |
boolean ok = false;
|
997 |
jpm |
555 |
if (projetsChargementOk && collectionChargementOk && ontologieChargementOk && personnesLieesChargementOk && publicationsLieesChargementOk && commentairesLieesChargementOk) {
|
813 |
jpm |
556 |
ok = true;
|
|
|
557 |
}
|
|
|
558 |
return ok;
|
|
|
559 |
}
|
|
|
560 |
|
453 |
jp_milcent |
561 |
private void afficherDetail() {
|
|
|
562 |
if (collection != null) {
|
|
|
563 |
afficherEntete();
|
|
|
564 |
afficherIdentification();
|
883 |
jpm |
565 |
afficherPersonne();
|
687 |
jp_milcent |
566 |
afficherPublication();
|
630 |
jp_milcent |
567 |
afficherDescription();
|
|
|
568 |
afficherContenu();
|
|
|
569 |
afficherInventaire();
|
997 |
jpm |
570 |
afficherCommentaire();
|
453 |
jp_milcent |
571 |
}
|
|
|
572 |
layout();
|
|
|
573 |
}
|
|
|
574 |
|
|
|
575 |
private void afficherEntete() {
|
|
|
576 |
Params enteteParams = new Params();
|
|
|
577 |
enteteParams.set("css_id", ComposantId.ZONE_DETAIL_ENTETE);
|
|
|
578 |
enteteParams.set("css_meta", ComposantClass.META);
|
|
|
579 |
|
813 |
jpm |
580 |
enteteParams.set("i18n_id", i18nC.id());
|
|
|
581 |
|
453 |
jp_milcent |
582 |
enteteParams.set("nom", collection.getNom());
|
468 |
jp_milcent |
583 |
enteteParams.set("structure", collection.getStructureNom());
|
453 |
jp_milcent |
584 |
enteteParams.set("id", collection.getId());
|
|
|
585 |
enteteParams.set("guid", collection.getGuid());
|
|
|
586 |
enteteParams.set("projet", construireTxtProjet(collection.getIdProjet()));
|
|
|
587 |
|
|
|
588 |
String eHtml = Format.substitute(enteteTpl, enteteParams);
|
|
|
589 |
entete.getElement().setInnerHTML(eHtml);
|
|
|
590 |
}
|
|
|
591 |
|
|
|
592 |
private void afficherIdentification() {
|
|
|
593 |
Params generalParams = new Params();
|
|
|
594 |
generalParams.set("i18n_titre_identification", i18nC.titreAdministratif());
|
961 |
jpm |
595 |
generalParams.set("i18n_nom_alternatif", i18nC.intituleAlternatifCollection());
|
477 |
jp_milcent |
596 |
generalParams.set("i18n_mere", i18nC.collectionMere());
|
687 |
jp_milcent |
597 |
generalParams.set("i18n_type_ncd", i18nC.typeCollectionNcd());
|
|
|
598 |
generalParams.set("i18n_type_depot", i18nC.typeDepot());
|
961 |
jpm |
599 |
generalParams.set("i18n_id_alternatif", i18nC.idAlternatifCollection());
|
|
|
600 |
generalParams.set("i18n_code", i18nC.codeAlternatifCollection());
|
|
|
601 |
generalParams.set("i18n_cote", i18nC.cote());
|
|
|
602 |
|
630 |
jp_milcent |
603 |
generalParams.set("i18n_general_collection_titre", i18nC.collectionGeneralTitre());
|
477 |
jp_milcent |
604 |
generalParams.set("i18n_description", i18nC.description());
|
|
|
605 |
generalParams.set("i18n_description_specialiste", i18nC.descriptionSpecialiste());
|
|
|
606 |
generalParams.set("i18n_historique", i18nC.historique());
|
|
|
607 |
generalParams.set("i18n_web", i18nC.siteWeb());
|
961 |
jpm |
608 |
|
|
|
609 |
generalParams.set("i18n_couverture_collection_titre", i18nC.collectionCouvertureTitre());
|
477 |
jp_milcent |
610 |
generalParams.set("i18n_groupement_principe", i18nC.groupementPrincipe());
|
|
|
611 |
generalParams.set("i18n_groupement_but", i18nC.groupementBut());
|
961 |
jpm |
612 |
generalParams.set("i18n_couverture_geo", i18nC.couvertureGeo());
|
477 |
jp_milcent |
613 |
|
961 |
jpm |
614 |
generalParams.set("i18n_specimen_type_titre", i18nC.collectionSpecimenTypeTitre());
|
|
|
615 |
generalParams.set("i18n_specimen_type_presence", i18nC.specimenTypeCollectionDetail());
|
|
|
616 |
generalParams.set("i18n_specimen_type_nombre", i18nC.nbreSpecimenTypeCollectionDetail());
|
|
|
617 |
generalParams.set("i18n_specimen_type_classement", i18nC.classementSpecimenTypeCollectionDetail());
|
|
|
618 |
|
630 |
jp_milcent |
619 |
String nomAlternatif = construireTxtTruck(collection.getNomAlternatif());
|
|
|
620 |
String typeNcd = construireTxtListeOntologie(collection.getTypeNcd());
|
|
|
621 |
String typeDepot = construireTxtListeOntologie(collection.getTypeDepot());
|
961 |
jpm |
622 |
String idAlternatif = construireTxtTruck(collection.getIdAlternatif());
|
|
|
623 |
String code = construireTxtTruck(collection.getCode());
|
|
|
624 |
|
|
|
625 |
String urls = construireTxtTruck(collection.getUrls());
|
|
|
626 |
|
875 |
jpm |
627 |
String groupementBut = construireTxtListeOntologie(collection.getGroupementBut());
|
|
|
628 |
String groupementPrincipe = construireTxtListeOntologie(collection.getGroupementPrincipe());
|
961 |
jpm |
629 |
String couvertureGeo = construireTxtTruck(collection.getCouvertureLieu());
|
|
|
630 |
String specimenTypePresence = construireTxtListeOntologie(collection.getSpecimenType());
|
|
|
631 |
String specimenTypeNombrePrecision = construireTxtListeOntologie(collection.getSpecimenTypeNbrePrecision());
|
|
|
632 |
String specimenTypeNombre = "";
|
975 |
jpm |
633 |
if (!collection.getSpecimenTypeNbre().equals("0") && !collection.getSpecimenTypeNbre().equals("")) {
|
961 |
jpm |
634 |
specimenTypeNombre = collection.getSpecimenTypeNbre()+" ("+specimenTypeNombrePrecision+")";
|
|
|
635 |
}
|
|
|
636 |
String specimenTypeClassement = construireTxtListeOntologie(collection.getSpecimenTypeClassement());
|
630 |
jp_milcent |
637 |
|
|
|
638 |
generalParams.set("nom_alternatif", nomAlternatif);
|
|
|
639 |
generalParams.set("mere", collection.getCollectionMereNom());
|
687 |
jp_milcent |
640 |
generalParams.set("type_ncd", typeNcd);
|
|
|
641 |
generalParams.set("type_depot", typeDepot);
|
961 |
jpm |
642 |
generalParams.set("id_alternatif", idAlternatif);
|
|
|
643 |
generalParams.set("code", code);
|
|
|
644 |
generalParams.set("cote", collection.getCote());
|
|
|
645 |
|
477 |
jp_milcent |
646 |
generalParams.set("description", collection.getDescription());
|
|
|
647 |
generalParams.set("description_specialiste", collection.getDescriptionSpecialiste());
|
630 |
jp_milcent |
648 |
generalParams.set("historique", collection.getHistorique());
|
|
|
649 |
generalParams.set("web", urls);
|
961 |
jpm |
650 |
|
875 |
jpm |
651 |
generalParams.set("groupement_principe", groupementPrincipe);
|
|
|
652 |
generalParams.set("groupement_but", groupementBut);
|
961 |
jpm |
653 |
generalParams.set("couverture_geo", couvertureGeo);
|
453 |
jp_milcent |
654 |
|
961 |
jpm |
655 |
generalParams.set("specimen_type_presence", specimenTypePresence);
|
|
|
656 |
generalParams.set("specimen_type_nombre", specimenTypeNombre);
|
|
|
657 |
generalParams.set("specimen_type_classement", specimenTypeClassement);
|
|
|
658 |
|
453 |
jp_milcent |
659 |
afficherOnglet(generalTpl, generalParams, generalOnglet);
|
|
|
660 |
}
|
|
|
661 |
|
883 |
jpm |
662 |
private void afficherPersonne() {
|
|
|
663 |
String tableauPersonneHtml = "";
|
914 |
jpm |
664 |
if (collection.getPersonnesLiees() != null && collection.getPersonnesLiees().size() > 0) {
|
883 |
jpm |
665 |
tableauPersonneHtml = construireTableauPersonnesLiees();
|
|
|
666 |
}
|
630 |
jp_milcent |
667 |
|
883 |
jpm |
668 |
Params personneParams = new Params();
|
|
|
669 |
personneParams.set("i18n_titre_personne", i18nC.collectionPersonneTitre());
|
|
|
670 |
personneParams.set("tableau_personnes_liees", tableauPersonneHtml);
|
|
|
671 |
|
|
|
672 |
afficherOnglet(personneTpl, personneParams, personneOnglet);
|
630 |
jp_milcent |
673 |
}
|
|
|
674 |
|
883 |
jpm |
675 |
private String construireTableauPersonnesLiees() {
|
|
|
676 |
Params contenuParams = new Params();
|
961 |
jpm |
677 |
contenuParams.set("i18n_relation", i18nC.typeRelationPersonneCollection());
|
|
|
678 |
contenuParams.set("i18n_nom_complet", i18nC.personneNomComplet());
|
883 |
jpm |
679 |
contenuParams.set("i18n_prenom", i18nC.personnePrenom());
|
|
|
680 |
contenuParams.set("i18n_nom", i18nC.personneNom());
|
961 |
jpm |
681 |
contenuParams.set("i18n_naissance_date", i18nC.personneDateNaissance());
|
|
|
682 |
contenuParams.set("i18n_naissance_lieu", i18nC.personneLieuNaissance());
|
|
|
683 |
contenuParams.set("i18n_etre_decede", i18nC.personneDeces());
|
|
|
684 |
contenuParams.set("i18n_deces_date", i18nC.personneDateDeces());
|
|
|
685 |
contenuParams.set("i18n_deces_lieu", i18nC.personneLieuDeces());
|
883 |
jpm |
686 |
|
|
|
687 |
String lignesPersonnel = "";
|
968 |
jpm |
688 |
if (collection.getPersonnesLiees() != null) {
|
|
|
689 |
Iterator<String> it = collection.getPersonnesLiees().keySet().iterator();
|
|
|
690 |
while (it.hasNext()) {
|
|
|
691 |
CollectionAPersonne relationCollectionAPersonne = collection.getPersonnesLiees().get(it.next());
|
|
|
692 |
Personne personne = relationCollectionAPersonne.getPersonne();
|
|
|
693 |
|
|
|
694 |
String relation = construireTxtListeOntologie(relationCollectionAPersonne.getIdRole());
|
|
|
695 |
String etreDecede = construireTxtListeOntologie(personne.getDeces());
|
|
|
696 |
|
|
|
697 |
Params ligneParams = new Params();
|
|
|
698 |
ligneParams.set("relation", relation);
|
|
|
699 |
ligneParams.set("nom_complet", personne.getNomComplet());
|
|
|
700 |
ligneParams.set("nom", personne.getNom());
|
|
|
701 |
ligneParams.set("prenom", personne.getPrenom());
|
|
|
702 |
ligneParams.set("naissance_date", personne.getNaissanceDate());
|
|
|
703 |
ligneParams.set("naissance_lieu", personne.getNaissanceLieu());
|
|
|
704 |
ligneParams.set("etre_decede", etreDecede);
|
|
|
705 |
ligneParams.set("deces_date", personne.getDecesDate());
|
|
|
706 |
ligneParams.set("deces_lieu", personne.getDecesLieu());
|
|
|
707 |
|
|
|
708 |
lignesPersonnel += Format.substitute(lignePersonneLieeTpl, ligneParams);
|
|
|
709 |
}
|
|
|
710 |
}
|
883 |
jpm |
711 |
|
968 |
jpm |
712 |
String cHtml = i18nC.nonRenseigne();
|
|
|
713 |
if (!UtilString.isEmpty(lignesPersonnel)) {
|
|
|
714 |
contenuParams.set("lignes", lignesPersonnel);
|
|
|
715 |
cHtml = Format.substitute(tableauPersonnesLieesTpl, contenuParams);
|
883 |
jpm |
716 |
}
|
|
|
717 |
return cHtml;
|
|
|
718 |
}
|
|
|
719 |
|
687 |
jp_milcent |
720 |
private void afficherPublication() {
|
|
|
721 |
Params publicationParams = new Params();
|
|
|
722 |
publicationParams.set("i18n_titre_publication", i18nC.collectionPublicationTitre());
|
|
|
723 |
|
883 |
jpm |
724 |
String tableauPublicationHtml = "";
|
914 |
jpm |
725 |
if (collection.getPersonnesLiees() != null && collection.getPersonnesLiees().size() > 0) {
|
883 |
jpm |
726 |
tableauPublicationHtml = construireTableauPublicationsLiees();
|
|
|
727 |
}
|
|
|
728 |
publicationParams.set("tableau_publications_liees", tableauPublicationHtml);
|
|
|
729 |
|
687 |
jp_milcent |
730 |
afficherOnglet(publicationTpl, publicationParams, publicationOnglet);
|
|
|
731 |
}
|
|
|
732 |
|
883 |
jpm |
733 |
private String construireTableauPublicationsLiees() {
|
|
|
734 |
Params contenuParams = new Params();
|
|
|
735 |
contenuParams.set("i18n_auteur", i18nC.publicationAuteurs());
|
|
|
736 |
contenuParams.set("i18n_titre", i18nC.publicationTitre());
|
961 |
jpm |
737 |
contenuParams.set("i18n_revue", i18nC.publicationRevueCollection());
|
|
|
738 |
contenuParams.set("i18n_editeur", i18nC.publicationEditeur());
|
|
|
739 |
contenuParams.set("i18n_annee", i18nC.publicationDateParution());
|
|
|
740 |
contenuParams.set("i18n_nvt", i18nC.publicationNvt());
|
|
|
741 |
contenuParams.set("i18n_fascicule", i18nC.publicationFascicule());
|
|
|
742 |
contenuParams.set("i18n_page", i18nC.publicationPage());
|
883 |
jpm |
743 |
|
|
|
744 |
String lignesPublication = "";
|
968 |
jpm |
745 |
if (collection.getPublicationsLiees() != null) {
|
|
|
746 |
Iterator<String> it = collection.getPublicationsLiees().keySet().iterator();
|
|
|
747 |
while (it.hasNext()) {
|
|
|
748 |
CollectionAPublication relationCollectionAPublication = collection.getPublicationsLiees().get(it.next());
|
|
|
749 |
Publication publication = relationCollectionAPublication.getPublication();
|
|
|
750 |
Params ligneParams = new Params();
|
|
|
751 |
|
|
|
752 |
ligneParams.set("auteur", publication.getAuteur());
|
|
|
753 |
ligneParams.set("titre", publication.getTitre());
|
|
|
754 |
ligneParams.set("revue", publication.getCollection());
|
|
|
755 |
ligneParams.set("editeur", publication.getEditeur());
|
|
|
756 |
ligneParams.set("annee", publication.getAnneeParution());
|
|
|
757 |
ligneParams.set("nvt", publication.getIndicationNvt());
|
|
|
758 |
ligneParams.set("fascicule", publication.getFascicule());
|
|
|
759 |
ligneParams.set("page", publication.getPages());
|
|
|
760 |
lignesPublication += Format.substitute(lignePublicationLieeTpl, ligneParams);
|
|
|
761 |
}
|
883 |
jpm |
762 |
}
|
968 |
jpm |
763 |
|
|
|
764 |
String cHtml = i18nC.nonRenseigne();
|
|
|
765 |
if (!UtilString.isEmpty(lignesPublication)) {
|
|
|
766 |
contenuParams.set("lignes", lignesPublication);
|
|
|
767 |
cHtml = Format.substitute(tableauPublicationsLieesTpl, contenuParams);
|
|
|
768 |
}
|
883 |
jpm |
769 |
return cHtml;
|
|
|
770 |
}
|
|
|
771 |
|
630 |
jp_milcent |
772 |
private void afficherDescription() {
|
|
|
773 |
Params descriptionParams = new Params();
|
|
|
774 |
descriptionParams.set("i18n_titre_description", i18nC.collectionDescriptionTitre());
|
875 |
jpm |
775 |
descriptionParams.set("i18n_type_botanique", i18nC.typeCollectionBotanique());
|
|
|
776 |
descriptionParams.set("i18n_nbre_echantillon", i18nC.nbreEchantillon());
|
630 |
jp_milcent |
777 |
|
961 |
jpm |
778 |
descriptionParams.set("i18n_titre_unite_rangement", i18nC.collectionUniteRangementTitre());
|
966 |
jpm |
779 |
descriptionParams.set("i18n_etat_unite_rangement", i18nC.collectionUniteRangementEtatGeneralDetail());
|
961 |
jpm |
780 |
descriptionParams.set("i18n_titre_unite_base", i18nC.collectionUniteBaseTitre());
|
|
|
781 |
|
|
|
782 |
descriptionParams.set("i18n_titre_conservation", i18nC.collectionTitreConservation());
|
|
|
783 |
descriptionParams.set("i18n_type_papier", i18nC.typePapierConservationDetail());
|
|
|
784 |
descriptionParams.set("i18n_conservation_methode", i18nC.methodeConservationDetail());
|
|
|
785 |
|
|
|
786 |
descriptionParams.set("i18n_titre_etiquette", i18nC.collectionTitreEtiquette());
|
|
|
787 |
descriptionParams.set("i18n_specimen_fixation_pourcent", i18nC.specimenFixationPourcent());
|
|
|
788 |
descriptionParams.set("i18n_etiquette_fixation_pourcent", i18nC.etiquetteFixationPourcent());
|
|
|
789 |
descriptionParams.set("i18n_specimen_fixation_methode", i18nC.specimenMethodeFixationDetail());
|
|
|
790 |
descriptionParams.set("i18n_etiquette_fixation_methode_support", i18nC.etiquetteMethodeFixationSurSupportDetail());
|
|
|
791 |
descriptionParams.set("i18n_etiquette_fixation_methode_specimen", i18nC.etiquetteMethodeFixationSurSpecimenDetail());
|
|
|
792 |
descriptionParams.set("i18n_etiquette_type_ecriture", i18nC.typeEcritureDetail());
|
|
|
793 |
|
|
|
794 |
descriptionParams.set("i18n_titre_traitement", i18nC.collectionTitreTraitement());
|
|
|
795 |
descriptionParams.set("i18n_traitement", i18nC.collectionTraitementDetail());
|
|
|
796 |
descriptionParams.set("i18n_traitement_poison", i18nC.collectionTraitementPoisonDetail());
|
|
|
797 |
descriptionParams.set("i18n_traitement_insecte", i18nC.collectionTraitementInsecteDetail());
|
|
|
798 |
|
966 |
jpm |
799 |
descriptionParams.set("i18n_titre_etat_degradation", i18nC.collectionTitreEtatEtDegradation());
|
|
|
800 |
descriptionParams.set("i18n_etat_general", i18nC.collectionEtatGeneralDetail());
|
|
|
801 |
descriptionParams.set("i18n_degradation_specimen", i18nC.degradationSpecimenDetail());
|
|
|
802 |
descriptionParams.set("i18n_degradation_presentation", i18nC.degradationPresentationDetail());
|
|
|
803 |
descriptionParams.set("i18n_determination", i18nC.collectionDeterminationDetail());
|
|
|
804 |
|
875 |
jpm |
805 |
String typeBota = construireTxtListeOntologie(collection.getBotanique().getType());
|
|
|
806 |
descriptionParams.set("type_botanique", typeBota);
|
|
|
807 |
descriptionParams.set("nbre_echantillon", collection.getBotanique().getNbreEchantillon());
|
|
|
808 |
|
961 |
jpm |
809 |
CollectionBotanique collectionBotanique = collection.getBotanique();
|
|
|
810 |
String etatUniteRangement = construireTxtListeOntologie(collectionBotanique.getUniteRangementEtat());
|
|
|
811 |
String tableauUniteRangementHtml = construireTableauUniteRangement();
|
|
|
812 |
String tableauUniteBaseHtml = construireTableauUniteBase();
|
|
|
813 |
descriptionParams.set("tableau_unite_rangement", tableauUniteRangementHtml);
|
|
|
814 |
descriptionParams.set("etat_unite_rangement", etatUniteRangement);
|
|
|
815 |
descriptionParams.set("tableau_unite_base", tableauUniteBaseHtml);
|
|
|
816 |
|
|
|
817 |
String typePapier = construireTxtListeOntologie(collectionBotanique.getConservationPapierType());
|
|
|
818 |
String conservationMethode = construireTxtListeOntologie(collectionBotanique.getConservationMethode());
|
|
|
819 |
descriptionParams.set("type_papier", typePapier);
|
|
|
820 |
descriptionParams.set("conservation_methode", conservationMethode);
|
|
|
821 |
|
|
|
822 |
String specimenFixationMethode = construireTxtListeOntologie(collectionBotanique.getSpecimenFixationMethode());
|
|
|
823 |
String etiquetteFixationMethodeSupport = construireTxtListeOntologie(collectionBotanique.getEtiquetteFixationSupport());
|
|
|
824 |
String etiquetteFixationMethodeSpecimen = construireTxtListeOntologie(collectionBotanique.getEtiquetteFixationSpecimen());
|
|
|
825 |
String etiquetteTypeEcriture = construireTxtListeOntologie(collectionBotanique.getEtiquetteEcriture());
|
|
|
826 |
descriptionParams.set("specimen_fixation_pourcent", collectionBotanique.getSpecimenFixationPourcent());
|
|
|
827 |
descriptionParams.set("etiquette_fixation_pourcent", collectionBotanique.getEtiquetteFixationPourcent());
|
|
|
828 |
descriptionParams.set("specimen_fixation_methode", specimenFixationMethode);
|
|
|
829 |
descriptionParams.set("etiquette_fixation_methode_support", etiquetteFixationMethodeSupport);
|
|
|
830 |
descriptionParams.set("etiquette_fixation_methode_specimen", etiquetteFixationMethodeSpecimen);
|
|
|
831 |
descriptionParams.set("etiquette_type_ecriture", etiquetteTypeEcriture);
|
|
|
832 |
|
|
|
833 |
String traitement = construireTxtListeOntologie(collectionBotanique.getTraitement());
|
|
|
834 |
String traitementPoison = construireTxtListeOntologie(collectionBotanique.getTraitementPoison());
|
|
|
835 |
String traitementInsecte = construireTxtListeOntologie(collectionBotanique.getTraitementInsecte());
|
|
|
836 |
descriptionParams.set("traitement", traitement);
|
|
|
837 |
descriptionParams.set("traitement_poison", traitementPoison);
|
|
|
838 |
descriptionParams.set("traitement_insecte", traitementInsecte);
|
|
|
839 |
|
966 |
jpm |
840 |
String etatGeneral = construireTxtListeOntologie(collectionBotanique.getEtatGeneral());
|
|
|
841 |
boolean valeurEstOntologie = false;
|
|
|
842 |
boolean typeEstOntologie = true;
|
|
|
843 |
boolean donneeEstOntologie = true;
|
|
|
844 |
String degradationSpecimen = construireTxtListeOntologie(collectionBotanique.getDegradationSpecimen(), valeurEstOntologie, typeEstOntologie, donneeEstOntologie);
|
|
|
845 |
String degradationPresentation = construireTxtListeOntologie(collectionBotanique.getDegradationPresentation(), valeurEstOntologie, typeEstOntologie, donneeEstOntologie);
|
|
|
846 |
String determination = construireTxtListeOntologie(collectionBotanique.getDetermination());
|
|
|
847 |
descriptionParams.set("etat_general", etatGeneral);
|
|
|
848 |
descriptionParams.set("degradation_specimen", degradationSpecimen);
|
|
|
849 |
descriptionParams.set("degradation_presentation", degradationPresentation);
|
|
|
850 |
descriptionParams.set("determination", determination);
|
|
|
851 |
|
630 |
jp_milcent |
852 |
afficherOnglet(descriptionTpl, descriptionParams, descriptionOnglet);
|
|
|
853 |
}
|
|
|
854 |
|
961 |
jpm |
855 |
private String construireTableauUniteRangement() {
|
|
|
856 |
Params contenuParams = new Params();
|
|
|
857 |
contenuParams.set("i18n_type", i18nC.collectionUniteType());
|
|
|
858 |
contenuParams.set("i18n_nombre", i18nC.collectionUniteNbre());
|
|
|
859 |
contenuParams.set("i18n_precision", i18nC.collectionUnitePrecision());
|
|
|
860 |
contenuParams.set("i18n_format", i18nC.collectionUniteFormat());
|
|
|
861 |
|
|
|
862 |
CollectionBotanique collectionBotanique = collection.getBotanique();
|
|
|
863 |
HashMap<String,UniteRangement> unites = CollectionFormDescription.parserValeurUniteRangement(collectionBotanique.getUniteRangement());
|
|
|
864 |
|
|
|
865 |
String lignesUnite = "";
|
|
|
866 |
Iterator<String> it = unites.keySet().iterator();
|
|
|
867 |
while (it.hasNext()) {
|
|
|
868 |
String cle = it.next();
|
|
|
869 |
UniteRangement unite = unites.get(cle);
|
|
|
870 |
if (unite.getNombre() != 0) {
|
|
|
871 |
Params ligneParams = new Params();
|
|
|
872 |
if (unite.getTypeAutre()) {
|
|
|
873 |
ligneParams.set("type", unite.getType());
|
|
|
874 |
} else {
|
|
|
875 |
ligneParams.set("type", construireTxtListeOntologie(unite.getId()));
|
|
|
876 |
}
|
|
|
877 |
ligneParams.set("nombre", UtilNombre.formaterEnEntier(unite.getNombre()));
|
|
|
878 |
ligneParams.set("precision", unite.getPrecision());
|
|
|
879 |
ligneParams.set("format", unite.getFormat());
|
|
|
880 |
|
|
|
881 |
lignesUnite += Format.substitute(ligneUniteRangementTpl, ligneParams);
|
|
|
882 |
}
|
|
|
883 |
}
|
|
|
884 |
|
|
|
885 |
String cHtml = i18nC.nonRenseigne();
|
|
|
886 |
if (!UtilString.isEmpty(lignesUnite)) {
|
|
|
887 |
contenuParams.set("lignes", lignesUnite);
|
|
|
888 |
cHtml = Format.substitute(tableauUniteRangementTpl, contenuParams);
|
|
|
889 |
}
|
|
|
890 |
return cHtml;
|
|
|
891 |
}
|
|
|
892 |
|
|
|
893 |
private String construireTableauUniteBase() {
|
|
|
894 |
Params contenuParams = new Params();
|
|
|
895 |
contenuParams.set("i18n_unite_base", i18nC.collectionUniteBase());
|
|
|
896 |
contenuParams.set("i18n_part", i18nC.collectionUniteBasePart());
|
|
|
897 |
contenuParams.set("i18n_sp", i18nC.collectionUniteBaseSp());
|
|
|
898 |
|
|
|
899 |
contenuParams.set("i18n_type", i18nC.collectionUniteType());
|
|
|
900 |
contenuParams.set("i18n_nombre", i18nC.collectionUniteNbre());
|
|
|
901 |
contenuParams.set("i18n_precision", i18nC.collectionUnitePrecision());
|
|
|
902 |
contenuParams.set("i18n_format", i18nC.collectionUniteFormat());
|
|
|
903 |
|
|
|
904 |
CollectionBotanique collectionBotanique = collection.getBotanique();
|
|
|
905 |
HashMap<String,UniteBase> unites = CollectionFormDescription.parserValeurUniteBase(collectionBotanique.getUniteBase());
|
|
|
906 |
|
|
|
907 |
String lignesUnite = "";
|
|
|
908 |
Iterator<String> it = unites.keySet().iterator();
|
|
|
909 |
while (it.hasNext()) {
|
|
|
910 |
String cle = it.next();
|
|
|
911 |
UniteBase unite = unites.get(cle);
|
|
|
912 |
if (unite.getNombre() != 0 || unite.getNombrePart() != 0 || unite.getNombreSp() != 0) {
|
|
|
913 |
Params ligneParams = new Params();
|
|
|
914 |
if (unite.getTypeAutre()) {
|
|
|
915 |
ligneParams.set("type", unite.getType());
|
|
|
916 |
} else {
|
|
|
917 |
ligneParams.set("type", construireTxtListeOntologie(unite.getId()));
|
|
|
918 |
}
|
|
|
919 |
ligneParams.set("nombre", UtilNombre.formaterEnEntier(unite.getNombre()));
|
|
|
920 |
ligneParams.set("precision", unite.getPrecision());
|
|
|
921 |
ligneParams.set("format", unite.getFormat());
|
975 |
jpm |
922 |
ligneParams.set("part_nombre", UtilNombre.formaterEnEntier(unite.getNombrePart()));
|
961 |
jpm |
923 |
ligneParams.set("part_precision", unite.getPrecisionPart());
|
975 |
jpm |
924 |
ligneParams.set("sp_nombre", UtilNombre.formaterEnEntier(unite.getNombreSp()));
|
961 |
jpm |
925 |
ligneParams.set("sp_precision", unite.getPrecisionSp());
|
|
|
926 |
|
|
|
927 |
lignesUnite += Format.substitute(ligneUniteBaseTpl, ligneParams);
|
|
|
928 |
}
|
|
|
929 |
}
|
|
|
930 |
|
|
|
931 |
String cHtml = i18nC.nonRenseigne();
|
|
|
932 |
if (!UtilString.isEmpty(lignesUnite)) {
|
|
|
933 |
contenuParams.set("lignes", lignesUnite);
|
|
|
934 |
cHtml = Format.substitute(tableauUniteBaseTpl, contenuParams);
|
|
|
935 |
}
|
|
|
936 |
return cHtml;
|
|
|
937 |
}
|
|
|
938 |
|
630 |
jp_milcent |
939 |
private void afficherContenu() {
|
|
|
940 |
Params contenuParams = new Params();
|
966 |
jpm |
941 |
contenuParams.set("i18n_titre_nature", i18nC.collectionNatureTitre());
|
|
|
942 |
contenuParams.set("i18n_nature", i18nC.natureVegetaleContenuDetail());
|
|
|
943 |
contenuParams.set("i18n_specialite", i18nC.specialiteCollectionDetail());
|
630 |
jp_milcent |
944 |
|
966 |
jpm |
945 |
contenuParams.set("i18n_titre_constitution", i18nC.collectionConstitutionTitre());
|
|
|
946 |
contenuParams.set("i18n_periode", i18nC.periodeConstitutionDetail());
|
|
|
947 |
contenuParams.set("i18n_date_debut", i18nC.dateDebutCollectionDetail());
|
|
|
948 |
contenuParams.set("i18n_date_fin", i18nC.dateFinCollectionDetail());
|
|
|
949 |
|
|
|
950 |
contenuParams.set("i18n_titre_classement", i18nC.collectionClassementTitre());
|
|
|
951 |
contenuParams.set("i18n_classement_etat", i18nC.etatClassementCollectionDetail());
|
|
|
952 |
contenuParams.set("i18n_classement", i18nC.annotationClassementCollectionDetail());
|
|
|
953 |
|
|
|
954 |
contenuParams.set("i18n_titre_etiquette", i18nC.collectionEtiquetteTitre());
|
|
|
955 |
contenuParams.set("i18n_etiquette_renseignement", i18nC.etiquetteRenseignementDetail());
|
|
|
956 |
contenuParams.set("i18n_precision_localite", i18nC.precisionLocaliteDetail());
|
|
|
957 |
contenuParams.set("i18n_precision_date", i18nC.precisionDateDetail());
|
|
|
958 |
contenuParams.set("i18n_etiquette_annotation", i18nC.etiquetteAnnotationDetail());
|
|
|
959 |
|
|
|
960 |
contenuParams.set("i18n_titre_integree", i18nC.collectionIntegreeTitre());
|
|
|
961 |
contenuParams.set("i18n_collection_integration", i18nC.integreCollectionDetail());
|
|
|
962 |
contenuParams.set("i18n_collection_integration_info", i18nC.infoIntegreCollectionDetail());
|
|
|
963 |
|
|
|
964 |
CollectionBotanique collectionBotanique = collection.getBotanique();
|
|
|
965 |
String nature = construireTxtListeOntologie(collectionBotanique.getNature());
|
|
|
966 |
contenuParams.set("nature", nature);
|
|
|
967 |
contenuParams.set("specialite", collectionBotanique.getSpecialite());
|
|
|
968 |
|
|
|
969 |
String periode = construireTxtListeOntologie(collection.getPeriodeConstitution());
|
|
|
970 |
String dateDebut = collectionBotanique.getRecolteDateDebut();
|
|
|
971 |
String dateDebutPrecision = construireTxtListeOntologie(collectionBotanique.getRecolteDateDebutType());
|
|
|
972 |
String dateDebutRecolte = (UtilString.isEmpty(dateDebut)) ? "" : dateDebut+" ("+dateDebutPrecision+")";
|
|
|
973 |
String dateFin = collectionBotanique.getRecolteDateFin();
|
|
|
974 |
String dateFinPrecision = construireTxtListeOntologie(collectionBotanique.getRecolteDateFinType());
|
|
|
975 |
String dateFinRecolte = (UtilString.isEmpty(dateFin)) ? "" : dateFin+" ("+dateFinPrecision+")";
|
|
|
976 |
contenuParams.set("periode", periode);
|
|
|
977 |
contenuParams.set("date_debut", dateDebutRecolte);
|
|
|
978 |
contenuParams.set("date_fin", dateFinRecolte);
|
|
|
979 |
|
|
|
980 |
String classementEtat = construireTxtListeOntologie(collectionBotanique.getClassementEtat());
|
|
|
981 |
contenuParams.set("classement_etat", classementEtat);
|
|
|
982 |
contenuParams.set("classement", collectionBotanique.getClassementAnnotation());
|
|
|
983 |
|
|
|
984 |
String etiquetteRenseignements = "";
|
|
|
985 |
HashMap<String,String> infos = CollectionFormContenu.parserEtiquetteRenseignement(collectionBotanique.getEtiquetteRenseignement());
|
|
|
986 |
if (infos != null) {
|
|
|
987 |
Iterator<String> it = infos.keySet().iterator();
|
|
|
988 |
while (it.hasNext()) {
|
|
|
989 |
String cle = it.next();
|
|
|
990 |
if (cle.equals("AT")) {
|
|
|
991 |
etiquetteRenseignements += i18nC.etiquetteAuteurCollection();
|
|
|
992 |
} else if (cle.equals("F")) {
|
|
|
993 |
etiquetteRenseignements += i18nC.etiquetteFamille();
|
|
|
994 |
} else if (cle.equals("G")) {
|
|
|
995 |
etiquetteRenseignements += i18nC.etiquetteGenre();
|
|
|
996 |
} else if (cle.equals("SP")) {
|
|
|
997 |
etiquetteRenseignements += i18nC.etiquetteSp();
|
|
|
998 |
} else if (cle.equals("ASP")) {
|
|
|
999 |
etiquetteRenseignements += i18nC.etiquetteAuteurSp();
|
|
|
1000 |
} else if (cle.equals("L")) {
|
|
|
1001 |
etiquetteRenseignements += i18nC.etiquetteLocalite();
|
|
|
1002 |
} else if (cle.equals("D")) {
|
|
|
1003 |
etiquetteRenseignements += i18nC.etiquetteDateRecolte();
|
|
|
1004 |
} else {
|
|
|
1005 |
etiquetteRenseignements += i18nC.inconnue();
|
|
|
1006 |
}
|
|
|
1007 |
etiquetteRenseignements += ": "+infos.get(cle)+"%,";
|
|
|
1008 |
}
|
|
|
1009 |
}
|
|
|
1010 |
String precisionLocalite = construireTxtListeOntologie(collectionBotanique.getPrecisionLocalite());
|
|
|
1011 |
String precisionDate = construireTxtListeOntologie(collectionBotanique.getPrecisionDate());
|
|
|
1012 |
contenuParams.set("etiquette_renseignement", etiquetteRenseignements);
|
|
|
1013 |
contenuParams.set("precision_localite", precisionLocalite);
|
|
|
1014 |
contenuParams.set("precision_date", precisionDate);
|
|
|
1015 |
contenuParams.set("etiquette_annotation", collectionBotanique.getAnnotationsDiverses());
|
|
|
1016 |
|
|
|
1017 |
String collectionIntegration = construireTxtListeOntologie(collectionBotanique.getCollectionIntegre());
|
|
|
1018 |
String collectionIntegrationInfo = construireTxtListeOntologie(collectionBotanique.getCollectionIntegreInfo());
|
|
|
1019 |
contenuParams.set("collection_integration", collectionIntegration);
|
|
|
1020 |
contenuParams.set("collection_integration_info", collectionIntegrationInfo);
|
|
|
1021 |
|
630 |
jp_milcent |
1022 |
afficherOnglet(contenuTpl, contenuParams, contenuOnglet);
|
|
|
1023 |
}
|
|
|
1024 |
|
|
|
1025 |
private void afficherInventaire() {
|
|
|
1026 |
Params inventaireParams = new Params();
|
|
|
1027 |
inventaireParams.set("i18n_titre_inventaire", i18nC.collectionInventaireTitre());
|
966 |
jpm |
1028 |
inventaireParams.set("i18n_existence", i18nC.existenceInventaireCollectionDetail());
|
|
|
1029 |
inventaireParams.set("i18n_participation_auteur", i18nC.auteurInventaireCollectionDetail());
|
|
|
1030 |
inventaireParams.set("i18n_forme", i18nC.formeInventaireCollectionDetail());
|
|
|
1031 |
inventaireParams.set("i18n_info", i18nC.infoInventaireCollectionDetail());
|
|
|
1032 |
inventaireParams.set("i18n_digital", i18nC.digitalInventaireCollectionDetail());
|
|
|
1033 |
inventaireParams.set("i18n_digital_pourcent", i18nC.pourcentDigitalInventaireCollectionDetail());
|
|
|
1034 |
inventaireParams.set("i18n_etat", i18nC.etatInventaireCollectionDetail());
|
1210 |
cyprien |
1035 |
//DELETEME inventaireParams.set("i18n_type_donnee", i18nC.typeDonneeInventaireCollectionDetail());
|
630 |
jp_milcent |
1036 |
|
966 |
jpm |
1037 |
CollectionBotanique collectionBotanique = collection.getBotanique();
|
|
|
1038 |
String existence = construireTxtListeOntologie(collectionBotanique.getInventaire());
|
|
|
1039 |
String participationAuteur = construireTxtListeOntologie(collectionBotanique.getInventaireAuteur());
|
|
|
1040 |
String forme = construireTxtListeOntologie(collectionBotanique.getInventaireForme());
|
|
|
1041 |
String digital = construireTxtListeOntologie(collectionBotanique.getInventaireDigital());
|
|
|
1042 |
String digitalPourcent = collectionBotanique.getInventaireDigitalPourcent()+"%";
|
|
|
1043 |
String etat = construireTxtListeOntologie(collectionBotanique.getInventaireEtat());
|
|
|
1044 |
inventaireParams.set("existence", existence);
|
|
|
1045 |
inventaireParams.set("participation_auteur", participationAuteur);
|
|
|
1046 |
inventaireParams.set("forme", forme);
|
|
|
1047 |
inventaireParams.set("info", collectionBotanique.getInventaireInfo());
|
|
|
1048 |
inventaireParams.set("digital", digital);
|
|
|
1049 |
inventaireParams.set("digital_pourcent", digitalPourcent);
|
|
|
1050 |
inventaireParams.set("etat", etat);
|
1210 |
cyprien |
1051 |
//DELETEME inventaireParams.set("type_donnee", collectionBotanique.getInventaireDonneesTypes());
|
966 |
jpm |
1052 |
|
630 |
jp_milcent |
1053 |
afficherOnglet(inventaireTpl, inventaireParams, inventaireOnglet);
|
|
|
1054 |
}
|
|
|
1055 |
|
997 |
jpm |
1056 |
private void afficherCommentaire() {
|
|
|
1057 |
String tableauCommentaireHtml = "";
|
|
|
1058 |
if (collection.getCommentairesLiees() != null && collection.getCommentairesLiees().size() > 0) {
|
|
|
1059 |
tableauCommentaireHtml = construireTableauCommentairesLiees();
|
|
|
1060 |
}
|
|
|
1061 |
|
|
|
1062 |
Params personneParams = new Params();
|
|
|
1063 |
personneParams.set("i18n_titre_commentaire", i18nC.collectionCommentaireTitre());
|
|
|
1064 |
personneParams.set("tableau_commentaires_liees", tableauCommentaireHtml);
|
|
|
1065 |
|
|
|
1066 |
afficherOnglet(commentaireTpl, personneParams, commentaireOnglet);
|
|
|
1067 |
}
|
|
|
1068 |
|
|
|
1069 |
private String construireTableauCommentairesLiees() {
|
|
|
1070 |
Params contenuParams = new Params();
|
|
|
1071 |
contenuParams.set("i18n_type", i18nC.commentaireType());
|
|
|
1072 |
contenuParams.set("i18n_titre", i18nC.commentaireTitre());
|
|
|
1073 |
contenuParams.set("i18n_texte", i18nC.commentaireTexte());
|
|
|
1074 |
contenuParams.set("i18n_ponderation", i18nC.commentairePonderation());
|
|
|
1075 |
contenuParams.set("i18n_public", i18nC.commentairePublic());
|
|
|
1076 |
|
|
|
1077 |
String lignesCommentaire = "";
|
|
|
1078 |
if (collection.getCommentairesLiees() != null) {
|
|
|
1079 |
Iterator<String> it = collection.getCommentairesLiees().keySet().iterator();
|
|
|
1080 |
while (it.hasNext()) {
|
|
|
1081 |
CollectionACommentaire relationCollectionACommentaire = collection.getCommentairesLiees().get(it.next());
|
|
|
1082 |
Commentaire commentaire = relationCollectionACommentaire.getCommentaire();
|
|
|
1083 |
|
|
|
1084 |
String type = construireTxtListeOntologie(relationCollectionACommentaire.getType());
|
|
|
1085 |
String acces = (commentaire.etrePublic() ? i18nC.donneePublic() : i18nC.donneePrivee());
|
|
|
1086 |
|
|
|
1087 |
Params ligneParams = new Params();
|
|
|
1088 |
ligneParams.set("type", type);
|
|
|
1089 |
ligneParams.set("titre", commentaire.getTitre());
|
|
|
1090 |
ligneParams.set("texte", commentaire.getTexte());
|
|
|
1091 |
ligneParams.set("ponderation", commentaire.getPonderation()+"/100");
|
|
|
1092 |
ligneParams.set("public", acces);
|
|
|
1093 |
|
|
|
1094 |
lignesCommentaire += Format.substitute(ligneCommentaireLieeTpl, ligneParams);
|
|
|
1095 |
}
|
|
|
1096 |
}
|
|
|
1097 |
|
|
|
1098 |
String cHtml = i18nC.nonRenseigne();
|
|
|
1099 |
if (!UtilString.isEmpty(lignesCommentaire)) {
|
|
|
1100 |
contenuParams.set("lignes", lignesCommentaire);
|
|
|
1101 |
cHtml = Format.substitute(tableauCommentairesLieesTpl, contenuParams);
|
|
|
1102 |
}
|
|
|
1103 |
return cHtml;
|
|
|
1104 |
}
|
|
|
1105 |
|
468 |
jp_milcent |
1106 |
protected String getNomStructure() {
|
|
|
1107 |
String nomStructure = "";
|
|
|
1108 |
if (structure != null) {
|
|
|
1109 |
nomStructure = structure.getNom();
|
|
|
1110 |
} else {
|
|
|
1111 |
nomStructure = collection.getIdStructure();
|
453 |
jp_milcent |
1112 |
}
|
468 |
jp_milcent |
1113 |
return nomStructure;
|
453 |
jp_milcent |
1114 |
}
|
|
|
1115 |
}
|