| java.lang.Object org.geotools.factory.AbstractFactory org.geotools.data.geometryless.JDBCDataStoreFactory
JDBCDataStoreFactory | public class JDBCDataStoreFactory extends AbstractFactory implements org.geotools.data.DataStoreFactorySpi(Code) | | Creates a Geometryless JDBC based on the conection params.
This factory should be registered in the META-INF/ folder, under services/
in the DataStoreFactorySpi file.
author: Rob Atkinson, Social Change Online |
Method Summary | |
public boolean | canProcess(Map params) Checks to see if all the postgis params are there.
Should have:
-
dbtype: equal to postgis
-
host
-
user
-
passwd
-
database
-
charset
Parameters: params - Set of parameters needed for a jdbc data store. | public DataStore | createDataStore(Map params) Construct a postgis data store using the params.
Parameters: params - The full set of information needed to construct a livedata source. | public DataStore | createNewDataStore(Map params) The datastore cannot create a new database. | public String | getDescription() Describe the nature of the datasource constructed by this factory. | public String | getDisplayName() | public Param[] | getParametersInfo() Describe parameters. | public boolean | isAvailable() Test to see if this datastore is available, if it has all the
appropriate libraries to construct a datastore. |
CHARSET | final static Param CHARSET(Code) | | Param, package visibiity for JUnit tests.
Example of a non simple Param type where custom parse method is
required.
When we convert to BeanInfo custom PropertyEditors will be required for
this Param.
|
DBTYPE | final static Param DBTYPE(Code) | | Param, package visibiity for JUnit tests
|
DRIVER | final static Param DRIVER(Code) | | Specified JDBC driver class.
|
NAMESPACE | final static Param NAMESPACE(Code) | | Param, package visibiity for JUnit tests
|
PASSWD | final static Param PASSWD(Code) | | Param, package visibiity for JUnit tests
|
SCHEMA | final static Param SCHEMA(Code) | | Param, package visibiity for JUnit tests
|
URLPREFIX | final static Param URLPREFIX(Code) | | Specified JDBC driver class calling URL
|
USER | final static Param USER(Code) | | Param, package visibiity for JUnit tests
|
arrayParameters | final static Param[] arrayParameters(Code) | | Array with all of the params
|
JDBCDataStoreFactory | public JDBCDataStoreFactory()(Code) | | Creates a new instance of - this constructor needed for factory finder apparently
|
JDBCDataStoreFactory | public JDBCDataStoreFactory(Map hints)(Code) | | Creates a new instance of PostgisDataStoreFactory
|
canProcess | public boolean canProcess(Map params)(Code) | | Checks to see if all the postgis params are there.
Should have:
-
dbtype: equal to postgis
-
host
-
user
-
passwd
-
database
-
charset
Parameters: params - Set of parameters needed for a jdbc data store. true if dbtype equals jdbc, and contains keysfor host, user, passwd, and database. |
createDataStore | public DataStore createDataStore(Map params) throws IOException(Code) | | Construct a postgis data store using the params.
Parameters: params - The full set of information needed to construct a livedata source. Should have dbtype equal to postgis, as well ashost, user, passwd, database, and table. The created DataSource, this may be null if the requiredresource was not found or if insufficent parameters were given.Note that canProcess() should have returned false if theproblem is to do with insuficent parameters. throws: IOException - See DataSourceException throws: DataSourceException - Thrown if there were any problems creatingor connecting the datasource. |
getDescription | public String getDescription()(Code) | | Describe the nature of the datasource constructed by this factory.
A human readable description that is suitable for inclusion in alist of available datasources. |
isAvailable | public boolean isAvailable()(Code) | | Test to see if this datastore is available, if it has all the
appropriate libraries to construct a datastore. This datastore just
returns true for now. This method is used for gui apps, so as to not
advertise data store capabilities they don't actually have.
true if and only if this factory is available to createDataStores. |
|
|