| java.lang.Object org.geotools.factory.AbstractFactory org.geotools.data.geometryless.LocationsXYDataStoreFactory
LocationsXYDataStoreFactory | public class LocationsXYDataStoreFactory 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: LocationsXYDataStoreFactory.java 25031 2007-04-05 09:52:31Z version: robatkinson $ |
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 live datasource. | 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.
|
GEOMNAME | final static Param GEOMNAME(Code) | | |
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
|
XCOLUMN | final static Param XCOLUMN(Code) | | Param, package visibiity for JUnit tests
|
YCOLUMN | final static Param YCOLUMN(Code) | | Param, package visibiity for JUnit tests
|
arrayParameters | final static Param[] arrayParameters(Code) | | Array with all of the params
|
LocationsXYDataStoreFactory | public LocationsXYDataStoreFactory()(Code) | | Creates a new instance of - this constructor needed for factory finder
apparently
|
LocationsXYDataStoreFactory | public LocationsXYDataStoreFactory(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 locationsXy, and containskeys for 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 live datasource. Should have dbtype equal to locationsxy, as well ashost, user, passwd, database, and table. The created DataSource, this may be null if the required resourcewas not found or if insufficent parameters were given. Note thatcanProcess() should have returned false if the problem is to dowith insuficent parameters. throws: IOException - See DataSourceException throws: DataSourceException - Thrown if there were any problems creating or connecting thedatasource. |
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 tocreate DataStores. |
|
|