Class DataSource
- java.lang.Object
-
- org.locationtech.jts.jump.io.datasource.DataSource
-
- Direct Known Subclasses:
ReaderWriterFileDataSource
public abstract class DataSource extends 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
Fields Modifier and Type Field Description static String
COORDINATE_SYSTEM_KEY
Coordinate-system property, used for files and other DataSources that have a single CoordinateSystemstatic String
FILE_KEY
Filename property, used for file-based DataSources
-
Constructor Summary
Constructors Constructor Description DataSource()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract Connection
getConnection()
Creates a new Connection to this DataSource.Map
getProperties()
FeatureCollection
installCoordinateSystem(FeatureCollection queryResult, CoordinateSystemRegistry registry)
boolean
isReadable()
boolean
isWritable()
void
setProperties(Map properties)
Sets properties required to open a DataSource, such as username, password, filename, coordinate system, etc.
-
-
-
Field Detail
-
FILE_KEY
public static final String FILE_KEY
Filename property, used for file-based DataSources- See Also:
- Constant Field Values
-
COORDINATE_SYSTEM_KEY
public static final String COORDINATE_SYSTEM_KEY
Coordinate-system property, used for files and other DataSources that have a single CoordinateSystem- See Also:
- Constant Field Values
-
-
Method Detail
-
setProperties
public void setProperties(Map properties)
Sets properties required to open a DataSource, such as username, password, filename, coordinate system, etc. Called by DataSourceQueryChoosers.
-
getProperties
public 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)
-
-