Motivation:

DataStore allows access to SimpleFeature, we need to access Feature as well

Contact:

Gabriel Roldán, Jody Garnett

Tracker:

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

Tagline:

(green star) introduce org.opengis.geoapi.Feature

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

Description

This proposal:

Additional information:

Status

Voting took place at today's IRC meeting over the approach #1(Generics + DataStore superclass), see Dry Run at DataAccess+Story for a summary.

Tasks

 

no progress

(tick)

done

(error)

impeded

(warning)

lack mandate/funds/time

(question)

volunteer needed

  1. (tick) Introduce DataAccess level classes
  2. (tick) Allow DataStore level classes to extend; patching up implementations as needed
  3. (tick) Update and test GeoServer
  4. (tick) Update and test uDig (and axios community edit tools)
  5. (tick) Update the user guide

API Changes

The API changes needed are minimal and respect the current interfaces and behaviour. The general strategy is to pull up the common methods from DataStore to a superclass and parametrize as per the Feature and FeatureType flavor they use.

BEFORE

/** @since 2.0 */
interface DataStore{
   void createSchema(SimpleFeatureType featureType);
   SimpleFeatureType getSchema(String typeName) throws IOException;
   FeatureSource getFeatureSource(String typeName);
   ...
}

AFTER

/** @since 2.5 */
interface DataAccess<T extends FeatureType, F extends Feature>{
    List<Name> getNames();
    void createSchema(T featureType);
    T getSchema(Name name);
    FeatureSource<T,F> getFeatureSource(Name typeName);
    ....
}
/** @since 2.0 */
interface DataStore extends DataAccess<SimpleFeatureType, SimpleFeature>{
   void createSchema(SimpleFeatureType featureType);
   /** @since 2.0 */
   SimpleFeatureType getSchema(String typeName) throws IOException;
   /** @since 2.5 */
   SimpleFeatureType getSchema(Name typeName) throws IOException;
   FeatureSource<SimpleFeatureType,SimpleFeature> getFeatureSource(String typeName);
   ...
}

BEFORE

/** @since 2.0 */
public interface FeatureSource {
   FeatureCollection getFeatures(Query query);
   SimpleFeatureType getSchema();
   DataStore getDataStore();
}

AFTER

/** @since 2.0 */
public interface FeatureSource<T extends FeatureType, F extends Feature> {
   FeatureCollection<T,F> getFeatures(Query query);
   T getSchema();
   DataAccess<T, F> getDataStore();
}

Documentation Changes