Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Motivation:

Removing a seldom used method from the core API

Contact:

mbedward

Tracker:

http://jira.codehaus.org/browse/GEOT-3063

Tagline:

Excerpt

Remove DataStore.getView method

This page represents the current plan; for discussion please check the tracker link above.

Section
Column
width70%
Table of Contents
Column

Children:

Children Display

Description

DataStore.getView(Query) returns a SimpleFeatureSource. The javadocs are a bit vague on the purpose of this method. It doesn't seem to be used in GeoTools or GeoServer (aaime) although Jody says he makes some use of it in uDig to get read-only views.

It is proposed to drop this method in 2.7 and replace it with a DataUtilities method.

Most DataStore implementations in the library are just mirroring AbstractDataStore.getView method which returns a DefaultView. The exceptions are VersionedPostgisDataStore and WS_DataStore which throw an UnsupportedOperationException; and ContentDataStore which does something a bit different (Jody ?).

The patch attached to the Jira issue moves the AbstractDataStore.getView method into DataUtilities, renaming it to createView. It also updates the DataStore implementations other than the three mentioned above. The patch has been tested against trunk.

API Changes

Before:

Code Block
DataStore ds = ...
Query query = ...
SimpleFeatureSource view = ds.getView( query );

After:

Code Block
DataStore ds = ...
Query query = ...
SimpleFeatureSource view = DataUtilities.createView( ds, query );

Status

Done. Patch applied to 2.7.x

Voting was:

Tasks

 

no progress

(tick)

done

(error)

impeded

(warning)

lack mandate/funds/time

(question)

volunteer needed

  1. Apply patch from http://jira.codehaus.org/browse/GEOT-3063 to trunk (tick)