Class DriverWrapperAutoprobe

  • All Implemented Interfaces:
    Driver

    public class DriverWrapperAutoprobe
    extends DriverWrapper
    DriverWrapperAutoprobe Wraps the PostGreSQL Driver to transparently add the PostGIS Object Classes. This avoids the need of explicit addDataType() calls from the driver users side. This DriverWrapper tries to autoprobe the installed PostGIS version to decide whether to use EWKT or hex encoded EWKB as canonical text representation. It uses the first PostGIS installation found in your namespace search path (aka schema search path) on the server side, and this works as long as you do not access incompatible PostGIS versions that reside in other schemas. For usage notes, see DriverWrapper class, but use "jdbc:postgresql_autogis:" as JDBC url prefix and net.postgis.jdbc.DriverWrapperAutoprobe as driver class.
    Author:
    Markus Schaber <[email protected]>
    See Also:
    DriverWrapper
    • Constructor Detail

      • DriverWrapperAutoprobe

        public DriverWrapperAutoprobe()
                               throws SQLException
        Default constructor.
        Throws:
        SQLException - when a SQLExceptin occurs
    • Method Detail

      • useLW

        protected boolean useLW​(Connection conn)
        Description copied from class: DriverWrapper
        Do we have HexWKB as well known text representation - to be overridden by subclasses.
        Overrides:
        useLW in class DriverWrapper
        Parameters:
        conn - Connection to check
        Returns:
        true if using EWKB, false otherwise
      • getVersion

        public static String getVersion()
        Returns our own CVS version plus postgres Version
        Returns:
        String value reprenstation of the version