Uploaded image for project: 'Spatial Information Systems'
  1. Spatial Information Systems
  2. SIS-603

Make SQLStore abstract for allowing more customization

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.4
    • 1.5
    • Storage
    • None

    Description

      SQLStore needs to be more extensible for making possible to use it as the basis of a Geopackage data store. The most important change is that the array of ResourceDefinitions (which specifies the tables, views or queries to view as FeatureSet resources) cannot be specified at construction time, because in a Geopackage file, this array is determined by the "gpkg_contents" table. It is more convenient to read this table after SQLStore construction because it allows reusing an existing connection and makes some services such as findCRS(srid) or findSRID(crs) available. However, this change requires that we make SQLStore an abstract class, because the ResourceDefinition objects are now specified by an readResourceDefinitions() method that sub-classes must override.

      Another change is that the type of resources returned by SQLStore needs to be relaxed from FeatureSet to Resource.

      Another change is that a low-level access to the database is needed, for allowing subclasses such as a Geopackage store to perform their own SQL query. This is done by a new class, DataAccess.

      Incompatible changes

      Above-described changes contain the above incompatible changes:

      • SQLStore class has been made abstract.
      • ResourceDefinitions... argument in SQLStore constructor has been removed.
      • SQLStore.components() and findResource(String) now return Resource instead of FeatureSet.

      All the behavior of the old SQLStore are provided by SimpleFeatureStore. If any of above incompatible changes break an existing code, replacing SQStore by SimpleFeatureStore should fix the problem in mos cases.

      Attachments

        Activity

          People

            desruisseaux Martin Desruisseaux
            desruisseaux Martin Desruisseaux
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: