Class 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 Detail

      • 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
    • Constructor Detail

      • DataSource

        public DataSource()
    • 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()