org.geotools.data.postgis
Class PostgisDataStore

Object
  extended by JDBC1DataStore
      extended by JDBC2DataStore
          extended by JDBCDataStore
              extended by PostgisDataStore
All Implemented Interfaces:
DataAccess<SimpleFeatureType,SimpleFeature>, DataStore

public class PostgisDataStore
extends JDBCDataStore
implements DataStore

Postgis DataStore implementation.

This datastore by default will read/write geometries in WKT format.
Optionally use of WKB can be turned on, in which case you may want to turn on also the use of the bytea function, that fasten the data trasfer, but that it's available only from version 0.7.2 onwards.

Author:
Chris Holmes, TOPP, Andrea Aime, Paolo Rizzi
Module:
modules/plugin/postgis (gt-postgis.jar)
TODO:
REVISIT: So Paolo Rizzi has a number of improvements in http://jira.codehuas.org/browse/GEOT-379 I rolled in a few of them, but some beg more fundamental questions - like the use of primary keys - in the geotools model. See the issue for a bit more discussion, and I will attempt to write my thoughts up on wiki soon. -ch

Field Summary
protected  boolean byteaEnabled
          If true, the bytea function will be used to optimize even further data loading when using WKB format
protected  boolean byteaWKB
          postgis 1.0 changed the way WKB is handled, this needs to be set if version >1.
protected  PostgisDBInfo dbInfo
          PostGIS version information (persisted here so we don't have to keep asking the database what version it is, in perpituity.
protected  boolean estimatedExtent
          set to true if the bounds for a table should be computed using the estimated_extent' function, but beware that this function is less accurate and in some cases *far* less accurate if the data within the actual bounds does not follow a uniform distribution.
protected static GeometryFactory geometryFactory
          Factory for producing geometries (from JTS).
protected static WKTReader geometryReader
          Well Known Text reader (from JTS).
protected static Logger LOGGER
          The logger for the postgis module.
protected  boolean looseBbox
          If true then the bounding box filters will use the && postgis operator, which uses the spatial index and performs against the envelope of the geom, leading to greater speed and slightly less accuracy.
 int OPTIMIZE_MODE
          Deprecated. Dot not use this directly, use getOptimizeMode().
static int OPTIMIZE_SAFE
          OPTIMIZE_MODE constants
static int OPTIMIZE_SQL
           
protected  boolean schemaEnabled
          Flag indicating whether schema support
protected  boolean useGeos
          Enables the use of geos operators
protected  boolean WKBEnabled
          If true, WKB format is used instead of WKT
 
Fields inherited from class JDBC2DataStore
dataSource
 
Fields inherited from class JDBC1DataStore
allowWriteOnVolatileFIDs, config, listenerManager, sqlNameEscape, transactionIsolation, TYPE_MAPPINGS, typeHandler
 
Constructor Summary
protected PostgisDataStore(DataSource dataSource)
           
  PostgisDataStore(DataSource dataSource, JDBCDataStoreConfig config, int optimizeMode)
           
protected PostgisDataStore(DataSource dataSource, String namespace)
           
protected PostgisDataStore(DataSource dataSource, String schema, String namespace)
           
protected PostgisDataStore(DataSource dataSource, String schema, String namespace, int optimizeMode)
           
 
Method Summary
protected  boolean allowTable(String tablename)
          Provides a hook for sub classes to filter out specific tables in the data store that are not to be used as geospatial tables.
protected  String[] attributeNames(SimpleFeatureType featureType, Filter filter)
          Gets the list of attribute names required for both featureType and filter
protected  AttributeDescriptor buildAttributeType(ResultSet metadataRs)
          Constructs an AttributeDescriptor from a row in a ResultSet.
protected  FIDMapper buildFIDMapper(String typeName, FIDMapperFactory factory)
          Builds the appropriate FID mapper given a table name and a FID mapper factory
protected  FIDMapperFactory buildFIDMapperFactory(JDBCDataStoreConfig config)
           
protected  SimpleFeatureType buildSchema(String typeName, FIDMapper mapper)
          Override this method to perform a few permission checks before the super class has a chance to do its thing.
 PostgisFeatureLocking createFeatureLockingInternal(PostgisDataStore ds, SimpleFeatureType type)
           
protected  JDBCFeatureWriter createFeatureWriter(FeatureReader<SimpleFeatureType,SimpleFeature> fReader, QueryData queryData)
          DOCUMENT ME!
protected  LockingManager createLockingManager()
          Allows subclass to create LockingManager to support their needs.
 void createSchema(SimpleFeatureType featureType)
          Creates a FeatureType in this instance of the PostgisDataStore.
protected  PostgisSQLBuilder createSQLBuilder()
          Creates a new sql builder for encoding raw sql statements;
protected  int determineSRID(String tableName, String geometryColumnName)
          DOCUMENT ME!
protected  int getConcurrency(boolean forWrite)
           
 DataSource getDataSource()
          Obtains the postgis datastore connection pool.
 PostgisDBInfo getDBInfo()
          Obtains database specific information, such as version, supported functions, etc.
 Envelope getEnvelope(String typeName)
          Retrieve approx bounds of all Features.
 FeatureReader<SimpleFeatureType,SimpleFeature> getFeatureReader(SimpleFeatureType requestType, Filter filter, Transaction transaction)
          This is a public entry point to the DataStore.
 FeatureSource<SimpleFeatureType,SimpleFeature> getFeatureSource(String typeName)
          Default implementation based on getFeatureReader and getFeatureWriter.
 FeatureWriter<SimpleFeatureType,SimpleFeature> getFeatureWriter(String typeName, Transaction transaction)
          Retrieve a FeatureWriter over entire dataset.
 FeatureWriter<SimpleFeatureType,SimpleFeature> getFeatureWriterAppend(String typeName, Transaction transaction)
          Retrieve a FeatureWriter for creating new content.
protected  AttributeIO getGeometryAttributeIO(AttributeDescriptor type, QueryData queryData)
          Hook to create the geometry attribute IO for a vendor specific data source.
 Integer getJdbcType(Class attributeTypeBinding)
          Returns the JDBC type constant (as in Types) that maps to the given Java class binding when constructing attribute types, or null if no such mapping exist.
 int getOptimizeMode()
           
protected  int getResultSetType(boolean forWrite)
           
 SimpleFeatureType getSchema(String arg0)
          Retrieve FeatureType metadata by typeName.
 SQLBuilder getSqlBuilder(String typeName)
          DOCUMENT ME!
 Set getSupportedHints()
           
 String[] getTypeNames()
          Retrieves a list of of the available FeatureTypes.
protected  void guessDataStoreOptions()
          Attempts to figure out some optimization options, based on some postgis metadata.
protected  void initBuilder(PostgisSQLBuilder builder)
           
 boolean isByteaEnabled()
          Returns true if the data store is using the bytea function to fasten WKB data transfer, false otherwise
 boolean isByteaWKB()
           
 boolean isEstimatedExtent()
           
 boolean isLooseBbox()
          Whether the bounding boxes issued against this postgis datastore are on the envelope of the geometry or the actual geometry.
 boolean isWKBEnabled()
          Returns true if the WKB format is used to transfer geometries, false otherwise
protected static String schema(String schema)
          Simple helper method to ensure that a schema is always set.
 void setByteaEnabled(boolean byteaEnabled)
          Enables the use of bytea function for WKB data transfer (will improve performance).
 void setByteaWKB(boolean byteaWKB)
           
 void setEstimatedExtent(boolean estimatedExtent)
          Enables the use of the 'estimated_extent' function for bounds computation.
 void setLooseBbox(boolean isLooseBbox)
          Sets this postgis instance to use a less strict but faster bounding box query.
 void setOptimizeMode(int mode)
          Sets the optimization mode for the datastore.
 void setWKBEnabled(boolean enabled)
          If turned on, WKB will be used to transfer geometry data instead of WKT
 void updateSchema(String typeName, SimpleFeatureType featureType)
          Used to provide support for changing the DataStore Schema.
 
Methods inherited from class JDBC2DataStore
createConnection, dispose, finalize
 
Methods inherited from class JDBC1DataStore
allSameOrder, createFeatureReader, determineFidColumnName, executeQuery, executeQuery, getAttributeIO, getAttributeTypes, getConnection, getDatabaseSchemaName, getFeatureReader, getFeatureSource, getFeatureTypeHandler, getFeatureWriter, getFIDMapper, getFIDMapperFactory, getInfo, getJDBCFeatureReader, getLockingManager, getNames, getNameSpace, getSchema, getSqlNameEscape, getTransactionIsolation, getView, propertyNames, requireAutoCommit, setAutoCommit, setFIDMapper, setFIDMapperFactory, setSqlNameEscape, setTransactionIsolation, updateSchema
 
Methods inherited from class Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface DataStore
getFeatureReader, getFeatureWriter, getLockingManager, getView
 
Methods inherited from interface DataAccess
dispose, getFeatureSource, getInfo, getNames, getSchema, updateSchema
 

Field Detail

LOGGER

protected static final Logger LOGGER
The logger for the postgis module.


geometryFactory

protected static GeometryFactory geometryFactory
Factory for producing geometries (from JTS).


geometryReader

protected static WKTReader geometryReader
Well Known Text reader (from JTS).


OPTIMIZE_SAFE

public static final int OPTIMIZE_SAFE
OPTIMIZE_MODE constants

See Also:
Constant Field Values

OPTIMIZE_SQL

public static final int OPTIMIZE_SQL
See Also:
Constant Field Values

dbInfo

protected PostgisDBInfo dbInfo
PostGIS version information (persisted here so we don't have to keep asking the database what version it is, in perpituity.


useGeos

protected boolean useGeos
Enables the use of geos operators


OPTIMIZE_MODE

public int OPTIMIZE_MODE
Deprecated. Dot not use this directly, use getOptimizeMode().
Current optimize mode


WKBEnabled

protected boolean WKBEnabled
If true, WKB format is used instead of WKT


byteaEnabled

protected boolean byteaEnabled
If true, the bytea function will be used to optimize even further data loading when using WKB format


byteaWKB

protected boolean byteaWKB
postgis 1.0 changed the way WKB is handled, this needs to be set if version >1. (it affects the way you send WKB to the database)


looseBbox

protected boolean looseBbox
If true then the bounding box filters will use the && postgis operator, which uses the spatial index and performs against the envelope of the geom, leading to greater speed and slightly less accuracy.


estimatedExtent

protected boolean estimatedExtent
set to true if the bounds for a table should be computed using the estimated_extent' function, but beware that this function is less accurate and in some cases *far* less accurate if the data within the actual bounds does not follow a uniform distribution.


schemaEnabled

protected boolean schemaEnabled
Flag indicating whether schema support

Constructor Detail

PostgisDataStore

protected PostgisDataStore(DataSource dataSource)
                    throws IOException
Throws:
IOException

PostgisDataStore

protected PostgisDataStore(DataSource dataSource,
                           String namespace)
                    throws IOException
Throws:
IOException

PostgisDataStore

protected PostgisDataStore(DataSource dataSource,
                           String schema,
                           String namespace)
                    throws IOException
Throws:
IOException

PostgisDataStore

protected PostgisDataStore(DataSource dataSource,
                           String schema,
                           String namespace,
                           int optimizeMode)
                    throws IOException
Throws:
IOException

PostgisDataStore

public PostgisDataStore(DataSource dataSource,
                        JDBCDataStoreConfig config,
                        int optimizeMode)
                 throws IOException
Throws:
IOException
Method Detail

schema

protected static String schema(String schema)
Simple helper method to ensure that a schema is always set.


createLockingManager

protected LockingManager createLockingManager()
Allows subclass to create LockingManager to support their needs.

Overrides:
createLockingManager in class JDBC1DataStore

createSQLBuilder

protected PostgisSQLBuilder createSQLBuilder()
Creates a new sql builder for encoding raw sql statements;


guessDataStoreOptions

protected void guessDataStoreOptions()
                              throws IOException
Attempts to figure out some optimization options, based on some postgis metadata. If the version is later than 0.7.2 then bytea will be used to read geometries if WKB is enabled. And it will read if GEOS is enabled from the version string as well.

Throws:
IOException

getTypeNames

public String[] getTypeNames()
                      throws IOException
Description copied from interface: DataStore
Retrieves a list of of the available FeatureTypes.

This is simply a list of the FeatureType names as aquiring the actual FeatureType schemas may be expensive.

Warning: this list may not be unique - the types may be in separate namespaces.

If you need to worry about such things please consider the use of the Catalog and CatalogEntry interface - many DataStores support this. getTypeNames is really a convience method for a Catalog.iterator() where the name of each entry is returned.

Specified by:
getTypeNames in interface DataStore
Overrides:
getTypeNames in class JDBC1DataStore
Returns:
typeNames for available FeatureTypes.
Throws:
IOException
See Also:
org.geotools.data.DataStore#getFeatureTypes()

getEnvelope

public Envelope getEnvelope(String typeName)
Retrieve approx bounds of all Features.

This result is suitable for a quick map display, illustrating the data. This value is often stored as metadata in databases such as oraclespatial.

Overrides:
getEnvelope in class JDBC1DataStore
Returns:
null as a generic implementation is not provided.

allowTable

protected boolean allowTable(String tablename)
Description copied from class: JDBC1DataStore
Provides a hook for sub classes to filter out specific tables in the data store that are not to be used as geospatial tables. The default implementation of this method is to allow all tables.

Overrides:
allowTable in class JDBC1DataStore
Parameters:
tablename - A table name to check.
Returns:
True if the table should be exposed as a FeaturSimpleFeatureTypee if it should be ignored.

buildSchema

protected SimpleFeatureType buildSchema(String typeName,
                                        FIDMapper mapper)
                                 throws IOException
Override this method to perform a few permission checks before the super class has a chance to do its thing.

Overrides:
buildSchema in class JDBC1DataStore
Parameters:
typeName - The name of the table to construct a feature type for.
mapper - The name of the column holding the fid.
Returns:
The FeatureType for the table.
Throws:
IOException
DataSourceException - This can occur if there is an SQL error or an error constructing the FeatureType.
See Also:
JDBC1DataStore.buildAttributeType(ResultSet)

getFeatureReader

public FeatureReader<SimpleFeatureType,SimpleFeature> getFeatureReader(SimpleFeatureType requestType,
                                                                       Filter filter,
                                                                       Transaction transaction)
                                                                throws IOException
This is a public entry point to the DataStore.

We have given some though to changing this api to be based on query.

Currently this is the only way to retype your features to different name spaces.

(non-Javadoc)

Overrides:
getFeatureReader in class JDBC1DataStore
Throws:
IOException
See Also:
org.geotools.data.DataStore#getFeatureReader(org.geotools.feature.FeatureType, org.geotools.filter.Filter, org.geotools.data.Transaction)

attributeNames

protected String[] attributeNames(SimpleFeatureType featureType,
                                  Filter filter)
                           throws IOException
Gets the list of attribute names required for both featureType and filter

Overrides:
attributeNames in class JDBC1DataStore
Parameters:
featureType - The FeatureType to get attribute names for.
filter - The filter which needs attributes to filter.
Returns:
The list of attribute names required by a filter.
Throws:
IOException - If we can't get the schema.

getSqlBuilder

public SQLBuilder getSqlBuilder(String typeName)
                         throws IOException
DOCUMENT ME!

Overrides:
getSqlBuilder in class JDBC1DataStore
Parameters:
typeName -
Returns:
DOCUMENT ME!
Throws:
IOException - DOCUMENT ME!

initBuilder

protected void initBuilder(PostgisSQLBuilder builder)

determineSRID

protected int determineSRID(String tableName,
                            String geometryColumnName)
                     throws IOException
DOCUMENT ME!

Overrides:
determineSRID in class JDBC1DataStore
Parameters:
tableName -
geometryColumnName -
Returns:
The SRID for the geometry column in the table or -1.
Throws:
IOException - DOCUMENT ME!
DataSourceException - DOCUMENT ME!

buildAttributeType

protected AttributeDescriptor buildAttributeType(ResultSet metadataRs)
                                          throws IOException
Constructs an AttributeDescriptor from a row in a ResultSet. The ResultSet contains the information retrieved by a call to getColumns() on the DatabaseMetaData object. This information can be used to construct an Attribute Type.

This implementation construct an AttributeDescriptor using the default JDBC type mappings defined in JDBCDataStore. These type mappings only handle native Java classes and SQL standard column types. If a geometry type is found then getGeometryAttribute is called.

Note: Overriding methods must never move the current row pointer in the result set.

Overrides:
buildAttributeType in class JDBC1DataStore
Parameters:
metadataRs - The ResultSet containing the result of a DatabaseMetaData.getColumns call.
Returns:
The AttributeDescriptor built from the ResultSet.
Throws:
IOException - If an error occurs processing the ResultSet.

buildFIDMapperFactory

protected FIDMapperFactory buildFIDMapperFactory(JDBCDataStoreConfig config)
Overrides:
buildFIDMapperFactory in class JDBC1DataStore
See Also:
JDBC1DataStore.buildFIDMapperFactory(org.geotools.data.jdbc.JDBCDataStoreConfig)

buildFIDMapper

protected FIDMapper buildFIDMapper(String typeName,
                                   FIDMapperFactory factory)
                            throws IOException
Description copied from class: JDBC1DataStore
Builds the appropriate FID mapper given a table name and a FID mapper factory

Overrides:
buildFIDMapper in class JDBC1DataStore
Throws:
IOException

createSchema

public void createSchema(SimpleFeatureType featureType)
                  throws IOException
Creates a FeatureType in this instance of the PostgisDataStore. Since we don't yet know which attribute in the FeatureType is the primary key, we will create our own called "fid_tablename", which has its own sequence called "tablename_fid_seq". The user should not interact with this column, although its value will be the FID. This method currently assumes there are only 2 dimensions.

Specified by:
createSchema in interface DataAccess<SimpleFeatureType,SimpleFeature>
Overrides:
createSchema in class JDBC1DataStore
Parameters:
featureType - FetureType to add to DataStore
Throws:
IOException - if something goes horribly wrong or the table already exists
See Also:
org.geotools.data.DataStore#createSchema(org.geotools.feature.FeatureType)

updateSchema

public void updateSchema(String typeName,
                         SimpleFeatureType featureType)
                  throws IOException
Description copied from class: JDBC1DataStore
Used to provide support for changing the DataStore Schema.

Specifically this is intended to address updating the metadata Coordinate System information.

If we can figure out the Catalog API for metadata we will not have to use such a heavy handed approach.

Subclasses are free to implement various levels of support:

Specified by:
updateSchema in interface DataStore
Overrides:
updateSchema in class JDBC1DataStore
Throws:
IOException
See Also:
org.geotools.data.DataStore#updateSchema(java.lang.String, org.geotools.feature.FeatureType)

getFeatureSource

public FeatureSource<SimpleFeatureType,SimpleFeature> getFeatureSource(String typeName)
                                                                throws IOException
Default implementation based on getFeatureReader and getFeatureWriter.

We should be able to optimize this to only get the RowSet once

Specified by:
getFeatureSource in interface DataStore
Overrides:
getFeatureSource in class JDBC1DataStore
Returns:
FeatureSource (or subclass) providing operations for typeName
Throws:
IOException
See Also:
DataStore.getFeatureSource(java.lang.String)

createFeatureLockingInternal

public PostgisFeatureLocking createFeatureLockingInternal(PostgisDataStore ds,
                                                          SimpleFeatureType type)
                                                   throws IOException
Throws:
IOException

createFeatureWriter

protected JDBCFeatureWriter createFeatureWriter(FeatureReader<SimpleFeatureType,SimpleFeature> fReader,
                                                QueryData queryData)
                                         throws IOException
DOCUMENT ME!

Overrides:
createFeatureWriter in class JDBC1DataStore
Parameters:
fReader -
queryData -
Throws:
IOException - DOCUMENT ME!

getFeatureWriter

public FeatureWriter<SimpleFeatureType,SimpleFeature> getFeatureWriter(String typeName,
                                                                       Transaction transaction)
                                                                throws IOException
Retrieve a FeatureWriter over entire dataset.

Quick notes: This FeatureWriter is often used to add new content, or perform summary calculations over the entire dataset.

Subclass may wish to implement an optimized featureWriter for these operations.

It should provide Feature for next() even when hasNext() is false.

Subclasses are responsible for checking with the lockingManger unless they are providing their own locking support.

Specified by:
getFeatureWriter in interface DataStore
Overrides:
getFeatureWriter in class JDBC1DataStore
Parameters:
typeName -
transaction -
Returns:
FeatureReader Allows Sequential Processing of featureType
Throws:
IOException
See Also:
org.geotools.data.DataStore#getFeatureWriter(java.lang.String, boolean, org.geotools.data.Transaction)

getFeatureWriterAppend

public FeatureWriter<SimpleFeatureType,SimpleFeature> getFeatureWriterAppend(String typeName,
                                                                             Transaction transaction)
                                                                      throws IOException
Retrieve a FeatureWriter for creating new content.

Subclass may wish to implement an optimized featureWriter for this operation. One based on prepared statements is a possibility, as we do not require a ResultSet.

To allow new content the FeatureWriter should provide Feature for next() even when hasNext() is false.

Subclasses are responsible for checking with the lockingManger unless they are providing their own locking support.

Specified by:
getFeatureWriterAppend in interface DataStore
Overrides:
getFeatureWriterAppend in class JDBC1DataStore
Parameters:
typeName -
transaction -
Returns:
FeatureWriter that may only be used to append new content
Throws:
IOException
See Also:
org.geotools.data.DataStore#getFeatureWriter(java.lang.String, boolean, org.geotools.data.Transaction)

getGeometryAttributeIO

protected AttributeIO getGeometryAttributeIO(AttributeDescriptor type,
                                             QueryData queryData)
Description copied from class: JDBC1DataStore
Hook to create the geometry attribute IO for a vendor specific data source.

Specified by:
getGeometryAttributeIO in class JDBC1DataStore
Parameters:
type - The AttributeDescriptor to read.
queryData - The connection holder
Returns:
The AttributeIO that will read and write the geometry from the results.
See Also:
org.geotools.data.jdbc.JDBCDataStore#getGeometryAttributeIO(org.geotools.feature.AttributeDescriptor)

getResultSetType

protected int getResultSetType(boolean forWrite)
Overrides:
getResultSetType in class JDBC1DataStore

getConcurrency

protected int getConcurrency(boolean forWrite)
Overrides:
getConcurrency in class JDBC1DataStore

isWKBEnabled

public boolean isWKBEnabled()
Returns true if the WKB format is used to transfer geometries, false otherwise


setWKBEnabled

public void setWKBEnabled(boolean enabled)
If turned on, WKB will be used to transfer geometry data instead of WKT

Parameters:
enabled -

setLooseBbox

public void setLooseBbox(boolean isLooseBbox)
Sets this postgis instance to use a less strict but faster bounding box query. Setting this to true will have PostGIS issue bounding box queries against the envelope of the geometry, so some may be slighty wrong, but will perform much faster. The intersects function can still be used to obtain the exact query.

Parameters:
isLooseBbox - true if this should have a loose Bbox.

isLooseBbox

public boolean isLooseBbox()
Whether the bounding boxes issued against this postgis datastore are on the envelope of the geometry or the actual geometry.

Returns:
true if the bounding box is 'loose', against the envelope instead of the actual geometry.

isByteaEnabled

public boolean isByteaEnabled()
Returns true if the data store is using the bytea function to fasten WKB data transfer, false otherwise


setByteaWKB

public void setByteaWKB(boolean byteaWKB)

isByteaWKB

public boolean isByteaWKB()

setByteaEnabled

public void setByteaEnabled(boolean byteaEnabled)
Enables the use of bytea function for WKB data transfer (will improve performance). Note this function need not be set by the programmer, as the datastore will use it to optimize performance whenever it can (when postGIS is 0.7.2 or later)

Parameters:
byteaEnabled -

setEstimatedExtent

public void setEstimatedExtent(boolean estimatedExtent)
Enables the use of the 'estimated_extent' function for bounds computation.

Beware that this function is an approximation and is dependent on the degree to with the data in the actual bounds follows a uniform distribution.


isEstimatedExtent

public boolean isEstimatedExtent()
See Also:
#setEstimatedExtent(boolean)}.

setOptimizeMode

public void setOptimizeMode(int mode)
Sets the optimization mode for the datastore.

Parameters:
mode - One of OPTIMIZE_SAFE,OPTIMIZE_SQL.

getOptimizeMode

public int getOptimizeMode()

getSchema

public SimpleFeatureType getSchema(String arg0)
                            throws IOException
Description copied from interface: DataStore
Retrieve FeatureType metadata by typeName.

Retrieves the Schema information as a FeatureType object.

Specified by:
getSchema in interface DataStore
Overrides:
getSchema in class JDBC1DataStore
Parameters:
arg0 - typeName of requested FeatureType
Returns:
FeatureType for the provided typeName
Throws:
IOException - If typeName cannot be found
See Also:
DataStore.getSchema(java.lang.String)

getDataSource

public DataSource getDataSource()
Obtains the postgis datastore connection pool.

Returns:
ConnectionPool

getDBInfo

public PostgisDBInfo getDBInfo()
Obtains database specific information, such as version, supported functions, etc.


getJdbcType

public Integer getJdbcType(Class attributeTypeBinding)
Returns the JDBC type constant (as in Types) that maps to the given Java class binding when constructing attribute types, or null if no such mapping exist.

Parameters:
attributeTypeBinding -
Returns:

getSupportedHints

public Set getSupportedHints()
Overrides:
getSupportedHints in class JDBC1DataStore


Copyright © 1996-2009 Geotools. All Rights Reserved.