Subversion Repositories eFlore/Applications.coel

Rev

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

Rev 1014 Rev 1173
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
	
15
	
15
	public Publication() {	
16
	public Publication() {	
16
	}
17
	}
17
	
18
	
18
	public Publication(JSONObject publication) {
19
	public Publication(JSONObject publication) {
19
		initialiserModele(publication);
20
		initialiserModele(publication);
20
		editeur = new Structure(publication);
21
		editeur = new Structure(publication);
21
	}
22
	}
22
	
23
	
23
	@Override
24
	@Override
24
	protected String getPrefixe() {
25
	protected String getPrefixe() {
25
		return PREFIXE;
26
		return PREFIXE;
26
	}
27
	}
-
 
28
		
-
 
29
	protected String[] getChampsObligatoires()	{
-
 
30
		return champsObligatoires;
-
 
31
	}
27
		
32
	
28
	public void setStructureEditeur(Structure structure) {
33
	public void setStructureEditeur(Structure structure) {
29
		editeur = structure;
34
		editeur = structure;
30
	}
35
	}
31
	
36
	
32
	public String getId() {
37
	public String getId() {
33
		return renvoyerValeurCorrecte("id_publication");
38
		return renvoyerValeurCorrecte("id_publication");
34
	}
39
	}
35
	public void setId(String idPublication) {
40
	public void setId(String idPublication) {
36
		this.set("id_publication", idPublication);
41
		this.set("id_publication", idPublication);
37
	}
42
	}
38
	
43
	
39
	public String getIdProjet() {
44
	public String getIdProjet() {
40
		return renvoyerValeurCorrecte("ce_projet");
45
		return renvoyerValeurCorrecte("ce_projet");
41
	}
46
	}
42
	public void setIdProjet(String idProjet) {
47
	public void setIdProjet(String idProjet) {
43
		this.set("ce_projet", idProjet);
48
		this.set("ce_projet", idProjet);
44
	}
49
	}
45
	
50
	
46
	public String getNomComplet() {
51
	public String getNomComplet() {
47
		return renvoyerValeurCorrecte("fmt_nom_complet");
52
		return renvoyerValeurCorrecte("fmt_nom_complet");
48
	}
53
	}
49
	public void setNomComplet(String nomComplet) {
54
	public void setNomComplet(String nomComplet) {
50
		this.set("fmt_nom_complet", nomComplet);
55
		this.set("fmt_nom_complet", nomComplet);
51
	}
56
	}
52
	
57
	
53
	public String getURI() {
58
	public String getURI() {
54
		return renvoyerValeurCorrecte("uri");
59
		return renvoyerValeurCorrecte("uri");
55
	}
60
	}
56
	public void setUri(String uri) {
61
	public void setUri(String uri) {
57
		this.set("uri", uri);
62
		this.set("uri", uri);
58
	}
63
	}
59
 
64
 
60
	public String getAuteur() {
65
	public String getAuteur() {
61
		return renvoyerValeurCorrecte("fmt_auteur");
66
		return renvoyerValeurCorrecte("fmt_auteur");
62
	}
67
	}
63
	public void setAuteur(String auteurFormate) {
68
	public void setAuteur(String auteurFormate) {
64
		this.set("fmt_auteur", auteurFormate);
69
		this.set("fmt_auteur", auteurFormate);
65
	}
70
	}
66
 
71
 
67
	public String getCollection() {
72
	public String getCollection() {
68
		return renvoyerValeurCorrecte("collection");
73
		return renvoyerValeurCorrecte("collection");
69
	}
74
	}
70
	public void setCollection(String collection) {
75
	public void setCollection(String collection) {
71
		this.set("collection", collection);
76
		this.set("collection", collection);
72
	}
77
	}
73
	
78
	
74
	public String getTitre() {
79
	public String getTitre() {
75
		return renvoyerValeurCorrecte("titre");
80
		return renvoyerValeurCorrecte("titre");
76
	}
81
	}
77
	public void setTitre(String titre) {
82
	public void setTitre(String titre) {
78
		this.set("titre", titre);
83
		this.set("titre", titre);
79
	}
84
	}
80
 
85
 
81
	public String getNomEditeur() {
86
	public String getNomEditeur() {
82
		String editeurNom = getEditeur();
87
		String editeurNom = getEditeur();
83
		if (editeurNom.matches("[0-9]+")) {
88
		if (editeurNom.matches("[0-9]+")) {
84
			editeurNom = editeur.getNom();
89
			editeurNom = editeur.getNom();
85
		}
90
		}
86
		return editeurNom;
91
		return editeurNom;
87
	}
92
	}
88
	public String getEditeur() {
93
	public String getEditeur() {
89
		return getChaineDenormaliseUnique("ce_truk_editeur");
94
		return getChaineDenormaliseUnique("ce_truk_editeur");
90
	}
95
	}
91
	public void setEditeur(String editeur) {
96
	public void setEditeur(String editeur) {
92
		setChaineDenormaliseUnique("ce_truk_editeur", "AUTRE", editeur);
97
		setChaineDenormaliseUnique("ce_truk_editeur", "AUTRE", editeur);
93
	}
98
	}
94
 
99
 
95
	public String getAnneeParution() {
100
	public String getAnneeParution() {
96
		return renvoyerValeurCorrecte("date_parution").substring(0, 4);
101
		return renvoyerValeurCorrecte("date_parution").substring(0, 4);
97
	}
102
	}
98
	public String getDateParution() {
103
	public String getDateParution() {
99
		return renvoyerValeurCorrecte("date_parution");
104
		return renvoyerValeurCorrecte("date_parution");
100
	}
105
	}
101
	public void setDateParution(String date) {
106
	public void setDateParution(String date) {
102
		this.set("date_parution", date);
107
		this.set("date_parution", date);
103
	}
108
	}
104
 
109
 
105
	public String getIndicationNvt() {
110
	public String getIndicationNvt() {
106
		return renvoyerValeurCorrecte("indication_nvt");
111
		return renvoyerValeurCorrecte("indication_nvt");
107
	}
112
	}
108
	public void setIndicationNvt(String nvt) {
113
	public void setIndicationNvt(String nvt) {
109
		this.set("indication_nvt", nvt);
114
		this.set("indication_nvt", nvt);
110
	}
115
	}
111
	
116
	
112
	public String getFascicule() {
117
	public String getFascicule() {
113
		return renvoyerValeurCorrecte("fascicule");
118
		return renvoyerValeurCorrecte("fascicule");
114
	}
119
	}
115
	public void setFascicule(String fascicule) {
120
	public void setFascicule(String fascicule) {
116
		this.set("fascicule", fascicule);
121
		this.set("fascicule", fascicule);
117
	}
122
	}
118
	
123
	
119
	public String getPages() {
124
	public String getPages() {
120
		return renvoyerValeurCorrecte("truk_pages");
125
		return renvoyerValeurCorrecte("truk_pages");
121
	}
126
	}
122
	public void setPages(String pages) {
127
	public void setPages(String pages) {
123
		this.set("truk_pages", pages);
128
		this.set("truk_pages", pages);
124
	}
129
	}
125
	
130
	
126
}
131
}