gistoolkit.datasources.shapefile
Class ReadOnlyShapeFileDataSource

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

public class ReadOnlyShapeFileDataSource
extends SimpleDataSource

Reads a single shape file.


Field Summary
 
Fields inherited from class gistoolkit.datasources.SimpleDataSource
 
Constructor Summary
ReadOnlyShapeFileDataSource()
          Creates a new instance of ReadOnlyShapeFileDataSource
ReadOnlyShapeFileDataSource(java.lang.String inFileName)
          Creates a new instance of the ReadOnlyShapeFileDataSource with this file as the input.
 
Method Summary
 boolean checkDate()
          Checks if the file date has changed since the last time we read it, returns true if it is the same.
 Node getNode()
          Get the configuration information for this data source
 GISDataset readDataset(Envelope inEnvelope)
          Reads only the objects from the data source that intersect this envelope.
 Envelope readEnvelope()
          Returns the bounding rectangle of all the shapes in the Data Source.
protected  GISDataset readShapes(Envelope inEnvelope)
          This method should return the shapes from the data source
 void setFileName(java.lang.String inName)
          Set the file name for the data source do not include the extension.
 void setNode(Node inNode)
          Set the configuration information for this data source
 
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, getName, getStyle, getToProjection, getValidShapeTypes, insert, isCachedProjected, isUpdateable, projectBackward, projectForward, queryFromCache, readDataset, removeDataSourceListener, rollback, setCache, setCached, setFilter, setFromProjection, setName, setProjection, setToProjection, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReadOnlyShapeFileDataSource

public ReadOnlyShapeFileDataSource()
Creates a new instance of ReadOnlyShapeFileDataSource


ReadOnlyShapeFileDataSource

public ReadOnlyShapeFileDataSource(java.lang.String inFileName)
                            throws java.io.FileNotFoundException
Creates a new instance of the ReadOnlyShapeFileDataSource with this file as the input.

Method Detail

readDataset

public GISDataset readDataset(Envelope inEnvelope)
                       throws java.lang.Exception
Reads only the objects from the data source that intersect this envelope.

Specified by:
readDataset in interface DataSource
Overrides:
readDataset in class SimpleDataSource
Throws:
java.lang.Exception

checkDate

public boolean checkDate()
Checks if the file date has changed since the last time we read it, returns true if it is the same.


setFileName

public void setFileName(java.lang.String inName)
                 throws java.lang.Exception
Set the file name for the data source do not include the extension.

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 SimpleDataSource

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 SimpleDataSource
Throws:
java.lang.Exception

readEnvelope

public Envelope readEnvelope()
                      throws java.lang.Exception
Returns the bounding rectangle of all the shapes in the Data Source.

Specified by:
readEnvelope in class SimpleDataSource
Throws:
java.lang.Exception

readShapes

protected GISDataset readShapes(Envelope inEnvelope)
                         throws java.lang.Exception
This method should return the shapes from the data source

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