Class ExtendedInfo
java.lang.Object
org.apache.sis.internal.sql.feature.InfoStatements
org.apache.sis.internal.sql.postgis.ExtendedInfo
- All Implemented Interfaces:
AutoCloseable
,Localized
A specialization for PostGIS database of prepared statements about spatial information.
- Since:
- 1.2
- Version:
- 1.1
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.sis.internal.sql.feature.InfoStatements
InfoStatements.GeometryTypeEncoding
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate PreparedStatement
A statement for fetching geometric information for a specific column.protected PreparedStatement
A statement for fetching raster information for a specific column.private RasterReader
The object for reading a raster, ornull
if not yet created.Fields inherited from class org.apache.sis.internal.sql.feature.InfoStatements
geometryColumns
-
Constructor Summary
ConstructorsConstructorDescriptionExtendedInfo
(Database<?> session, Connection connection) Creates an initially emptyPostgisStatements
which will use the given connection for creatingPreparedStatement
s. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Closes all prepared statements.void
completeIntrospection
(TableReference source, Map<String, Column> columns) Gets all geometry columns for the given table and sets the geometry information on the corresponding columns.(package private) final RasterReader
Returns a reader for decoding PostGIS Raster binary format to grid coverage instances.Methods inherited from class org.apache.sis.internal.sql.feature.InfoStatements
configureSpatialColumns, fetchCRS, findSRID, getComponentMapping, getLocale, prepareIntrospectionStatement
-
Field Details
-
geographyColumns
A statement for fetching geometric information for a specific column. This statement is used for objects of type "Geography", which is a data type specific to PostGIS. -
rasterColumns
A statement for fetching raster information for a specific column. -
rasterReader
The object for reading a raster, ornull
if not yet created.
-
-
Constructor Details
-
ExtendedInfo
ExtendedInfo(Database<?> session, Connection connection) Creates an initially emptyPostgisStatements
which will use the given connection for creatingPreparedStatement
s.
-
-
Method Details
-
completeIntrospection
public void completeIntrospection(TableReference source, Map<String, Column> columns) throws ExceptionGets all geometry columns for the given table and sets the geometry information on the corresponding columns.- Overrides:
completeIntrospection
in classInfoStatements
- Parameters:
source
- the table for which to get all geometry columns.columns
- all columns for the specified table. Keys are column names.- Throws:
DataStoreContentException
- if a logical error occurred in processing data.ParseException
- if the WKT cannot be parsed.SQLException
- if a SQL error occurred.Exception
-
getRasterReader
Returns a reader for decoding PostGIS Raster binary format to grid coverage instances. -
close
Closes all prepared statements. This method does not close the connection.- Specified by:
close
in interfaceAutoCloseable
- Overrides:
close
in classInfoStatements
- Throws:
SQLException
- if an error occurred while closing a connection.
-