|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.postgresql.jdbc2.optional.BaseDataSource org.postgresql.jdbc2.optional.SimpleDataSource org.postgresql.jdbc3.Jdbc3SimpleDataSource org.geotools.referencing.factory.epsg.PostgreDataSource
Connection to the EPSG database in PostgreSQL database engine using JDBC. The EPSG database can be downloaded from http://www.epsg.org. It should have been imported into a PostgreSQL database, which doesn't need to be on the local machine.
Property | Type | Description | Geotools Default |
---|---|---|---|
String | PostgreSQL database server host name | ||
String | PostgreSQL database name | ||
String | The schema for the EPSG tables | ||
int | TCP port which the PostgreSQL database server is listening on | ||
String | User used to make database connections | ||
String | Password used to make database connections |
The database version is given in the edition attribute of the authority. The postgreSQL database should be read only.
Just having this class accessible in the classpath, together with the registration in the directory, is suffisient to get a working EPSG authority factory backed by this database. Vendors can create a copy of this class, modify it and bundle it with their own distribution if they want to connect their users to an other database.
Field Summary | |
static java.lang.String |
CONFIGURATION_FILE
The user configuration file. |
Fields inherited from interface org.geotools.referencing.factory.epsg.DataSource |
MAXIMUM_PRIORITY, MINIMUM_PRIORITY, NORMAL_PRIORITY |
Constructor Summary | |
PostgreDataSource()
Creates a new instance of this data source. |
|
PostgreDataSource(java.lang.String server,
java.lang.String database,
java.lang.String schema,
java.lang.String user,
java.lang.String password)
Creates a new instance of this data source with the specified default parameters. |
Method Summary | |
AbstractAuthorityFactory |
createFactory(Hints hints)
Open a connection and creates an EPSG factory for it. |
int |
getPriority()
Returns the priority for this data source. |
Methods inherited from class org.postgresql.jdbc3.Jdbc3SimpleDataSource |
createReference, getDescription |
Methods inherited from class org.postgresql.jdbc2.optional.BaseDataSource |
getConnection, getConnection, getDatabaseName, getLoginTimeout, getLogWriter, getPassword, getPortNumber, getReference, getServerName, getUser, readBaseObject, setDatabaseName, setLoginTimeout, setLogWriter, setPassword, setPortNumber, setServerName, setUser, writeBaseObject |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.sql.DataSource |
getConnection, getConnection, getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriter |
Field Detail |
public static final java.lang.String CONFIGURATION_FILE
Constructor Detail |
public PostgreDataSource()
public PostgreDataSource(java.lang.String server, java.lang.String database, java.lang.String schema, java.lang.String user, java.lang.String password)
server
- The server name.database
- The database name.schema
- The schema name, or if none.user
- The user name.password
- The password.Method Detail |
public int getPriority()
getPriority
in interface DataSource
public AbstractAuthorityFactory createFactory(Hints hints) throws java.sql.SQLException
createFactory
in interface DataSource
hints
- A map of hints, including the low-level factories to use for CRS creation.
java.sql.SQLException
- if connection to the database failed.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |