001: /*
002: * The Unified Mapping Platform (JUMP) is an extensible, interactive GUI
003: * for visualizing and manipulating spatial features with geometry and attributes.
004: *
005: * Copyright (C) 2003 Vivid Solutions
006: *
007: * This program is free software; you can redistribute it and/or
008: * modify it under the terms of the GNU General Public License
009: * as published by the Free Software Foundation; either version 2
010: * of the License, or (at your option) any later version.
011: *
012: * This program is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
015: * GNU General Public License for more details.
016: *
017: * You should have received a copy of the GNU General Public License
018: * along with this program; if not, write to the Free Software
019: * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
020: *
021: * For more information, contact:
022: *
023: * Vivid Solutions
024: * Suite #1A
025: * 2328 Government Street
026: * Victoria BC V8T 5G5
027: * Canada
028: *
029: * (250)385-6040
030: * www.vividsolutions.com
031: */
032: package com.vividsolutions.jump;
033:
034: /**
035: * JUMP version information.
036: * <p>
037: * Versions consist of a 3-part version number: <code>major.minor.patch</code>
038: * An optional release status string may be present in the string version of
039: * the version.
040: *
041: * @version 1.2
042: */
043: public class JUMPVersion {
044:
045: /**
046: * The current version number of the JTS API.
047: */
048: public static final JUMPVersion CURRENT_VERSION = new JUMPVersion();
049:
050: /**
051: * The major version number.
052: */
053: public static final int MAJOR = 1;
054:
055: /**
056: * The minor version number.
057: */
058: public static final int MINOR = 2;
059:
060: /**
061: * The patch version number.
062: */
063: public static final int PATCH = 0;
064:
065: /**
066: * An optional string providing further release info (such as "alpha 1");
067: */
068: private static final String releaseInfo = "";
069:
070: /**
071: * Prints the current JTS version to stdout.
072: *
073: * @param args the command-line arguments (none are required).
074: */
075: public static void main(String[] args) {
076: System.out.println(CURRENT_VERSION);
077: }
078:
079: private JUMPVersion() {
080: }
081:
082: /**
083: * Gets the major number of the release version.
084: *
085: * @return the major number of the release version.
086: */
087: public int getMajor() {
088: return MAJOR;
089: }
090:
091: /**
092: * Gets the minor number of the release version.
093: *
094: * @return the minor number of the release version.
095: */
096: public int getMinor() {
097: return MINOR;
098: }
099:
100: /**
101: * Gets the patch number of the release version.
102: *
103: * @return the patch number of the release version.
104: */
105: public int getPatch() {
106: return PATCH;
107: }
108:
109: /**
110: * Gets the full version number, suitable for display.
111: *
112: * @return the full version number, suitable for display.
113: */
114: public String toString() {
115: String ver = "orig. JUMP " + MAJOR + "." + MINOR + "." + PATCH;
116: if (releaseInfo != null && releaseInfo.length() > 0)
117: return ver + " " + releaseInfo;
118: return ver;
119: }
120:
121: }
|