Statistics
| Revision:

svn-gvsig-desktop / tags / v2_0_0_Build_2023 / applications / appgvSIG / src / org / gvsig / app / extension / Version.java @ 34331

History | View | Annotate | Download (1.75 KB)

1
package org.gvsig.app.extension;
2

    
3

    
4

    
5
public class Version {
6
        public final static int MAJOR_VERSION_NUMBER = 2;
7
        public final static int MINOR_VERSION_NUMBER = 0;
8
        public final static int RELEASE_NUMBER = 0;
9

    
10
        private static String BUILD = "2023";
11

    
12
        public static String format() {
13
        return MAJOR_VERSION_NUMBER + "." + MINOR_VERSION_NUMBER + "."
14
            + RELEASE_NUMBER;
15
        }
16

    
17
        public static String longFormat() {
18
        return MAJOR_VERSION_NUMBER + "." + MINOR_VERSION_NUMBER + "."
19
            + RELEASE_NUMBER + " (Build " + getBuild() + ")";
20
    }
21

    
22
        public static String getBuild() {
23
        // TODO: read from the package.info
24

    
25
        // if (BUILD == null) {
26
        // try {
27
        // // Leemos el n? de build
28
        // BufferedReader fich = new BufferedReader(
29
        // new
30
        // FileReader(FPanelAbout.class.getResource("/build.number").getFile()));
31
        // fich.readLine();
32
        // fich.readLine();
33
        // String strVer = fich.readLine();
34
        // StringTokenizer strTokenizer = new StringTokenizer(strVer);
35
        // String strToken = strTokenizer.nextToken("=");
36
        // strToken = strTokenizer.nextToken();
37
        // BUILD = strToken;
38
        // fich.close();
39
        // } catch (Exception e) {
40
        // e.printStackTrace();
41
        // }
42
        // BUILD = "2021";
43
        // }
44
                return BUILD;
45
        }
46
        
47
        public int getMinor() {
48
                return MINOR_VERSION_NUMBER;
49
        }
50

    
51
        public int getMajor() {
52
                return MAJOR_VERSION_NUMBER;
53
        }
54

    
55
        public int getRelease() {
56
                return RELEASE_NUMBER;
57
        }
58

    
59
        public String getBuildId() {
60
                return getBuild();
61
        }
62
        
63
        public String toString() {
64
                return longFormat();                
65
        }
66

    
67
    public String getFormat() {
68
        return Version.format();
69
    }
70

    
71
    public String getLongFormat() {
72
        return Version.longFormat();
73
    }
74
}