gistoolkit.datasources.mysql
Class ReadOnlyMySQLDataSource

java.lang.Object
  extended bygistoolkit.datasources.SimpleDataSource
      extended bygistoolkit.datasources.SimpleDBDataSource
          extended bygistoolkit.datasources.mysql.MySQLDataSource
              extended bygistoolkit.datasources.mysql.ReadOnlyMySQLDataSource
All Implemented Interfaces:
DataSource

public class ReadOnlyMySQLDataSource
extends MySQLDataSource

Allows for any sql query to be sent to the database, and returns the data set.


Field Summary
 
Fields inherited from class gistoolkit.datasources.SimpleDataSource
 
Constructor Summary
ReadOnlyMySQLDataSource()
          Creates new ReadOnlyMySQLDataSource
 
Method Summary
 java.lang.String getDatabaseQuery()
          return the SQLQuery to use when accessing the data source
 Node getNode()
          Get the configuration information for this data source
 boolean getPreread()
          Returns the preread flag.
 Style getStyle()
          Get the style to use with this datasource.
static void main(java.lang.String[] inArgs)
          Testing only
protected  GISDataset readShapes(Envelope inEnvelope)
          This method returns the shapes from the data source
 void setDatabaseQuery(java.lang.String inQuery)
          Set the SQL Query to use when accessing the data source
 void setNode(Node inNode)
          Set the configuration information for this data source
 void setPreread(boolean inPreread)
          Sets the preread flag to tell this data source to preread the entire contents of the layer, and keep them in memory, essentially caching them, until the data source is disposed.
 
Methods inherited from class gistoolkit.datasources.mysql.MySQLDataSource
closeConnection, connect, finalize, getDatabaseName, getDatabasePassword, getDatabasePort, getDatabaseServername, getDatabaseShapeColumn, getDatabaseSpatialReferenceID, getDatabaseURLBase, getDatabaseUsername, getSQLConverter, load, readEnvelope, setDatabaseName, setDatabasePassword, setDatabasePort, setDatabaseServername, setDatabaseShapeColumn, setDatabaseSpatialReferenceID, setDatabaseSpatialReferenceID, setDatabaseURLBase, setDatabaseUsername
 
Methods inherited from class gistoolkit.datasources.SimpleDBDataSource
getFilter, getFilterSQL, setFilter
 
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

ReadOnlyMySQLDataSource

public ReadOnlyMySQLDataSource()
Creates new ReadOnlyMySQLDataSource

Method Detail

setDatabaseQuery

public void setDatabaseQuery(java.lang.String inQuery)
Set the SQL Query to use when accessing the data source


getDatabaseQuery

public java.lang.String getDatabaseQuery()
return the SQLQuery to use when accessing the data source


setPreread

public void setPreread(boolean inPreread)
Sets the preread flag to tell this data source to preread the entire contents of the layer, and keep them in memory, essentially caching them, until the data source is disposed.


getPreread

public boolean getPreread()
Returns the preread flag. This flag tells the data source to preread the entire contents of the layer, and to cach that information in memory until the data source is disposed.


readShapes

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

Specified by:
readShapes in class SimpleDataSource
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 MySQLDataSource

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

main

public static void main(java.lang.String[] inArgs)
Testing only


getStyle

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

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