|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.geotools.data.jdbc.JDBC1DataStore org.geotools.data.jdbc.JDBC2DataStore org.geotools.data.jdbc.JDBCDataStore org.geotools.data.geometryless.JDBCDataStore org.geotools.data.geometryless.LocationsXYDataStore
An implementation of the GeoTools Data Store API for a generic non-spatial database platform.
This specialisation uses X,Y (lat/lon) database colums to hold point geometries
the constructor is used to pass metadata from datastore to SQLEncoder class
Please see class JDBCDataStore
and
interface DataStore
for DataStore usage details.
Field Summary |
Fields inherited from class org.geotools.data.geometryless.JDBCDataStore |
DEFAULT_NAMESPACE |
Fields inherited from class org.geotools.data.jdbc.JDBC2DataStore |
connectionPool |
Fields inherited from class org.geotools.data.jdbc.JDBC1DataStore |
allowWriteOnVolatileFIDs, config, listenerManager, sqlNameEscape, TYPE_MAPPINGS, typeHandler |
Constructor Summary | |
LocationsXYDataStore(ConnectionPool connectionPool)
|
|
LocationsXYDataStore(ConnectionPool connectionPool,
java.lang.String databaseSchemaName,
java.lang.String x,
java.lang.String y,
java.lang.String geomName)
Constructor for LocationsXYDataStore where the database schema name is provided. |
Method Summary | |
protected AttributeType |
buildAttributeType(java.sql.ResultSet rs)
Constructs an AttributeType from a row in a ResultSet. |
protected JDBCFeatureWriter |
createFeatureWriter(FeatureReader reader,
QueryData queryData)
|
FeatureWriter |
getFeatureWriter(java.lang.String typeName)
Utility method for getting a FeatureWriter for modifying existing features, using no feature filtering and auto-committing. |
FeatureWriter |
getFeatureWriterAppend(java.lang.String typeName)
Utility method for getting a FeatureWriter for adding new features, using auto-committing. |
protected AttributeIO |
getGeometryAttributeIO(AttributeType type,
QueryData queryData)
Hook to create the geometry attribute IO for a vendor specific data source. |
SQLBuilder |
getSqlBuilder(java.lang.String typeName)
Hook for subclass to return a different sql builder. |
Methods inherited from class org.geotools.data.jdbc.JDBC2DataStore |
createConnection |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public LocationsXYDataStore(ConnectionPool connectionPool) throws java.io.IOException
public LocationsXYDataStore(ConnectionPool connectionPool, java.lang.String databaseSchemaName, java.lang.String x, java.lang.String y, java.lang.String geomName) throws java.io.IOException
connectionPool
- a MySQL ConnectionPool
databaseSchemaName
- the database schema. Can be null. See the comments for the parameter schemaPattern in DatabaseMetaData.getTables
, because databaseSchemaName behaves in the same way.
java.io.IOException
- if the database cannot be properly accessedMethod Detail |
public FeatureWriter getFeatureWriter(java.lang.String typeName) throws java.io.IOException
getFeatureWriter
in class JDBCDataStore
typeName
- the feature type name (the table name)
java.io.IOException
- if the database cannot be properly accessedpublic FeatureWriter getFeatureWriterAppend(java.lang.String typeName) throws java.io.IOException
getFeatureWriterAppend
in class JDBCDataStore
typeName
- the feature type name (the table name)
java.io.IOException
- if the database cannot be properly accessedprotected AttributeType buildAttributeType(java.sql.ResultSet rs) throws java.io.IOException
In addition to standard SQL types, this method identifies MySQL 4.1's geometric datatypes and creates attribute types accordingly. This happens when the datatype, identified by column 5 of the ResultSet parameter, is equal to java.sql.Types.OTHER. If a Types.OTHER ends up not being geometric, this method simply calls the parent class's buildAttributeType method to do something with it.
Note: Overriding methods must never move the current row pointer in the result set.
buildAttributeType
in class JDBCDataStore
rs
- The ResultSet containing the result of a
DatabaseMetaData.getColumns call.
java.sql.SQLException
- If an error occurs processing the ResultSet.
DataSourceException
- Provided for overriding classes to wrap
exceptions caused by other operations they may perform to
determine additional types. This will only be thrown by the
default implementation if a type is present that is not present
in the TYPE_MAPPINGS.
java.io.IOException
public SQLBuilder getSqlBuilder(java.lang.String typeName) throws java.io.IOException
JDBC1DataStore
getSqlBuilder
in class JDBCDataStore
java.io.IOException
protected AttributeIO getGeometryAttributeIO(AttributeType type, QueryData queryData)
JDBC1DataStore
getGeometryAttributeIO
in class JDBCDataStore
org.geotools.data.jdbc.JDBCDataStore#getGeometryAttributeIO(org.geotools.feature.AttributeType)
protected JDBCFeatureWriter createFeatureWriter(FeatureReader reader, QueryData queryData) throws java.io.IOException
createFeatureWriter
in class JDBCDataStore
java.io.IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |