Subversion Repositories eFlore/Applications.coel

Rev

Rev 1319 | Rev 1369 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1319 Rev 1329
1
package org.tela_botanica.client.modeles.publication;
1
package org.tela_botanica.client.modeles.publication;
2
 
2
 
3
import org.tela_botanica.client.modeles.aDonnee;
3
import org.tela_botanica.client.modeles.aDonnee;
4
import org.tela_botanica.client.modeles.structure.Structure;
4
import org.tela_botanica.client.modeles.structure.Structure;
5
 
5
 
6
import com.google.gwt.json.client.JSONObject;
6
import com.google.gwt.json.client.JSONObject;
7
 
7
 
8
public class Publication extends aDonnee {
8
public class Publication extends aDonnee {
9
 
9
 
10
	private static final long serialVersionUID = 4142843068041690126L;
10
	private static final long serialVersionUID = 4142843068041690126L;
11
 
11
 
12
	private static final String PREFIXE = "cpu";
12
	private static final String PREFIXE = "cpu";
13
	private Structure editeur = null;
13
	private Structure editeur = null;
14
	public static String[] champsObligatoires = {"cpu_id_publication"};
14
	public static String[] champsObligatoires = {"cpu_id_publication"};
15
	
15
	
16
	public Publication() {	
16
	public Publication() {	
17
	}
17
	}
18
	
18
	
19
	public Publication(JSONObject publication) {
19
	public Publication(JSONObject publication) {
20
		initialiserModele(publication);
20
		initialiserModele(publication);
21
		editeur = new Structure(publication);
21
		editeur = new Structure(publication);
22
	}
22
	}
23
	
23
	
24
	@Override
24
	@Override
25
	protected String getPrefixe() {
25
	protected String getPrefixe() {
26
		return PREFIXE;
26
		return PREFIXE;
27
	}
27
	}
28
		
28
		
29
	protected String[] getChampsObligatoires()	{
29
	protected String[] getChampsObligatoires()	{
30
		return champsObligatoires;
30
		return champsObligatoires;
31
	}
31
	}
32
	
32
	
33
	public void setStructureEditeur(Structure structure) {
33
	public void setStructureEditeur(Structure structure) {
34
		editeur = structure;
34
		editeur = structure;
35
	}
35
	}
36
	
36
	
37
	public String getId() {
37
	public String getId() {
38
		return renvoyerValeurCorrecte("id_publication");
38
		return renvoyerValeurCorrecte("id_publication");
39
	}
39
	}
40
	public void setId(String idPublication) {
40
	public void setId(String idPublication) {
41
		this.set("id_publication", idPublication);
41
		this.set("id_publication", idPublication);
42
	}
42
	}
43
	
43
	
44
	public String getIdProjet() {
44
	public String getIdProjet() {
45
		return renvoyerValeurCorrecte("ce_projet");
45
		return renvoyerValeurCorrecte("ce_projet");
46
	}
46
	}
47
	public void setIdProjet(String idProjet) {
47
	public void setIdProjet(String idProjet) {
48
		this.set("ce_projet", idProjet);
48
		this.set("ce_projet", idProjet);
49
	}
49
	}
50
	
50
	
51
	public String getNomComplet() {
51
	public String getNomComplet() {
52
		return renvoyerValeurCorrecte("fmt_nom_complet");
52
		return renvoyerValeurCorrecte("fmt_nom_complet");
53
	}
53
	}
54
	public void setNomComplet(String nomComplet) {
54
	public void setNomComplet(String nomComplet) {
55
		this.set("fmt_nom_complet", nomComplet);
55
		this.set("fmt_nom_complet", nomComplet);
56
	}
56
	}
57
	
57
	
58
	public String getURI() {
58
	public String getURI() {
59
		return renvoyerValeurCorrecte("uri");
59
		return renvoyerValeurCorrecte("uri");
60
	}
60
	}
61
	public void setUri(String uri) {
61
	public void setUri(String uri) {
62
		this.set("uri", uri);
62
		this.set("uri", uri);
63
	}
63
	}
64
 
64
 
65
	public String getAuteur() {
65
	public String getAuteur() {
66
		return renvoyerValeurCorrecte("fmt_auteur");
66
		return renvoyerValeurCorrecte("fmt_auteur");
67
	}
67
	}
68
	public void setAuteur(String auteurFormate) {
68
	public void setAuteur(String auteurFormate) {
69
		this.set("fmt_auteur", auteurFormate);
69
		this.set("fmt_auteur", auteurFormate);
70
	}
70
	}
71
 
-
 
72
	// FIXME :
-
 
73
	// NE SERT A RIEN !
-
 
74
	// Author : Cyprien
-
 
75
	// Action : Cette fonction retourne l'objet de la publication (=ce dont parle la publication)
-
 
76
	//			le résultat est une chaine de caractères représentant le nom d'une collection
-
 
77
	//			ou d'une personne
-
 
78
	public String getObjetDeLaPublication(){
-
 
79
		String objetDeLaPublication = "";
-
 
80
		
-
 
81
		return objetDeLaPublication;
-
 
82
	}
-
 
83
 
71
 
84
	public String getCollection() {
72
	public String getCollection() {
85
		return renvoyerValeurCorrecte("collection");
73
		return renvoyerValeurCorrecte("collection");
86
	}
74
	}
87
	public void setCollection(String collection) {
75
	public void setCollection(String collection) {
88
		this.set("collection", collection);
76
		this.set("collection", collection);
89
	}
77
	}
90
	
78
	
91
	public String getTitre() {
79
	public String getTitre() {
92
		return renvoyerValeurCorrecte("titre");
80
		return renvoyerValeurCorrecte("titre");
93
	}
81
	}
94
	public void setTitre(String titre) {
82
	public void setTitre(String titre) {
95
		this.set("titre", titre);
83
		this.set("titre", titre);
96
	}
84
	}
97
 
85
 
98
	public String getNomEditeur() {
86
	public String getNomEditeur() {
99
		String editeurNom = getEditeur();
87
		String editeurNom = getEditeur();
100
		if (editeurNom.matches("[0-9]+")) {
88
		if (editeurNom.matches("[0-9]+")) {
101
			editeurNom = editeur.getNom();
89
			editeurNom = editeur.getNom();
102
		}
90
		}
103
		return editeurNom;
91
		return editeurNom;
104
	}
92
	}
105
	public String getEditeur() {
93
	public String getEditeur() {
106
		return getChaineDenormaliseUnique("ce_truk_editeur");
94
		return getChaineDenormaliseUnique("ce_truk_editeur");
107
	}
95
	}
108
	public void setEditeur(String editeur) {
96
	public void setEditeur(String editeur) {
109
		setChaineDenormaliseUnique("ce_truk_editeur", "AUTRE", editeur);
97
		setChaineDenormaliseUnique("ce_truk_editeur", "AUTRE", editeur);
110
	}
98
	}
111
 
99
 
112
	public String getAnneeParution() {
100
	public String getAnneeParution() {
113
		return renvoyerValeurCorrecte("date_parution").substring(0, 4);
101
		return renvoyerValeurCorrecte("date_parution").substring(0, 4);
114
	}
102
	}
115
	public String getDateParution() {
103
	public String getDateParution() {
116
		return renvoyerValeurCorrecte("date_parution");
104
		return renvoyerValeurCorrecte("date_parution");
117
	}
105
	}
118
	public void setDateParution(String date) {
106
	public void setDateParution(String date) {
119
		this.set("date_parution", date);
107
		this.set("date_parution", date);
120
	}
108
	}
121
 
109
 
122
	public String getIndicationNvt() {
110
	public String getIndicationNvt() {
123
		return renvoyerValeurCorrecte("indication_nvt");
111
		return renvoyerValeurCorrecte("indication_nvt");
124
	}
112
	}
125
	public void setIndicationNvt(String nvt) {
113
	public void setIndicationNvt(String nvt) {
126
		this.set("indication_nvt", nvt);
114
		this.set("indication_nvt", nvt);
127
	}
115
	}
128
	
116
	
129
	public String getFascicule() {
117
	public String getFascicule() {
130
		return renvoyerValeurCorrecte("fascicule");
118
		return renvoyerValeurCorrecte("fascicule");
131
	}
119
	}
132
	public void setFascicule(String fascicule) {
120
	public void setFascicule(String fascicule) {
133
		this.set("fascicule", fascicule);
121
		this.set("fascicule", fascicule);
134
	}
122
	}
135
	
123
	
136
	public String getPages() {
124
	public String getPages() {
137
		return renvoyerValeurCorrecte("truk_pages");
125
		return renvoyerValeurCorrecte("truk_pages");
138
	}
126
	}
139
	public void setPages(String pages) {
127
	public void setPages(String pages) {
140
		this.set("truk_pages", pages);
128
		this.set("truk_pages", pages);
141
	}
129
	}
142
	
130
	
143
}
131
}