| java.lang.Object org.geotools.factory.AbstractFactory org.geotools.data.geometryless.BBOXDataStoreFactory
BBOXDataStoreFactory | public class BBOXDataStoreFactory 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.
REVISIT: I believe the use of the namespace param needs to be revisited. GeoServer
is going to start making use of this, as the XML namespace that the feature
type should be created with. The use of namespace in this package is that
of a database schema name. Though investigating futher it looks like all
the dbs use it that way. So this is just a note that xml namespace and
database namespace need to be reconciled. The work done in this package
seems to be begging some datastore hierarchy refactoring, hopefully when
we do that we can also get jdbc datastore factories in a hierarchy, instead
of each just doing their own thing. -ch
author: Rob Atkinson, Social Change Online author: Chris Holmes, TOPP version: $Id: BBOXDataStoreFactory.java 27862 2007-11-12 19:51:19Z desruisseaux $ |
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 Map | getImplementationHints() | 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.
|
GEOMNAME | final static Param GEOMNAME(Code) | | |
MAXXCOLUMN | final static Param MAXXCOLUMN(Code) | | Param, package visibiity for JUnit tests
|
MAXYCOLUMN | final static Param MAXYCOLUMN(Code) | | Param, package visibiity for JUnit tests
|
MINXCOLUMN | final static Param MINXCOLUMN(Code) | | Param, package visibiity for JUnit tests
|
MINYCOLUMN | final static Param MINYCOLUMN(Code) | | Param, package visibiity for JUnit tests
|
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
|
BBOXDataStoreFactory | public BBOXDataStoreFactory()(Code) | | Creates a new instance of - this constructor needed for factory finder apparently
|
BBOXDataStoreFactory | public BBOXDataStoreFactory(Map hints)(Code) | | Creates a new instance of PostgisDataStoreFactory.
Note: the map of thins is used when constructing datastore instandces,
as such it needs to be passed onto the datastores so that they can make use of this
information when creating content.
|
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 BBOX, 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 BBOX, 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. |
getImplementationHints | public Map getImplementationHints()(Code) | | |
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. |
|
|