gistoolkit.datasources.oracle
Class OracleJoinDataSource

java.lang.Object
  extended bygistoolkit.datasources.SimpleDataSource
      extended bygistoolkit.datasources.SimpleJoinDataSource
          extended bygistoolkit.datasources.SimpleJoinDBDataSource
              extended bygistoolkit.datasources.oracle.OracleJoinDataSource
All Implemented Interfaces:
DataSource

public class OracleJoinDataSource
extends SimpleJoinDBDataSource

Class to join a Oracle Datatable to another data source. Set the column from the source data that is to be used with the setDatasourceJoinColumn method, and set the column for this data source with the setTableJoinColumn method. The data source first reads the data from the source datasource, then it compares the data from the join data source to that of the source data source, and throws away any that do not have a match. It also trims the source data source to the envelope. This results in a standard inner join between the source data, and the join data.


Field Summary
 
Fields inherited from class gistoolkit.datasources.SimpleDataSource
 
Constructor Summary
OracleJoinDataSource()
          For use with configuration only where the source data source is to be set with the setNode() function.
OracleJoinDataSource(DataSource inSourceDataSource)
          Create a new DB2JoinDataSource with this data source as the source node.
 
Method Summary
protected  void closeConnection()
          Close the connection to the database.
 java.sql.Connection connect()
          Connect this datasource to the database
 void finalize()
          Close any open connections
 java.lang.String getDatabaseDriver()
          Get The driver to use when accessing the database.
 java.lang.String getDatabaseName()
          Get the database name the postmaster should access for servicing this request.
 java.lang.String getDatabasePassword()
          Get the password that validates the username.
 int getDatabasePort()
          Get the TCP-IP port number on which the postmaster is listening.
 java.lang.String getDatabaseQuery()
          SQL Query to use in retrieving data from the database.
 java.lang.String getDatabaseServername()
          Get thehostname/servername of the target computer.
 int getDatabaseSpatialReferenceID()
          Returns the spatial reference id to use for converting shapes to and from database format.
 java.lang.String getDatabaseURLBase()
          Get the string to prepend to the url used to locate the database.
 java.lang.String getDatabaseUsername()
          Get the username with permission to connect to the database.
 Node getNode()
          Get the configuration information for this data source
 SQLConverter getSQLConverter()
          Returns the converter for this Database.
 Style getStyle()
          Get the style to use with this datasource.
 GISDataset readShapes(Envelope inEnvelope)
          Reads the objects from the database that fall within the given Envelope.
 void setDatabaseDriver(java.lang.String inDatabaseDriver)
          Set The driver to use when accessing the database.
 void setDatabaseName(java.lang.String inDatabaseName)
          Set the database name the postmaster should access for servicing this request.
 void setDatabasePassword(java.lang.String inDatabasePassword)
          Set the password that validates the username.
 void setDatabasePort(int inPortNumber)
          Set the TCP-IP port number on which the postmaster is listening.
 void setDatabaseQuery(java.lang.String inQuery)
          SQL Query to use to retrieve data from the database.
 void setDatabaseServername(java.lang.String inDatabaseServername)
          Set thehostname/servername of the target computer.
 void setDatabaseSpatialReferenceID(int inDatabaseSpatialReferenceID)
          Sets the SpatialReferenceID to use when converting shapes to and from database format.
 void setDatabaseSpatialReferenceID(java.lang.String inDatabaseSpatialReferenceID)
          Sets the SpatialReferenceID to use when converting shapes to and from database format.
 void setDatabaseURLBase(java.lang.String inURLBase)
          Set the string to prepend to the url used to locate the database.
 void setDatabaseUsername(java.lang.String inDatabaseUsername)
          Set the username with permission to connect to the database.
 void setNode(Node inNode)
          Set the configuration information for this data source
 
Methods inherited from class gistoolkit.datasources.SimpleJoinDBDataSource
getFilter, getFilterSQL, setFilter
 
Methods inherited from class gistoolkit.datasources.SimpleJoinDataSource
getDatasourceJoinColumn, getDatasourceRecord, getJoinDataSource, getJoinDataSourceAttributeNames, getJoinDataSourceAttributeTypes, getJoinedDataCached, getTableJoinColumn, readDataSource, readEnvelope, setDatasourceJoinColumn, setJoinedDataCached, setTableJoinColumn
 
Methods inherited from class gistoolkit.datasources.SimpleDataSource
addDataSourceListener, clearCache, commit, delete, doCommit, doDelete, doInsert, doRollback, doUpdate, filterDataset, fireCommit, fireDelete, fireInsert, fireRead, fireRollBack, fireUpdate, getCached, getCacheDataset, getCacheEnvelope, getEnvelope, getFromProjection, getName, getToProjection, getValidShapeTypes, insert, isCachedProjected, isUpdateable, projectBackward, projectForward, queryFromCache, readDataset, readDataset, removeDataSourceListener, rollback, setCache, setCached, setFromProjection, setName, setProjection, setToProjection, update
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OracleJoinDataSource

public OracleJoinDataSource()
For use with configuration only where the source data source is to be set with the setNode() function.


OracleJoinDataSource

public OracleJoinDataSource(DataSource inSourceDataSource)
Create a new DB2JoinDataSource with this data source as the source node.

Method Detail

getDatabaseURLBase

public java.lang.String getDatabaseURLBase()
Get the string to prepend to the url used to locate the database. This is usally a constant like "jdbc:postgresql://".


setDatabaseURLBase

public void setDatabaseURLBase(java.lang.String inURLBase)
Set the string to prepend to the url used to locate the database. This is usally a constant like "jdbc:postgresql://".


getDatabaseServername

public java.lang.String getDatabaseServername()
Get thehostname/servername of the target computer. This usually changes with each installation or application. The default is "localhost" for the local computer


setDatabaseServername

public void setDatabaseServername(java.lang.String inDatabaseServername)
Set thehostname/servername of the target computer. This usually changes with each installation or application. The default is "localhost" for the local computer


getDatabaseDriver

public java.lang.String getDatabaseDriver()
Get The driver to use when accessing the database. If the POSGRES team ever changes this, it will need to be updated.


setDatabaseDriver

public void setDatabaseDriver(java.lang.String inDatabaseDriver)
Set The driver to use when accessing the database. If the POSGRES team ever changes this, it will need to be updated.


getDatabasePort

public int getDatabasePort()
Get the TCP-IP port number on which the postmaster is listening. The default is 5432, but it could be changed to a different port, depending on configuration.


setDatabasePort

public void setDatabasePort(int inPortNumber)
Set the TCP-IP port number on which the postmaster is listening. The default is 5432, but it could be changed to a different port, depending on configuration.


getDatabaseName

public java.lang.String getDatabaseName()
Get the database name the postmaster should access for servicing this request. The default is "database", which is most likely inappropriate.


setDatabaseName

public void setDatabaseName(java.lang.String inDatabaseName)
Set the database name the postmaster should access for servicing this request. The default is "database", which is most likely inappropriate.


getDatabaseUsername

public java.lang.String getDatabaseUsername()
Get the username with permission to connect to the database. These are defined in the database.


setDatabaseUsername

public void setDatabaseUsername(java.lang.String inDatabaseUsername)
Set the username with permission to connect to the database. These are defined in the database.


getDatabasePassword

public java.lang.String getDatabasePassword()
Get the password that validates the username.


setDatabasePassword

public void setDatabasePassword(java.lang.String inDatabasePassword)
Set the password that validates the username.


getDatabaseSpatialReferenceID

public int getDatabaseSpatialReferenceID()
Returns the spatial reference id to use for converting shapes to and from database format.


setDatabaseSpatialReferenceID

public void setDatabaseSpatialReferenceID(int inDatabaseSpatialReferenceID)
Sets the SpatialReferenceID to use when converting shapes to and from database format.


setDatabaseSpatialReferenceID

public void setDatabaseSpatialReferenceID(java.lang.String inDatabaseSpatialReferenceID)
Sets the SpatialReferenceID to use when converting shapes to and from database format.


setDatabaseQuery

public void setDatabaseQuery(java.lang.String inQuery)
SQL Query to use to retrieve data from the database.


getDatabaseQuery

public java.lang.String getDatabaseQuery()
SQL Query to use in retrieving data from the database.


connect

public java.sql.Connection connect()
                            throws java.lang.Exception
Connect this datasource to the database

Throws:
java.lang.Exception

closeConnection

protected void closeConnection()
                        throws java.lang.Exception
Close the connection to the database.

Throws:
java.lang.Exception

finalize

public void finalize()
Close any open connections


readShapes

public GISDataset readShapes(Envelope inEnvelope)
                      throws java.lang.Exception
Reads the objects from the database that fall within the given Envelope. If a null is sent in for the Envelope, all the objects in the shape file are read.

Specified by:
readShapes in class SimpleJoinDataSource
Throws:
java.lang.Exception

getNode

public Node getNode()
Get the configuration information for this data source

Specified by:
getNode in interface DataSource
Overrides:
getNode in class SimpleJoinDataSource

setNode

public void setNode(Node inNode)
             throws java.lang.Exception
Set the configuration information for this data source

Specified by:
setNode in interface DataSource
Overrides:
setNode in class SimpleJoinDataSource
Throws:
java.lang.Exception

getSQLConverter

public SQLConverter getSQLConverter()
Returns the converter for this Database.

Overrides:
getSQLConverter in class SimpleJoinDBDataSource

getStyle

public Style getStyle()
Get the style to use with this datasource.

Specified by:
getStyle in interface DataSource
Overrides:
getStyle in class SimpleDataSource