gistoolkit.datasources.shapefile
Class DbaseFileJoinDataSource

java.lang.Object
  extended bygistoolkit.datasources.SimpleDataSource
      extended bygistoolkit.datasources.SimpleJoinDataSource
          extended bygistoolkit.datasources.shapefile.DbaseFileJoinDataSource
All Implemented Interfaces:
DataSource

public class DbaseFileJoinDataSource
extends SimpleJoinDataSource

A class to allow records from a dbase 3 file to be concatinated with the records from another data source. There are many cases where a user will want to shade a map against data in a dbase 3 file. The dbase file will contain data aggrigated by fips code for example. This data then needs to be joined against a shape file or database based on the fips code. This class facilitates that process. 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
DbaseFileJoinDataSource()
          For use with configuration only where the source data source is to be set with the setNode() function.
DbaseFileJoinDataSource(DataSource inSourceDataSource)
          Create a new DB2JoinDataSource with this data source as the source node.
 
Method Summary
 java.lang.String getDbaseFileName()
          Returns the url base to use when connecting through the JDBC driver.
 java.lang.String getName()
          Return the name of this datasource for display to the user.
 Node getNode()
          Get the configuration information for this data source
 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 setDbaseFileName(java.lang.String inDbaseFileName)
          Sets the url base to use when connecting through the JDBC driver.
 void setName(java.lang.String inName)
          Set the name of this datasource for display purposes.
 void setNode(Node inNode)
          Set the configuration information for this data source
 
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, getFilter, getFromProjection, getToProjection, getValidShapeTypes, insert, isCachedProjected, isUpdateable, projectBackward, projectForward, queryFromCache, readDataset, readDataset, removeDataSourceListener, rollback, setCache, setCached, setFilter, setFromProjection, setProjection, setToProjection, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DbaseFileJoinDataSource

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


DbaseFileJoinDataSource

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

Method Detail

getName

public java.lang.String getName()
Return the name of this datasource for display to the user.

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

setName

public void setName(java.lang.String inName)
Set the name of this datasource for display purposes.

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

getDbaseFileName

public java.lang.String getDbaseFileName()
Returns the url base to use when connecting through the JDBC driver.


setDbaseFileName

public void setDbaseFileName(java.lang.String inDbaseFileName)
Sets the url base to use when connecting through the JDBC driver.


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

getStyle

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

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