Details
Description
There is a really good proposal out on how to clean up FeatureCollection it covers several topics:
- making FeatureCollection not implement java.util.Collection (this is required so we do not accidently allow people to use a for each loop)
- throwing out unused methods from Collection
- etc...
We no longer have time to consider this entire proposal for the 2.5.0 release; but we do need to account for the first topic - not using java.util.Collection.
The attached patch has the following changes:
- ResourceCollection no longer extends Collection
- ResourceCollection is method compatible with collection
- DataUtilities.list( FeatureCollection ): List - used to adapt to a real collection for a few test cases (around 12 failures)
- Isolating the two prepCollection and prepFeatureCollection methods in StreamingRenderer
Our current API does not make it easy to determin when the user just wants to read as opposed to read/write, and it makes quite a few things harder, both architecture wise, performance wise and security wise. I would love to see FeatureCollection just be a read only way to access data. Frankly, I'd really love to see it disappear completely and have people use FeatureReader/Writer for sequential data access, and to use the FeatureStore writing methods for specific writes, but I guess this is not going to happen, right?