Subversion Repositories eFlore/Applications.coel

Rev

Rev 1095 | Rev 1131 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1095 Rev 1124
Line 655... Line 655...
655
	private Publication collecterPublication() {
655
	private Publication collecterPublication() {
656
		Publication publicationCollectee = (Publication) publication.cloner(new Publication());
656
		Publication publicationCollectee = (Publication) publication.cloner(new Publication());
Line 657... Line 657...
657
		
657
		
Line 658... Line -...
658
		publicationCollectee.setIdProjet(getValeurComboProjets());
-
 
659
		
-
 
660
		String auteurIntituleFormate = "";
-
 
661
		int auteursNombre = auteurComboboxListe.size();
-
 
662
		for (int i = 0; i < auteursNombre; i++) {
-
 
663
			if (auteurComboboxListe.get(i).getValue() != null) {
-
 
664
				Personne auteur = auteurComboboxListe.get(i).getValue();
-
 
665
				auteurIntituleFormate += auteur.getNom()+ " "+auteur.getPrenom();
-
 
666
				if (i != (auteursNombre - 1)) {
-
 
667
					auteurIntituleFormate += ", ";
-
 
668
				}
-
 
669
			}
658
		publicationCollectee.setIdProjet(getValeurComboProjets());
Line 670... Line 659...
670
		}
659
		
671
		publicationCollectee.setAuteur(auteurIntituleFormate);
660
		publicationCollectee.setAuteur(construireIntituleAuteur());
Line 672... Line 661...
672
		
661
		
673
		String titre = titreChp.getValue();
662
		String titre = titreChp.getValue();
Line 674... Line -...
674
		publicationCollectee.setTitre(titre);
-
 
675
		
663
		publicationCollectee.setTitre(titre);
Line 676... Line 664...
676
		String collection = collectionChp.getValue();
664
		
677
		publicationCollectee.setCollection(collection);
665
		String collection = collectionChp.getValue();
Line 678... Line 666...
678
		
666
		publicationCollectee.setCollection(collection);
Line 709... Line 697...
709
			publicationARetourner = publication = publicationCollectee;
697
			publicationARetourner = publication = publicationCollectee;
710
		}
698
		}
711
		return publicationARetourner;
699
		return publicationARetourner;
712
	}
700
	}
Line -... Line 701...
-
 
701
	
-
 
702
	private String construireIntituleEditeur() {
-
 
703
		String editeur = "";
-
 
704
		if (editeurCombobox.getValue() != null) {
-
 
705
			editeur = editeurCombobox.getValue().getNom();
-
 
706
		} else if (editeurCombobox.getRawValue() != "") {
-
 
707
			editeur = editeurCombobox.getRawValue();
-
 
708
		}
-
 
709
		return editeur;
-
 
710
	}
-
 
711
	
-
 
712
	private String construireIntituleAuteur() {
-
 
713
		String inituleAuteur = "";
-
 
714
		int auteursNombre = auteurComboboxListe.size();
-
 
715
		for (int i = 0; i < auteursNombre; i++) {
-
 
716
			if (auteurComboboxListe.get(i).getValue() != null) {
-
 
717
				Personne auteur = auteurComboboxListe.get(i).getValue();
-
 
718
				inituleAuteur += auteur.getNom().toUpperCase()+ " "+auteur.getPrenom();
-
 
719
				if (i != (auteursNombre - 1)) {
-
 
720
					inituleAuteur += ", ";
-
 
721
				}
-
 
722
			}
-
 
723
		}
-
 
724
		return inituleAuteur;
-
 
725
	}
-
 
726
	
-
 
727
	private String construireNomComplet() {
-
 
728
		// Intitulé de la publication complet : fmt_auteur, date_parution(année). titre. Editeur (nom), collection, fascicule, indication_nvt. pages.
-
 
729
		String nomComplet = "";
-
 
730
		String auteurs = construireIntituleAuteur();
-
 
731
		String annee = datePublicationChp.getRawValue();
-
 
732
		String titre = titreChp.getValue();
-
 
733
		String editeur = construireIntituleEditeur();
-
 
734
		
-
 
735
		nomComplet += auteurs+", "+annee+". "+titre+".";
-
 
736
		
-
 
737
		if (!UtilString.isEmpty(editeur)) {
-
 
738
			nomComplet += " Éditeur "+editeur+".";
-
 
739
		}
-
 
740
		
-
 
741
		if (collectionChp.getValue() != null) {
-
 
742
			String revue = collectionChp.getValue();
-
 
743
			nomComplet += ", "+revue;
-
 
744
		}
-
 
745
		
-
 
746
		if (fasciculeChp.getValue() != null) {
-
 
747
			String fascicule = fasciculeChp.getValue();
-
 
748
			nomComplet += ", "+fascicule;
-
 
749
		}
-
 
750
		
-
 
751
		if (tomeChp.getValue() != null) {
-
 
752
			String tomaison = tomeChp.getValue();
-
 
753
			nomComplet += ", "+tomaison;
-
 
754
		}
-
 
755
		
-
 
756
		if (collectionChp.getValue() != null || fasciculeChp.getValue() != null || tomeChp.getValue() != null) {
-
 
757
			nomComplet += ".";	
-
 
758
		}
-
 
759
		
-
 
760
		if (pagesChp.getValue() != null) {
-
 
761
			String pages = pagesChp.getValue();
-
 
762
			nomComplet += pages+".";
-
 
763
		}
-
 
764
		
-
 
765
		return nomComplet;
-
 
766
	}
713
	
767
	
714
	public void reinitialiserFormulaire() {
768
	public void reinitialiserFormulaire() {
715
		if (mode.equals(Formulaire.MODE_MODIFIER)) {
769
		if (mode.equals(Formulaire.MODE_MODIFIER)) {
716
			mediateur.afficherFormPublication(publication.getId());
770
			mediateur.afficherFormPublication(publication.getId());
717
		} else {
771
		} else {