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
 
3
import com.google.gwt.user.client.Window;
4
 
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
		String[] codeCompletIntitule = infosReferentiel.split(",");
14
		intitule = codeCompletIntitule[1];
15
 
16
		String[] codeVersion = codeCompletIntitule[0].split(":");
17
		code = codeVersion[0];
18
		version = codeVersion[1];
19
		versionCourte = formaterVersionCourte(version);
20
	}
21
 
22
	public InfosReferentielNom(String code, String version, String intitule) {
23
		super();
24
		this.code = code;
25
		this.version = version;
26
		this.intitule = intitule;
27
		this.versionCourte = formaterVersionCourte(version);
28
	}
29
 
30
	private String formaterVersionCourte(String version) {
31
		return version.replaceAll("v","");
32
	}
33
 
34
	public String getCodeVersionComplet() {
35
		return code+":"+version;
36
	}
37
 
38
	public String getCode() {
39
		return code;
40
	}
41
	public void setCode(String code) {
42
		this.code = code;
43
	}
44
	public String getVersion() {
45
		return version;
46
	}
47
	public void setVersion(String version) {
48
		this.version = version;
49
	}
50
	public String getIntitule() {
51
		return intitule;
52
	}
53
	public void setIntitule(String intitule) {
54
		this.intitule = intitule;
55
	}
56
 
57
	public String getVersionCourte() {
58
		return versionCourte;
59
	}
60
 
61
	public void setVersionCourte(String versionCourte) {
62
		this.versionCourte = versionCourte;
63
	}
64
}