Subversion Repositories eFlore/Applications.cel

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1542 aurelien 1
package org.tela_botanica.client.modeles.objets;
2
 
2650 aurelien 3
import org.tela_botanica.client.i18n.Msg;
4
 
1542 aurelien 5
public class InfosReferentielNom {
6
 
7
	private String code = null;
8
	private String version = null;
9
	private String versionCourte = null;
10
	private String intitule = null;
11
 
12
	public InfosReferentielNom(String infosReferentiel) {
13
 
2650 aurelien 14
		String[] codeVersion = infosReferentiel.split(":");
1542 aurelien 15
		code = codeVersion[0];
2650 aurelien 16
		intitule = Msg.get("referentiel-"+code);
1744 raphael 17
		if(codeVersion.length > 1) {
18
			version = codeVersion[1];
19
			versionCourte = formaterVersionCourte(version);
20
		} else {
21
			version = versionCourte = null;
22
		}
1542 aurelien 23
	}
24
 
25
	public InfosReferentielNom(String code, String version, String intitule) {
26
		super();
27
		this.code = code;
28
		this.version = version;
29
		this.intitule = intitule;
30
		this.versionCourte = formaterVersionCourte(version);
31
	}
32
 
33
	private String formaterVersionCourte(String version) {
34
		return version.replaceAll("v","");
35
	}
36
 
37
	public String getCodeVersionComplet() {
38
		return code+":"+version;
39
	}
40
 
41
	public String getCode() {
42
		return code;
43
	}
44
	public void setCode(String code) {
45
		this.code = code;
46
	}
47
	public String getVersion() {
48
		return version;
49
	}
50
	public void setVersion(String version) {
51
		this.version = version;
52
	}
53
	public String getIntitule() {
54
		return intitule;
55
	}
56
	public void setIntitule(String intitule) {
57
		this.intitule = intitule;
58
	}
59
 
60
	public String getVersionCourte() {
61
		return versionCourte;
62
	}
63
 
64
	public void setVersionCourte(String versionCourte) {
65
		this.versionCourte = versionCourte;
66
	}
67
}