org.geotools.gce.imagemosaic.jdbc.custom
Class JDBCAccessCustom

Object
  extended by JDBCAccessCustom
All Implemented Interfaces:
JDBCAccess
Direct Known Subclasses:
JDBCAccessOracleGeoRaster, JDBCAccessPGRaster

public abstract class JDBCAccessCustom
extends Object
implements JDBCAccess

This class is a base class for customzied JDBCAccess Special implentations should subclass

Author:
mcr

Constructor Summary
JDBCAccessCustom(Config config)
           
 
Method Summary
protected  void closeCallableStmt(CallableStatement stmt)
          closeCallableStatement
protected  void closeConnection(Connection con)
          closeConnection
protected  void closePreparedStmt(PreparedStatement stmt)
          closePreparedStatement
protected  void closeResultSet(ResultSet rs)
          closeResultSet
protected  void closeStmt(Statement stmt)
          closeStmt
 Config getConfig()
           
protected  Connection getConnection()
          getConnection
protected  CoordinateReferenceSystem getCRS()
          getCRS
 ImageLevelInfo getLevelInfo(int level)
           
 List<ImageLevelInfo> getLevelInfos()
           
 int getNumOverviews()
           
abstract  void initialize()
          initialze the the JDBCAccess object, has to be called exactly once
abstract  void startTileDecoders(Rectangle pixelDimension, GeneralEnvelope requestEnvelope, ImageLevelInfo info, LinkedBlockingQueue<TileQueueElement> tileQueue, GridCoverageFactory coverageFactory)
          Method for starting the main action, getting the neccessairy tiles and decoding them in a multithreaded manner
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JDBCAccessCustom

public JDBCAccessCustom(Config config)
                 throws IOException
Throws:
IOException
Method Detail

getLevelInfo

public ImageLevelInfo getLevelInfo(int level)
Specified by:
getLevelInfo in interface JDBCAccess
Parameters:
level - the level (0 is original, 1 is first pyramid,...)
Returns:
the corresponding ImageLevelInfo object

getNumOverviews

public int getNumOverviews()
Specified by:
getNumOverviews in interface JDBCAccess
Returns:
the number of existing pyramids

initialize

public abstract void initialize()
                         throws SQLException,
                                IOException
Description copied from interface: JDBCAccess
initialze the the JDBCAccess object, has to be called exactly once

Specified by:
initialize in interface JDBCAccess
Throws:
SQLException
IOException

startTileDecoders

public abstract void startTileDecoders(Rectangle pixelDimension,
                                       GeneralEnvelope requestEnvelope,
                                       ImageLevelInfo info,
                                       LinkedBlockingQueue<TileQueueElement> tileQueue,
                                       GridCoverageFactory coverageFactory)
                                throws IOException
Description copied from interface: JDBCAccess
Method for starting the main action, getting the neccessairy tiles and decoding them in a multithreaded manner

Specified by:
startTileDecoders in interface JDBCAccess
Parameters:
pixelDimension - the needed pixel dimension
requestEnvelope - the needed envelope in world coordinates
info - the corresponding ImageLevelInfo object
tileQueue - a queue where to put the thread results
coverageFactory - GridCoverageFactory
Throws:
IOException

getConnection

protected Connection getConnection()
getConnection

Returns:
Connection

closeConnection

protected void closeConnection(Connection con)
closeConnection

Parameters:
conn - Connection Object passed to be closed

closePreparedStmt

protected void closePreparedStmt(PreparedStatement stmt)
closePreparedStatement

Parameters:
stmt - PreparedStatement Object passed to be closed

closeCallableStmt

protected void closeCallableStmt(CallableStatement stmt)
closeCallableStatement

Parameters:
stmt - CallableStatement Object passed to be closed

closeStmt

protected void closeStmt(Statement stmt)
closeStmt

Parameters:
stmt - Statement Object passed to be closed

closeResultSet

protected void closeResultSet(ResultSet rs)
closeResultSet

Parameters:
rs - ResultSet Object passed to be closed

getCRS

protected CoordinateReferenceSystem getCRS()
getCRS

Returns:
CoordinateReferenceSystem

getConfig

public Config getConfig()
Returns:
the Config

getLevelInfos

public List<ImageLevelInfo> getLevelInfos()
Returns:
LevelInofs


Copyright © 1996-2014 Geotools. All Rights Reserved.