|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
javax.sql.DataSource is a cause of
troubles in JEE environments. Subclass directly ThreadedEpsgFactory instead.
NOTE: After the removal of this interface, we will need to unregister
ThreadedEpsgFactory from META-INF/services.
public interface DataSource
A marker interface for data source to an EPSG database. This sub-interface of J2SE's
DataSource is used as a category for ServiceRegistry.
EPSG data sources should be registered in the following file:
For an example, seeMETA-INF/services/org.geotools.referencing.factory.epsg.DataSource
AccessDataSource
and its META-INF/services/ registration in the plugin/epsg-access
module. This is a very small module which can be used as a starting point for custom
EPSG data sources.
ThreadedEpsgFactory is registered and returned by ReferencingFactoryFinder.
We don't need to register any other implementation for an EPSG factory backed by a SQL database.
However, ThreadedEpsgFactory alone is not suffisient for querying the database. It needs one
more "plugable" information: the connection to the EPSG database. This
DataSource interface is there for providing such connection to ThreadedEpsgFactory.
Some time after ThreadedEpsgFactory is registered as an EPSG factory, it looks for a
DataSource using the same plugins mechanism than for factories. In other words,
DataSource is a second level of plugins used internally by ThreadedEpsgFactory.
modules/library/referencing (gt2-referencing.jar) (Maven report) (SVN head)| Field Summary | |
|---|---|
static int |
MAXIMUM_PRIORITY
Deprecated. The maximum priority for a data source, which is 100. |
static int |
MINIMUM_PRIORITY
Deprecated. The minimum priority for a data source, which is 1. |
static int |
NORMAL_PRIORITY
Deprecated. The default priority, which is 50. |
| Method Summary | |
|---|---|
AbstractAuthorityFactory |
createFactory(Hints hints)
Deprecated. Opens a connection and creates an EPSG factory for it. |
int |
getPriority()
Deprecated. Returns the priority for this data source, as a number between MINIMUM_PRIORITY and MAXIMUM_PRIORITY inclusive. |
| Methods inherited from interface DataSource |
|---|
getConnection, getConnection |
| Methods inherited from interface CommonDataSource |
|---|
getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriter |
| Methods inherited from interface Wrapper |
|---|
isWrapperFor, unwrap |
| Field Detail |
|---|
static final int MINIMUM_PRIORITY
static final int NORMAL_PRIORITY
static final int MAXIMUM_PRIORITY
| Method Detail |
|---|
int getPriority()
MINIMUM_PRIORITY and MAXIMUM_PRIORITY inclusive.
AbstractAuthorityFactory createFactory(Hints hints)
throws SQLException
DirectEpsgFactory if it wants to use slightly different SQL queries.
hints - A map of hints, including the low-level factories to use for CRS creation.
This argument should be given unchanged to DirectEpsgFactory constructor.
SQLException - if connection to the database failed.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||