gistoolkit.datasources.shapefile
Class ShapeFileDataSource

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

public class ShapeFileDataSource
extends SimpleDataSource

A data source bassed on a shape file.


Field Summary
 
Fields inherited from class gistoolkit.datasources.SimpleDataSource
 
Constructor Summary
ShapeFileDataSource()
          create a new shape file, it is non functional until setFileName is called.
ShapeFileDataSource(java.lang.String inName)
          create a new shape file with the given name.
 
Method Summary
 void commit()
          Commit the data since the last commit.
 void doDelete(Record inRecord)
          Deletes the data from the datasource.
 void doInsert(Record inRecord)
          Insert the data source.
 void doUpdate(Record inRecord)
          Update the data source with the changed record.
 java.lang.String getName()
          Insert the method's description here.
 Node getNode()
          Get the configuration information for this data source
 boolean isUpdateable()
          Returns true
 void load(java.util.Properties inProperties)
          set the properties of this datasource.
 Envelope readEnvelope()
          Returns the bounding rectangle of all the shapes in the shape file.
protected  GISDataset readShapes(Envelope inEnvelope)
          This method should return the shapes from the data source
 void rollback()
          Rollback any changes to this datasource since the last commit.
 void setFileName(java.lang.String inName)
          Set the file name for the data source do not include the extension.
 void setName(java.lang.String newName)
          Set the name of the DataSource.
 void setNode(Node inNode)
          Set the configuration information for this data source
 
Methods inherited from class gistoolkit.datasources.SimpleDataSource
addDataSourceListener, clearCache, delete, doCommit, doRollback, filterDataset, fireCommit, fireDelete, fireInsert, fireRead, fireRollBack, fireUpdate, getCached, getCacheDataset, getCacheEnvelope, getEnvelope, getFilter, getFromProjection, getStyle, getToProjection, getValidShapeTypes, insert, isCachedProjected, projectBackward, projectForward, queryFromCache, readDataset, readDataset, removeDataSourceListener, 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

ShapeFileDataSource

public ShapeFileDataSource()
create a new shape file, it is non functional until setFileName is called.


ShapeFileDataSource

public ShapeFileDataSource(java.lang.String inName)
                    throws java.lang.Exception
create a new shape file with the given name. Do not include the shp extension on the file name.

Method Detail

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

commit

public void commit()
            throws java.lang.Exception
Commit the data since the last commit.

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

doDelete

public void doDelete(Record inRecord)
              throws java.lang.Exception
Deletes the data from the datasource.

Overrides:
doDelete in class SimpleDataSource
Throws:
java.lang.Exception

readEnvelope

public Envelope readEnvelope()
Returns the bounding rectangle of all the shapes in the shape file.

Specified by:
readEnvelope in class SimpleDataSource

getName

public java.lang.String getName()
Insert the method's description here. Creation date: (5/1/2001 3:32:59 PM)

Specified by:
getName in interface DataSource
Overrides:
getName in class SimpleDataSource
Returns:
java.lang.String

doInsert

public void doInsert(Record inRecord)
              throws java.lang.Exception
Insert the data source.

Overrides:
doInsert in class SimpleDataSource
Throws:
java.lang.Exception

setName

public void setName(java.lang.String newName)
Set the name of the DataSource.

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

doUpdate

public void doUpdate(Record inRecord)
              throws java.lang.Exception
Update the data source with the changed record.

Overrides:
doUpdate in class SimpleDataSource
Throws:
java.lang.Exception

rollback

public void rollback()
              throws java.lang.Exception
Rollback any changes to this datasource since the last commit.

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

isUpdateable

public boolean isUpdateable()
Returns true

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

load

public void load(java.util.Properties inProperties)
set the properties of this datasource.


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

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