/** * Check whether the driver thinks he can handle the given URL. * * @see java.sql.Driver#acceptsURL * @param url the URL of the driver * @return true if this driver accepts the given URL */ public boolean acceptsURL(String url) { try { url = mangleURL(url); } catch (SQLException e) { return false; } return super.acceptsURL(url); }
/** * Creates a postgresql connection, and then adds the JTS GIS data types to * it calling addpgtypes() * * @param url the URL of the database to connect to * @param info a list of arbitrary tag/value pairs as connection arguments * @return a connection to the URL or null if it isnt us * @exception SQLException if a database access error occurs * * @see java.sql.Driver#connect * @see org.postgresql.Driver */ public java.sql.Connection connect(String url, Properties info) throws SQLException { url = mangleURL(url); Connection result = super.connect(url, info); addGISTypes((PGConnection)result); return result; }