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();
|
1922 |
delphine |
724 |
String etatUniteRangement = collectionBotanique.getUniteRangementEtat();
|
1920 |
aurelien |
725 |
|
|
|
726 |
descriptionParams.set("i18n_collection_cartons_herbiers", i18nC.collectionCartonsHerbiers());
|
|
|
727 |
descriptionParams.set("i18n_nb_liasses", i18nC.collectionLiasses());
|
|
|
728 |
descriptionParams.set("i18n_autres_unites_rangement", i18nC.collectionAutreUnitesRangement());
|
|
|
729 |
|
|
|
730 |
String cartonsHerbiers = collectionBotanique.getNbCartonsHerbiers();
|
|
|
731 |
if(!collectionBotanique.getNbCartonsHerbiers().trim().isEmpty() &&
|
|
|
732 |
! collectionBotanique.getFormatCartonsHerbiers().trim().isEmpty()) {
|
|
|
733 |
cartonsHerbiers += " - "+i18nC.format()+": ";
|
|
|
734 |
}
|
|
|
735 |
cartonsHerbiers += collectionBotanique.getFormatCartonsHerbiers();
|
|
|
736 |
descriptionParams.set("nb_cartons_herbier", cartonsHerbiers);
|
|
|
737 |
|
|
|
738 |
String liasses = collectionBotanique.getNbLiasses();
|
|
|
739 |
if(!collectionBotanique.getNbLiasses().trim().isEmpty() &&
|
|
|
740 |
! collectionBotanique.getFormatLiasses().trim().isEmpty()) {
|
|
|
741 |
liasses += " - "+i18nC.format()+": ";
|
|
|
742 |
}
|
|
|
743 |
liasses += collectionBotanique.getFormatLiasses();
|
|
|
744 |
descriptionParams.set("nb_liasses", liasses);
|
1918 |
aurelien |
745 |
|
1920 |
aurelien |
746 |
descriptionParams.set("autres_unites_rangement", collectionBotanique.getAutresUnitesRangement().replaceAll("\r\n|\r|\n", ", "));
|
|
|
747 |
|
961 |
jpm |
748 |
descriptionParams.set("etat_unite_rangement", etatUniteRangement);
|
|
|
749 |
|
1918 |
aurelien |
750 |
descriptionParams.set("i18n_nb_planches_herbier", i18nC.collectionNbPlanchesHerbier());
|
|
|
751 |
descriptionParams.set("i18n_nb_especes", i18nC.collectionNbEspeces());
|
|
|
752 |
|
|
|
753 |
descriptionParams.set("nb_planches_herbier", collectionBotanique.getNbPlanchesHerbiers());
|
|
|
754 |
descriptionParams.set("nb_especes", collectionBotanique.getNbEspeces());
|
|
|
755 |
|
961 |
jpm |
756 |
String typePapier = construireTxtListeOntologie(collectionBotanique.getConservationPapierType());
|
|
|
757 |
String conservationMethode = construireTxtListeOntologie(collectionBotanique.getConservationMethode());
|
|
|
758 |
descriptionParams.set("type_papier", typePapier);
|
|
|
759 |
descriptionParams.set("conservation_methode", conservationMethode);
|
|
|
760 |
|
|
|
761 |
String specimenFixationMethode = construireTxtListeOntologie(collectionBotanique.getSpecimenFixationMethode());
|
|
|
762 |
String etiquetteFixationMethodeSupport = construireTxtListeOntologie(collectionBotanique.getEtiquetteFixationSupport());
|
|
|
763 |
String etiquetteFixationMethodeSpecimen = construireTxtListeOntologie(collectionBotanique.getEtiquetteFixationSpecimen());
|
|
|
764 |
String etiquetteTypeEcriture = construireTxtListeOntologie(collectionBotanique.getEtiquetteEcriture());
|
|
|
765 |
descriptionParams.set("specimen_fixation_pourcent", collectionBotanique.getSpecimenFixationPourcent());
|
|
|
766 |
descriptionParams.set("etiquette_fixation_pourcent", collectionBotanique.getEtiquetteFixationPourcent());
|
|
|
767 |
descriptionParams.set("specimen_fixation_methode", specimenFixationMethode);
|
|
|
768 |
descriptionParams.set("etiquette_fixation_methode_support", etiquetteFixationMethodeSupport);
|
|
|
769 |
descriptionParams.set("etiquette_fixation_methode_specimen", etiquetteFixationMethodeSpecimen);
|
|
|
770 |
descriptionParams.set("etiquette_type_ecriture", etiquetteTypeEcriture);
|
|
|
771 |
|
|
|
772 |
String traitement = construireTxtListeOntologie(collectionBotanique.getTraitement());
|
|
|
773 |
String traitementPoison = construireTxtListeOntologie(collectionBotanique.getTraitementPoison());
|
|
|
774 |
String traitementInsecte = construireTxtListeOntologie(collectionBotanique.getTraitementInsecte());
|
|
|
775 |
descriptionParams.set("traitement", traitement);
|
|
|
776 |
descriptionParams.set("traitement_poison", traitementPoison);
|
|
|
777 |
descriptionParams.set("traitement_insecte", traitementInsecte);
|
|
|
778 |
|
1922 |
delphine |
779 |
|
|
|
780 |
String etatGeneral = collectionBotanique.getEtatGeneral();
|
966 |
jpm |
781 |
boolean valeurEstOntologie = false;
|
|
|
782 |
boolean typeEstOntologie = true;
|
|
|
783 |
boolean donneeEstOntologie = true;
|
|
|
784 |
String degradationSpecimen = construireTxtListeOntologie(collectionBotanique.getDegradationSpecimen(), valeurEstOntologie, typeEstOntologie, donneeEstOntologie);
|
|
|
785 |
String degradationPresentation = construireTxtListeOntologie(collectionBotanique.getDegradationPresentation(), valeurEstOntologie, typeEstOntologie, donneeEstOntologie);
|
|
|
786 |
String determination = construireTxtListeOntologie(collectionBotanique.getDetermination());
|
1938 |
mathias |
787 |
|
|
|
788 |
String[] ontoVal2 = OntologiesLocales.getListeBonMauvaisEtat().get(etatGeneral);
|
|
|
789 |
//Coel.LogVersFirebug("ontoval2: " + ontoVal2);
|
|
|
790 |
String eg = etatGeneral;
|
|
|
791 |
if (ontoVal2 != null && ontoVal2.length > 0) {
|
|
|
792 |
//Coel.LogVersFirebug("ontoval2[0]: " + ontoVal2[0]);
|
|
|
793 |
eg = ontoVal2[0];
|
|
|
794 |
}
|
|
|
795 |
descriptionParams.set("etat_general", eg);
|
|
|
796 |
|
966 |
jpm |
797 |
descriptionParams.set("degradation_specimen", degradationSpecimen);
|
|
|
798 |
descriptionParams.set("degradation_presentation", degradationPresentation);
|
|
|
799 |
descriptionParams.set("determination", determination);
|
|
|
800 |
|
630 |
jp_milcent |
801 |
afficherOnglet(descriptionTpl, descriptionParams, descriptionOnglet);
|
|
|
802 |
}
|
|
|
803 |
|
|
|
804 |
private void afficherContenu() {
|
|
|
805 |
Params contenuParams = new Params();
|
966 |
jpm |
806 |
contenuParams.set("i18n_titre_nature", i18nC.collectionNatureTitre());
|
|
|
807 |
contenuParams.set("i18n_nature", i18nC.natureVegetaleContenuDetail());
|
|
|
808 |
contenuParams.set("i18n_specialite", i18nC.specialiteCollectionDetail());
|
630 |
jp_milcent |
809 |
|
966 |
jpm |
810 |
|
|
|
811 |
contenuParams.set("i18n_titre_classement", i18nC.collectionClassementTitre());
|
|
|
812 |
contenuParams.set("i18n_classement_etat", i18nC.etatClassementCollectionDetail());
|
|
|
813 |
contenuParams.set("i18n_classement", i18nC.annotationClassementCollectionDetail());
|
|
|
814 |
|
|
|
815 |
contenuParams.set("i18n_titre_etiquette", i18nC.collectionEtiquetteTitre());
|
|
|
816 |
contenuParams.set("i18n_etiquette_renseignement", i18nC.etiquetteRenseignementDetail());
|
|
|
817 |
contenuParams.set("i18n_precision_localite", i18nC.precisionLocaliteDetail());
|
|
|
818 |
contenuParams.set("i18n_precision_date", i18nC.precisionDateDetail());
|
|
|
819 |
contenuParams.set("i18n_etiquette_annotation", i18nC.etiquetteAnnotationDetail());
|
|
|
820 |
|
|
|
821 |
contenuParams.set("i18n_titre_integree", i18nC.collectionIntegreeTitre());
|
|
|
822 |
contenuParams.set("i18n_collection_integration", i18nC.integreCollectionDetail());
|
|
|
823 |
contenuParams.set("i18n_collection_integration_info", i18nC.infoIntegreCollectionDetail());
|
|
|
824 |
|
|
|
825 |
CollectionBotanique collectionBotanique = collection.getBotanique();
|
|
|
826 |
String nature = construireTxtListeOntologie(collectionBotanique.getNature());
|
|
|
827 |
contenuParams.set("nature", nature);
|
|
|
828 |
contenuParams.set("specialite", collectionBotanique.getSpecialite());
|
|
|
829 |
|
|
|
830 |
String classementEtat = construireTxtListeOntologie(collectionBotanique.getClassementEtat());
|
|
|
831 |
contenuParams.set("classement_etat", classementEtat);
|
|
|
832 |
contenuParams.set("classement", collectionBotanique.getClassementAnnotation());
|
|
|
833 |
|
|
|
834 |
String etiquetteRenseignements = "";
|
|
|
835 |
HashMap<String,String> infos = CollectionFormContenu.parserEtiquetteRenseignement(collectionBotanique.getEtiquetteRenseignement());
|
|
|
836 |
if (infos != null) {
|
|
|
837 |
Iterator<String> it = infos.keySet().iterator();
|
|
|
838 |
while (it.hasNext()) {
|
|
|
839 |
String cle = it.next();
|
|
|
840 |
if (cle.equals("AT")) {
|
|
|
841 |
etiquetteRenseignements += i18nC.etiquetteAuteurCollection();
|
|
|
842 |
} else if (cle.equals("F")) {
|
|
|
843 |
etiquetteRenseignements += i18nC.etiquetteFamille();
|
|
|
844 |
} else if (cle.equals("G")) {
|
|
|
845 |
etiquetteRenseignements += i18nC.etiquetteGenre();
|
|
|
846 |
} else if (cle.equals("SP")) {
|
|
|
847 |
etiquetteRenseignements += i18nC.etiquetteSp();
|
|
|
848 |
} else if (cle.equals("ASP")) {
|
|
|
849 |
etiquetteRenseignements += i18nC.etiquetteAuteurSp();
|
|
|
850 |
} else if (cle.equals("L")) {
|
|
|
851 |
etiquetteRenseignements += i18nC.etiquetteLocalite();
|
|
|
852 |
} else if (cle.equals("D")) {
|
|
|
853 |
etiquetteRenseignements += i18nC.etiquetteDateRecolte();
|
|
|
854 |
} else {
|
|
|
855 |
etiquetteRenseignements += i18nC.inconnue();
|
|
|
856 |
}
|
1329 |
cyprien |
857 |
if (it.hasNext()) etiquetteRenseignements += ": "+infos.get(cle)+"%, ";
|
|
|
858 |
else etiquetteRenseignements += ": "+infos.get(cle)+"%.";
|
966 |
jpm |
859 |
}
|
|
|
860 |
}
|
|
|
861 |
String precisionLocalite = construireTxtListeOntologie(collectionBotanique.getPrecisionLocalite());
|
|
|
862 |
String precisionDate = construireTxtListeOntologie(collectionBotanique.getPrecisionDate());
|
|
|
863 |
contenuParams.set("etiquette_renseignement", etiquetteRenseignements);
|
|
|
864 |
contenuParams.set("precision_localite", precisionLocalite);
|
|
|
865 |
contenuParams.set("precision_date", precisionDate);
|
|
|
866 |
contenuParams.set("etiquette_annotation", collectionBotanique.getAnnotationsDiverses());
|
|
|
867 |
|
|
|
868 |
String collectionIntegration = construireTxtListeOntologie(collectionBotanique.getCollectionIntegre());
|
|
|
869 |
String collectionIntegrationInfo = construireTxtListeOntologie(collectionBotanique.getCollectionIntegreInfo());
|
|
|
870 |
contenuParams.set("collection_integration", collectionIntegration);
|
|
|
871 |
contenuParams.set("collection_integration_info", collectionIntegrationInfo);
|
|
|
872 |
|
630 |
jp_milcent |
873 |
afficherOnglet(contenuTpl, contenuParams, contenuOnglet);
|
|
|
874 |
}
|
|
|
875 |
|
|
|
876 |
private void afficherInventaire() {
|
|
|
877 |
Params inventaireParams = new Params();
|
|
|
878 |
inventaireParams.set("i18n_titre_inventaire", i18nC.collectionInventaireTitre());
|
966 |
jpm |
879 |
inventaireParams.set("i18n_existence", i18nC.existenceInventaireCollectionDetail());
|
|
|
880 |
inventaireParams.set("i18n_participation_auteur", i18nC.auteurInventaireCollectionDetail());
|
|
|
881 |
inventaireParams.set("i18n_forme", i18nC.formeInventaireCollectionDetail());
|
|
|
882 |
inventaireParams.set("i18n_info", i18nC.infoInventaireCollectionDetail());
|
|
|
883 |
inventaireParams.set("i18n_digital", i18nC.digitalInventaireCollectionDetail());
|
|
|
884 |
inventaireParams.set("i18n_digital_pourcent", i18nC.pourcentDigitalInventaireCollectionDetail());
|
|
|
885 |
inventaireParams.set("i18n_etat", i18nC.etatInventaireCollectionDetail());
|
1210 |
cyprien |
886 |
//DELETEME inventaireParams.set("i18n_type_donnee", i18nC.typeDonneeInventaireCollectionDetail());
|
630 |
jp_milcent |
887 |
|
966 |
jpm |
888 |
CollectionBotanique collectionBotanique = collection.getBotanique();
|
1918 |
aurelien |
889 |
String existence = OntologiesLocales.getValeurOntologie(OntologiesLocales.getListeOuiNonPeutEtre(), collectionBotanique.getInventaire());
|
|
|
890 |
String participationAuteur = OntologiesLocales.getValeurOntologie(OntologiesLocales.getListeOuiNonPeutEtre(), collectionBotanique.getInventaireAuteur());
|
966 |
jpm |
891 |
String forme = construireTxtListeOntologie(collectionBotanique.getInventaireForme());
|
|
|
892 |
String digital = construireTxtListeOntologie(collectionBotanique.getInventaireDigital());
|
|
|
893 |
String digitalPourcent = collectionBotanique.getInventaireDigitalPourcent()+"%";
|
|
|
894 |
String etat = construireTxtListeOntologie(collectionBotanique.getInventaireEtat());
|
|
|
895 |
inventaireParams.set("existence", existence);
|
|
|
896 |
inventaireParams.set("participation_auteur", participationAuteur);
|
|
|
897 |
inventaireParams.set("forme", forme);
|
|
|
898 |
inventaireParams.set("info", collectionBotanique.getInventaireInfo());
|
|
|
899 |
inventaireParams.set("digital", digital);
|
|
|
900 |
inventaireParams.set("digital_pourcent", digitalPourcent);
|
|
|
901 |
inventaireParams.set("etat", etat);
|
|
|
902 |
|
630 |
jp_milcent |
903 |
afficherOnglet(inventaireTpl, inventaireParams, inventaireOnglet);
|
|
|
904 |
}
|
|
|
905 |
|
997 |
jpm |
906 |
private void afficherCommentaire() {
|
|
|
907 |
String tableauCommentaireHtml = "";
|
|
|
908 |
if (collection.getCommentairesLiees() != null && collection.getCommentairesLiees().size() > 0) {
|
|
|
909 |
tableauCommentaireHtml = construireTableauCommentairesLiees();
|
|
|
910 |
}
|
|
|
911 |
|
|
|
912 |
Params personneParams = new Params();
|
|
|
913 |
personneParams.set("i18n_titre_commentaire", i18nC.collectionCommentaireTitre());
|
|
|
914 |
personneParams.set("tableau_commentaires_liees", tableauCommentaireHtml);
|
|
|
915 |
|
|
|
916 |
afficherOnglet(commentaireTpl, personneParams, commentaireOnglet);
|
|
|
917 |
}
|
|
|
918 |
|
|
|
919 |
private String construireTableauCommentairesLiees() {
|
|
|
920 |
Params contenuParams = new Params();
|
|
|
921 |
contenuParams.set("i18n_type", i18nC.commentaireType());
|
|
|
922 |
contenuParams.set("i18n_titre", i18nC.commentaireTitre());
|
|
|
923 |
contenuParams.set("i18n_texte", i18nC.commentaireTexte());
|
|
|
924 |
contenuParams.set("i18n_ponderation", i18nC.commentairePonderation());
|
|
|
925 |
contenuParams.set("i18n_public", i18nC.commentairePublic());
|
|
|
926 |
|
|
|
927 |
String lignesCommentaire = "";
|
|
|
928 |
if (collection.getCommentairesLiees() != null) {
|
|
|
929 |
Iterator<String> it = collection.getCommentairesLiees().keySet().iterator();
|
|
|
930 |
while (it.hasNext()) {
|
|
|
931 |
CollectionACommentaire relationCollectionACommentaire = collection.getCommentairesLiees().get(it.next());
|
|
|
932 |
Commentaire commentaire = relationCollectionACommentaire.getCommentaire();
|
|
|
933 |
|
|
|
934 |
String type = construireTxtListeOntologie(relationCollectionACommentaire.getType());
|
|
|
935 |
String acces = (commentaire.etrePublic() ? i18nC.donneePublic() : i18nC.donneePrivee());
|
|
|
936 |
|
|
|
937 |
Params ligneParams = new Params();
|
|
|
938 |
ligneParams.set("type", type);
|
|
|
939 |
ligneParams.set("titre", commentaire.getTitre());
|
|
|
940 |
ligneParams.set("texte", commentaire.getTexte());
|
|
|
941 |
ligneParams.set("ponderation", commentaire.getPonderation()+"/100");
|
|
|
942 |
ligneParams.set("public", acces);
|
|
|
943 |
|
|
|
944 |
lignesCommentaire += Format.substitute(ligneCommentaireLieeTpl, ligneParams);
|
|
|
945 |
}
|
|
|
946 |
}
|
|
|
947 |
|
|
|
948 |
String cHtml = i18nC.nonRenseigne();
|
|
|
949 |
if (!UtilString.isEmpty(lignesCommentaire)) {
|
|
|
950 |
contenuParams.set("lignes", lignesCommentaire);
|
|
|
951 |
cHtml = Format.substitute(tableauCommentairesLieesTpl, contenuParams);
|
|
|
952 |
}
|
|
|
953 |
return cHtml;
|
|
|
954 |
}
|
|
|
955 |
|
468 |
jp_milcent |
956 |
protected String getNomStructure() {
|
|
|
957 |
String nomStructure = "";
|
|
|
958 |
if (structure != null) {
|
|
|
959 |
nomStructure = structure.getNom();
|
|
|
960 |
} else {
|
|
|
961 |
nomStructure = collection.getIdStructure();
|
453 |
jp_milcent |
962 |
}
|
468 |
jp_milcent |
963 |
return nomStructure;
|
453 |
jp_milcent |
964 |
}
|
|
|
965 |
}
|