| java.lang.Object org.geotools.data.AbstractDataStoreFactory org.geotools.data.postgis.PostgisDataStoreFactory
PostgisDataStoreFactory | public class PostgisDataStoreFactory extends AbstractDataStoreFactory implements org.geotools.data.DataStoreFactorySpi(Code) | | Creates a PostgisDataStore baed on the correct params.
This factory should be registered in the META-INF/ folder, under services/
in the DataStoreFactorySpi file.
author: Jody Garnett, Refractions Research |
DATABASE | final public static Param DATABASE(Code) | | |
DBTYPE | final public static Param DBTYPE(Code) | | |
ESTIMATEDEXTENT | final public static Param ESTIMATEDEXTENT(Code) | | |
HOST | final public static Param HOST(Code) | | |
LOOSEBBOX | final public static Param LOOSEBBOX(Code) | | |
MAXCONN | final public static Param MAXCONN(Code) | | |
MINCONN | final public static Param MINCONN(Code) | | |
NAMESPACE | final public static Param NAMESPACE(Code) | | |
PASSWD | final public static Param PASSWD(Code) | | |
PORT | final public static Param PORT(Code) | | |
SCHEMA | final public static Param SCHEMA(Code) | | |
USER | final public static Param USER(Code) | | |
VALIDATECONN | final public static Param VALIDATECONN(Code) | | |
WKBENABLED | final public static Param WKBENABLED(Code) | | |
PostgisDataStoreFactory | public PostgisDataStoreFactory()(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 postgis data store. true if dbtype equals postgis, 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) | | Determines if the appropriate libraries are present for this datastore
factory to successfully produce postgis datastores.
true if the postgresql jar is on the classpath. |
|
|