From 27b8fa1719b04c715bf73e886473485abdd9f08c Mon Sep 17 00:00:00 2001 From: Markus Schaber Date: Fri, 18 Feb 2005 14:49:54 +0000 Subject: [PATCH] Added Version.class to allow programatically identification of PostGIS jdbc version git-svn-id: http://svn.osgeo.org/postgis/trunk@1410 b70326c6-7e19-0410-871a-916f4a2858ee --- jdbc2/Makefile | 3 +- jdbc2/src/org/postgis/Version.java | 52 ++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 jdbc2/src/org/postgis/Version.java diff --git a/jdbc2/Makefile b/jdbc2/Makefile index d907f8f72..9e61493d1 100644 --- a/jdbc2/Makefile +++ b/jdbc2/Makefile @@ -79,7 +79,8 @@ SRC= $(SRCDIR)/examples/Test.java \ $(SRCDIR)/org/postgis/PGgeometry.java \ $(SRCDIR)/org/postgis/PointComposedGeom.java \ $(SRCDIR)/org/postgis/Point.java \ - $(SRCDIR)/org/postgis/Polygon.java + $(SRCDIR)/org/postgis/Polygon.java \ + $(SRCDIR)/org/postgis/Version.java STUBDIR=stubs STUBBUILD=stubbin/ diff --git a/jdbc2/src/org/postgis/Version.java b/jdbc2/src/org/postgis/Version.java new file mode 100644 index 000000000..ec26751a9 --- /dev/null +++ b/jdbc2/src/org/postgis/Version.java @@ -0,0 +1,52 @@ +/* + * Version.java + * + * PostGIS extension for PostgreSQL JDBC driver - current version identification + * + * (C) 2005 Markus Schaber, schabios@logi-track.com + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation, either version 2.1 of the License. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at + * http://www.gnu.org. + * + * $Id$ + */ + +package org.postgis; + +/** Corresponds to the appropriate PostGIS that carried this source */ +public class Version { + + /** The major version */ + public static final int MAJOR = 1; + + /** The minor version */ + public static final int MINOR = 0; + + /** The micro version */ + public static final int MICRO = 0; + + /** + * Prerelease identifier, like "RC3" or "pre5" - is guaranteed to be the + * emtpy String on stable releases + */ + public static final String PREREL_SUFFIX = "RC3"; + + /** Full version for human reading - code should use the constants above */ + public static final String FULL = "PostGIS JDBC V" + MAJOR + "." + MINOR + "." + MICRO + + PREREL_SUFFIX; + + public static void main(String[] args) { + System.out.println(FULL); + } +} \ No newline at end of file -- 2.40.0