com.vividsolutions.jump.io.datasource
Class DataSource

java.lang.Object
  extended by com.vividsolutions.jump.io.datasource.DataSource
Direct Known Subclasses:
DataStoreDataSource, ReaderWriterFileDataSource

public abstract class DataSource
extends java.lang.Object

A file, database, web service, or other source of data. To be savable to a project file, a DataSource must not be an anonymous class (because the class name is recorded in the project file) and it must have a parameterless constructor (so it can be reconstructed by simply being instantiated and having #setProperties called).


Field Summary
static java.lang.String COORDINATE_SYSTEM_KEY
          Coordinate-system property, used for files and other DataSources that have a single CoordinateSystem
static java.lang.String FILE_KEY
          Filename property, used for file-based DataSources
 
Constructor Summary
DataSource()
           
 
Method Summary
abstract  Connection getConnection()
          Creates a new Connection to this DataSource.
 java.util.Map getProperties()
           
 FeatureCollection installCoordinateSystem(FeatureCollection queryResult, CoordinateSystemRegistry registry)
           
 boolean isReadable()
           
 boolean isWritable()
           
 void setProperties(java.util.Map properties)
          Sets properties required to open a DataSource, such as username, password, filename, coordinate system, etc.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FILE_KEY

public static final java.lang.String FILE_KEY
Filename property, used for file-based DataSources

See Also:
Constant Field Values

COORDINATE_SYSTEM_KEY

public static final java.lang.String COORDINATE_SYSTEM_KEY
Coordinate-system property, used for files and other DataSources that have a single CoordinateSystem

See Also:
Constant Field Values
Constructor Detail

DataSource

public DataSource()
Method Detail

setProperties

public void setProperties(java.util.Map properties)
Sets properties required to open a DataSource, such as username, password, filename, coordinate system, etc. Called by DataSourceQueryChoosers.


getProperties

public java.util.Map getProperties()

getConnection

public abstract Connection getConnection()
Creates a new Connection to this DataSource.


isReadable

public boolean isReadable()

isWritable

public boolean isWritable()

installCoordinateSystem

public FeatureCollection installCoordinateSystem(FeatureCollection queryResult,
                                                 CoordinateSystemRegistry registry)