01: /*
02: * GeoTools - OpenSource mapping toolkit
03: * http://geotools.org
04: * (C) 2005-2006, GeoTools Project Managment Committee (PMC)
05: * (C) 2005, Institut de Recherche pour le Développement
06: *
07: * This library is free software; you can redistribute it and/or
08: * modify it under the terms of the GNU Lesser General Public
09: * License as published by the Free Software Foundation;
10: * version 2.1 of the License.
11: *
12: * This library is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15: * Lesser General Public License for more details.
16: */
17: package org.geotools.referencing.factory.epsg;
18:
19: // J2SE dependencies and extensions
20: import java.sql.Connection;
21: import java.sql.PreparedStatement;
22:
23: // Geotools dependencies
24: import org.geotools.factory.Hints;
25:
26: /**
27: * This factory uses the MS-Access dialect of SQL. Because the primary distribution format for the
28: * EPSG database is MS-Access there is very little work to do in our {@link #adaptSQL} method.
29: *
30: * @since 2.4
31: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/referencing/src/main/java/org/geotools/referencing/factory/epsg/AccessDialectEpsgFactory.java $
32: * @version $Id: AccessDialectEpsgFactory.java 26328 2007-07-24 16:57:19Z desruisseaux $
33: * @author Jody Garnett
34: */
35: public class AccessDialectEpsgFactory extends DirectEpsgFactory {
36: /**
37: * Constructs an authority factory using the specified connection.
38: *
39: * @param userHints The underlying factories used for objects creation.
40: * @param connection The connection to the underlying EPSG database.
41: */
42: public AccessDialectEpsgFactory(final Hints userHints,
43: final Connection connection) {
44: super (userHints, connection);
45: }
46:
47: /**
48: * Invoked when a new {@link PreparedStatement} is about to be created from a SQL string.
49: *
50: * Since the <A HREF="http://www.epsg.org">EPSG database</A> is available mainly in MS-Access
51: * format, and this is the target of our super class, we have no work to do here.
52: *
53: * @param statement The statement in MS-Access syntax.
54: * @return The SQL statement to use. This implementation returns the string unchanged.
55: */
56: protected String adaptSQL(final String statement) {
57: return statement;
58: }
59: }
|