Good sum up of the tradeoffs Gabriel. I think you are right in that a 
hybrid type hierarchy - parameterization might be the best way to go. It 
can potentially save us some method overloading and additional 
interfaces which is really my problem with it.

> 1) Introducing generics and the required additions implies an alternative 
> method to really know if a DataStore produces Features or only SimpleFeatures 
> and brings a lot of warning to implementors upgrading to 2.5, that we being a 
> library may want to consider.

> Also it makes the api open ended which really is not. i.e. it should be 
> DataStore<? extends FeatureType, ? extends Feature> in order to work.
>

> 2)Introducing a type hierarchy with no types parametrization makes things 
> explicit and closed ended , covers all the use cases, but imposes method 
> overloading in the current DataStore implementations for the methods that 
> receive FeatureCollection and FeatureReader.

> 
> 3)Introducing a type hierarchy with parametrized types for method parameters 
> may well worth a try, as it would cover all the use cases with no 
> overloading.
> 
> for instance, those use cases are:
> - client code that only knows how to deal with SimpleFeature (all of it so 
> far) gets only simple feature based datastores from the factory system. 
> Meaning everything keeps working just as it is with no breaks and no code 
> changes.
> - client code that works with normal Features gets both complex and simple 
> capable datastores out of the factory system. All the current, simple feature 
> based datastores also work out of the box.
> 
> Gabriel
> 
> 
> !DSPAM:4007,47aa50e9229927180515871!
> 


-- 
Justin Deoliveira
The Open Planning Project
[EMAIL PROTECTED]

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to