org.geotools.referencing.factory.epsg
Class HsqlEpsgDatabase

java.lang.Object
  extended by org.geotools.referencing.factory.epsg.HsqlEpsgDatabase

public class HsqlEpsgDatabase
extends java.lang.Object

This utility class knows everything there is to know about the care and feeding of our pet EPSG database. This utility class is used to hold logic previously associated with our own custom DataSource.

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 edition attribute of the authority. The HSQL database is read only.

Since:
2.4
Version:
$Id: HsqlEpsgDatabase.java 30656 2008-06-12 20:32:50Z acuster $
Author:
Jody Garnett

Field Summary
static java.lang.String DATABASE_NAME
          The database name.
static java.lang.String DIRECTORY_KEY
          The key for fetching the database directory from system properties.
 
Constructor Summary
HsqlEpsgDatabase()
           
 
Method Summary
static javax.sql.DataSource createDataSource()
          Creates a DataSource that is set up and ready to go.
static javax.sql.DataSource createDataSource(java.io.File directory)
           
static javax.sql.DataSource createDataSource(Hints hints)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DIRECTORY_KEY

public static final java.lang.String DIRECTORY_KEY
The key for fetching the database directory from system properties.

See Also:
Constant Field Values

DATABASE_NAME

public static final java.lang.String DATABASE_NAME
The database name.

See Also:
Constant Field Values
Constructor Detail

HsqlEpsgDatabase

public HsqlEpsgDatabase()
Method Detail

createDataSource

public static javax.sql.DataSource createDataSource()
                                             throws java.sql.SQLException
Creates a DataSource that is set up and ready to go.

This method pays attention to the system property "EPSG-HSQL.directory" and makes use of the default database name "EPSG".

Returns:
Throws:
java.sql.SQLException

createDataSource

public static javax.sql.DataSource createDataSource(Hints hints)
                                             throws org.opengis.referencing.FactoryException
Throws:
org.opengis.referencing.FactoryException

createDataSource

public static javax.sql.DataSource createDataSource(java.io.File directory)
                                             throws java.sql.SQLException
Throws:
java.sql.SQLException


Copyright © 1996-2010 Geotools. All Rights Reserved.