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