Subversion Repositories eFlore/Applications.cel

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

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