Package org.citydb.database.adapter
Class AbstractUtilAdapter
- java.lang.Object
-
- org.citydb.database.adapter.AbstractUtilAdapter
-
- Direct Known Subclasses:
UtilAdapter
,UtilAdapter
public abstract class AbstractUtilAdapter extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected AbstractDatabaseAdapter
databaseAdapter
protected java.sql.CallableStatement
interruptableCallableStatement
protected java.sql.PreparedStatement
interruptablePreparedStatement
protected boolean
isInterrupted
protected java.util.concurrent.ConcurrentHashMap<java.lang.Integer,DatabaseSrs>
srsInfoMap
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractUtilAdapter(AbstractDatabaseAdapter databaseAdapter)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract BoundingBox
calcBoundingBox(java.lang.String schema, java.util.List<java.lang.Integer> classIds, java.sql.Connection connection)
BoundingBox
calcBoundingBox(java.util.List<java.lang.Integer> objectClassIds)
BoundingBox
calcBoundingBox(Query query, SchemaMapping schemaMapping)
void
changeSrs(DatabaseSrs srs, boolean doTransform, java.lang.String schema)
protected abstract void
changeSrs(DatabaseSrs srs, boolean doTransform, java.lang.String schema, java.sql.Connection connection)
int
cleanupGlobalAppearances(java.lang.String schema)
protected abstract int
cleanupGlobalAppearances(java.lang.String schema, java.sql.Connection connection)
boolean
containsGlobalAppearances()
protected abstract boolean
containsGlobalAppearances(java.sql.Connection connection)
BoundingBox
createBoundingBoxes(java.util.List<java.lang.Integer> objectClassIds, boolean onlyIfNull)
protected abstract BoundingBox
createBoundingBoxes(java.util.List<java.lang.Integer> classIds, boolean onlyIfNull, java.sql.Connection connection)
java.lang.String[]
createDatabaseReport()
protected abstract java.lang.String[]
createDatabaseReport(java.lang.String schema, java.sql.Connection connection)
IndexStatusInfo
createNormalIndexes()
IndexStatusInfo
createSpatialIndexes()
org.opengis.referencing.crs.CoordinateReferenceSystem
decodeDatabaseSrs(DatabaseSrs srs)
IndexStatusInfo
dropNormalIndexes()
IndexStatusInfo
dropSpatialIndexes()
int
get2DSrid(DatabaseSrs srs)
protected abstract int
get2DSrid(DatabaseSrs srs, java.sql.Connection connection)
java.util.List<ADEMetadata>
getADEInfo()
SchemaMapping
getADESchemaMapping(java.lang.String adeId, SchemaMapping schemaMapping)
java.util.List<java.lang.String>
getAppearanceThemeList()
protected abstract void
getCityDBVersion(DatabaseMetaData metaData, java.lang.String schema, java.sql.Connection connection)
DatabaseMetaData
getDatabaseInfo(java.lang.String schema)
protected abstract void
getDatabaseMetaData(DatabaseMetaData metaData, java.lang.String schema, java.sql.Connection connection)
IndexStatusInfo
getIndexStatus(IndexStatusInfo.IndexType type)
void
getSrsInfo(DatabaseSrs srs)
protected abstract void
getSrsInfo(DatabaseSrs srs, java.sql.Connection connection)
IndexStatusInfo
getStatusNormalIndexes()
IndexStatusInfo
getStatusSpatialIndexes()
abstract DatabaseSrs
getWGS843D()
void
interruptDatabaseOperation()
boolean
isIndexEnabled(java.lang.String tableName, java.lang.String columnName)
protected abstract IndexStatusInfo
manageIndexes(java.lang.String operation, IndexStatusInfo.IndexType type, java.lang.String schema, java.sql.Connection connection)
BoundingBox
transform(BoundingBox bbox, int dimension, DatabaseSrs sourceSrs, DatabaseSrs targetSrs)
BoundingBox
transform(BoundingBox bbox, DatabaseSrs sourceSrs, DatabaseSrs targetSrs)
GeometryObject
transform(GeometryObject geometry, DatabaseSrs targetSrs)
protected abstract GeometryObject
transform(GeometryObject geometry, DatabaseSrs targetSrs, java.sql.Connection connection)
BoundingBox
transform2D(BoundingBox bbox, DatabaseSrs sourceSrs, DatabaseSrs targetSrs)
protected abstract boolean
updateTableStats(IndexStatusInfo.IndexType type, java.lang.String schema, java.sql.Connection connection)
boolean
updateTableStatsNormalColumns()
boolean
updateTableStatsSpatialColumns()
-
-
-
Field Detail
-
databaseAdapter
protected final AbstractDatabaseAdapter databaseAdapter
-
srsInfoMap
protected final java.util.concurrent.ConcurrentHashMap<java.lang.Integer,DatabaseSrs> srsInfoMap
-
interruptableCallableStatement
protected java.sql.CallableStatement interruptableCallableStatement
-
interruptablePreparedStatement
protected java.sql.PreparedStatement interruptablePreparedStatement
-
isInterrupted
protected volatile boolean isInterrupted
-
-
Constructor Detail
-
AbstractUtilAdapter
protected AbstractUtilAdapter(AbstractDatabaseAdapter databaseAdapter)
-
-
Method Detail
-
getCityDBVersion
protected abstract void getCityDBVersion(DatabaseMetaData metaData, java.lang.String schema, java.sql.Connection connection) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getDatabaseMetaData
protected abstract void getDatabaseMetaData(DatabaseMetaData metaData, java.lang.String schema, java.sql.Connection connection) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getSrsInfo
protected abstract void getSrsInfo(DatabaseSrs srs, java.sql.Connection connection) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
changeSrs
protected abstract void changeSrs(DatabaseSrs srs, boolean doTransform, java.lang.String schema, java.sql.Connection connection) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
createDatabaseReport
protected abstract java.lang.String[] createDatabaseReport(java.lang.String schema, java.sql.Connection connection) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
calcBoundingBox
protected abstract BoundingBox calcBoundingBox(java.lang.String schema, java.util.List<java.lang.Integer> classIds, java.sql.Connection connection) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
createBoundingBoxes
protected abstract BoundingBox createBoundingBoxes(java.util.List<java.lang.Integer> classIds, boolean onlyIfNull, java.sql.Connection connection) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
transform
protected abstract GeometryObject transform(GeometryObject geometry, DatabaseSrs targetSrs, java.sql.Connection connection) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
get2DSrid
protected abstract int get2DSrid(DatabaseSrs srs, java.sql.Connection connection) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
manageIndexes
protected abstract IndexStatusInfo manageIndexes(java.lang.String operation, IndexStatusInfo.IndexType type, java.lang.String schema, java.sql.Connection connection) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
updateTableStats
protected abstract boolean updateTableStats(IndexStatusInfo.IndexType type, java.lang.String schema, java.sql.Connection connection) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
containsGlobalAppearances
protected abstract boolean containsGlobalAppearances(java.sql.Connection connection) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
cleanupGlobalAppearances
protected abstract int cleanupGlobalAppearances(java.lang.String schema, java.sql.Connection connection) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getWGS843D
public abstract DatabaseSrs getWGS843D()
-
getDatabaseInfo
public DatabaseMetaData getDatabaseInfo(java.lang.String schema) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getSrsInfo
public void getSrsInfo(DatabaseSrs srs) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
changeSrs
public void changeSrs(DatabaseSrs srs, boolean doTransform, java.lang.String schema) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getADEInfo
public java.util.List<ADEMetadata> getADEInfo()
-
getADESchemaMapping
public SchemaMapping getADESchemaMapping(java.lang.String adeId, SchemaMapping schemaMapping) throws java.sql.SQLException, javax.xml.bind.JAXBException, SchemaMappingException, SchemaMappingValidationException
- Throws:
java.sql.SQLException
javax.xml.bind.JAXBException
SchemaMappingException
SchemaMappingValidationException
-
createDatabaseReport
public java.lang.String[] createDatabaseReport() throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
calcBoundingBox
public BoundingBox calcBoundingBox(java.util.List<java.lang.Integer> objectClassIds) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
calcBoundingBox
public BoundingBox calcBoundingBox(Query query, SchemaMapping schemaMapping) throws QueryBuildException, java.sql.SQLException, FilterException
- Throws:
QueryBuildException
java.sql.SQLException
FilterException
-
createBoundingBoxes
public BoundingBox createBoundingBoxes(java.util.List<java.lang.Integer> objectClassIds, boolean onlyIfNull) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
dropSpatialIndexes
public IndexStatusInfo dropSpatialIndexes() throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
dropNormalIndexes
public IndexStatusInfo dropNormalIndexes() throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
createSpatialIndexes
public IndexStatusInfo createSpatialIndexes() throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
createNormalIndexes
public IndexStatusInfo createNormalIndexes() throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getStatusSpatialIndexes
public IndexStatusInfo getStatusSpatialIndexes() throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getStatusNormalIndexes
public IndexStatusInfo getStatusNormalIndexes() throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getIndexStatus
public IndexStatusInfo getIndexStatus(IndexStatusInfo.IndexType type) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
updateTableStatsSpatialColumns
public boolean updateTableStatsSpatialColumns() throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
updateTableStatsNormalColumns
public boolean updateTableStatsNormalColumns() throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
isIndexEnabled
public boolean isIndexEnabled(java.lang.String tableName, java.lang.String columnName) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
transform2D
public BoundingBox transform2D(BoundingBox bbox, DatabaseSrs sourceSrs, DatabaseSrs targetSrs) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
transform
public BoundingBox transform(BoundingBox bbox, DatabaseSrs sourceSrs, DatabaseSrs targetSrs) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
transform
public BoundingBox transform(BoundingBox bbox, int dimension, DatabaseSrs sourceSrs, DatabaseSrs targetSrs) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
transform
public GeometryObject transform(GeometryObject geometry, DatabaseSrs targetSrs) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
get2DSrid
public int get2DSrid(DatabaseSrs srs) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getAppearanceThemeList
public java.util.List<java.lang.String> getAppearanceThemeList() throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
containsGlobalAppearances
public boolean containsGlobalAppearances() throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
cleanupGlobalAppearances
public int cleanupGlobalAppearances(java.lang.String schema) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
interruptDatabaseOperation
public void interruptDatabaseOperation()
-
decodeDatabaseSrs
public org.opengis.referencing.crs.CoordinateReferenceSystem decodeDatabaseSrs(DatabaseSrs srs) throws org.opengis.referencing.FactoryException
- Throws:
org.opengis.referencing.FactoryException
-
-