| org.geotools.referencing.factory.epsg.HSQLDataSource
HSQLDataSource | public class HSQLDataSource extends jdbcDataSource implements DataSource(Code) | | Connection to the EPSG database in HSQL database engine format using JDBC. The EPSG
database can be downloaded from http://www.epsg.org.
The SQL scripts (modified for the HSQL syntax as explained
here) are bundled into this plugin. The database version is given in the
of the
.
The HSQL database is read only.
Implementation note
The SQL scripts are executed the first time a connection is required. The database
is then created as cached tables (
HSQL.properties and
HSQL.data files)
in a temporary directory. Future connections to the EPSG database while reuse the cached
tables, if available. Otherwise, the scripts will be executed again in order to recreate
them.
If the EPSG database should be created in a different directory (or already exists in that
directory), this directory can be specified in two ways:
- It may be given explicitly as an argument to the
.
- It may be specified as a
nammed
.
since: 2.2 version: $Id: HSQLDataSource.java 27862 2007-11-12 19:51:19Z desruisseaux $ author: Martin Desruisseaux author: Didier RichardFactoryOnHSQL |
Constructor Summary | |
public | HSQLDataSource() Creates a new instance of this data source. | public | HSQLDataSource(File directory) Creates a new instance of this data source using the
database in the
specified directory. |
DATABASE_NAME | final public static String DATABASE_NAME(Code) | | The database name.
since: 2.3 |
DIRECTORY_KEY | final public static String DIRECTORY_KEY(Code) | | The key for fetching the database directory from
.
since: 2.3 |
HSQLDataSource | public HSQLDataSource()(Code) | | Creates a new instance of this data source. If the
is defined and contains
the name of a directory with a valid
, then the
database will be saved in that directory. Otherwise, a
temporary directory will be used.
|
HSQLDataSource | public HSQLDataSource(File directory)(Code) | | Creates a new instance of this data source using the
database in the
specified directory. If
directory is
null , then callers are responsible
to invoke
HSQLDataSource.setDatabase explicitly.
Parameters: directory - The directory for the DATABASE_NAME HSQL database,or null if none. since: 2.3 |
createFactory | public AbstractAuthorityFactory createFactory(Hints hints) throws SQLException(Code) | | Opens a connection and creates an
for it.
Parameters: hints - A map of hints, including the low-level factories to use for CRS creation. The EPSG factory using HSQLDB SQL syntax. throws: SQLException - if connection to the database failed. |
getConnection | public Connection getConnection() throws SQLException(Code) | | Opens a connection to the database. If the cached tables are not available,
they will be created now from the SQL scripts bundled in this plugin.
|
getPriority | public int getPriority()(Code) | | Returns the priority for this data source. This priority is set to a lower value than
the
's one in order to give the priority to the Access-backed
database, if presents. Priorities are set that way because:
- The MS-Access format is the primary EPSG database format.
- If a user downloads the MS-Access database himself, he probably wants to use it.
|
isWrapperFor | public boolean isWrapperFor(Class type)(Code) | | For compilation with Java 6.
|
|
|