Removing a seldom used method from the core API
This page represents the current plan; for discussion please check the tracker link above.
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.
DataStore ds = ... Query query = ... SimpleFeatureSource view = ds.getView( query );
DataStore ds = ... Query query = ... SimpleFeatureSource view = DataUtilities.createView( ds, query );
Done. Patch applied to 2.7.x
- Andrea Aime +1
- Ben Caradoc-Davies +1
- Christian Mueller +0
- Ian Turton +0
- Justin Deoliveira +1
- Jody Garnett (current OSGeo representative) +1
- Michael Bedward +1
- Simone Giannecchini +0
- Apply patch from http://jira.codehaus.org/browse/GEOT-3063 to trunk