public class SampleDataAccessFactory extends Object implements DataAccessFactory
DataAccessFactory for testing.
Enabled with a connection parameter "dbtype" of "sample-data-access".
DataAccessFactory.Param| Modifier and Type | Field and Description |
|---|---|
static DataAccessFactory.Param |
DBTYPE |
static String |
DBTYPE_STRING
The "dbtype" connection string required to use this factory.
|
static HashMap<String,Serializable> |
PARAMS
The connection parameters required to use this factory.
|
| Constructor and Description |
|---|
SampleDataAccessFactory() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canProcess(Map<String,Serializable> params)
Are these parameters for us?
|
DataAccess<? extends FeatureType,? extends Feature> |
createDataStore(Map<String,Serializable> params)
Create a
SampleDataAccess. |
String |
getDescription()
Need to implement this.
|
String |
getDisplayName()
Need to implement this.
|
Map<RenderingHints.Key,?> |
getImplementationHints()
Returns an empty list, containing no hints.
|
DataAccessFactory.Param[] |
getParametersInfo()
Need to implement this.
|
boolean |
isAvailable()
Returns true, as this implementation is always available.
|
public static final String DBTYPE_STRING
public static final DataAccessFactory.Param DBTYPE
public static final HashMap<String,Serializable> PARAMS
public boolean canProcess(Map<String,Serializable> params)
canProcess in interface DataAccessFactoryparams - The full set of information needed to construct a live data source.DataAccessFactory.canProcess(java.util.Map)public DataAccess<? extends FeatureType,? extends Feature> createDataStore(Map<String,Serializable> params) throws IOException
SampleDataAccess.createDataStore in interface DataAccessFactoryparams - The full set of information needed to construct a live data store. Typical key
values for the map include: url - location of a resource, used by file reading
datasources. dbtype - the type of the database to connect to, e.g. postgis, mysqlIOException - if there were any problems setting up (creating or connecting) the
datasource.DataAccessFactory.createDataStore(java.util.Map)public String getDescription()
getDescription in interface DataAccessFactoryDataAccessFactory.getDescription()public String getDisplayName()
getDisplayName in interface DataAccessFactoryDataAccessFactory.getDisplayName()public DataAccessFactory.Param[] getParametersInfo()
getParametersInfo in interface DataAccessFactoryDataAccessFactory.getParametersInfo()public boolean isAvailable()
isAvailable in interface DataAccessFactoryDataAccessFactory.isAvailable()public Map<RenderingHints.Key,?> getImplementationHints()
getImplementationHints in interface FactoryFactory.getImplementationHints()Copyright © 1996–2019 Geotools. All rights reserved.