Issue Type: Improvement Improvement
Affects Versions: 8.0-RC2
Assignee: Unassigned
Components: opengis
Created: 20/Jun/12 1:09 AM
Description:

As per this proposal:

Goal is to reduce feature collection down to the following:

public interface SimpleFeatureCollection extends FeatureCollection<SimpleFeatureType,SimpleFeature> {
  // feature access - close when done!
  SimpleFeatureIterator features()
 
  // feature access with out the loop
  void accepts(FeatureVisitor, ProgressListener);
 
  // metadata
  SimpleFeatureType getSchema();
  String getID();
  AttributeDescriptor getDescriptor(); // pending prosal
 
  // sub query
  SimpleFeatureCollection subCollection(Filter)
  SimpleFeatureCollection sort(SortBy)
  boolean contains(Object)
  boolean containsAll(Collection<?>)
 
  // summary information
  ReferencedEnvelope getBounds()
  boolean isEmpty()
  int size()
 
  // convert to array
  Object[] toArray()
  <O> O[] toArray(O[])
}

Discussion:

  • toArray methods are there on the off chance the implementation can provide a quick implementation? Is this another good intension? Probably. Could be replaced with a DataUtilities method
  • subCollection & sort functionality have been covered by Query these days; and could be removed.
  • contains and containsAll are interesting; would almost expect look up by FeatureId instead
  • getID() is left from a time when FeatureCollection implemented Feature; it is still used when encoding
  • getDescriptor is technically accurate; however we are used to working with FeatureType
  • isEmpty() earns its keep; size() == 0 is not a replacement as you need to count the whole set with that in mind containsAll falls into the same idea; how to prevent a multi pass operation
  • accepts earns its keep for Jody Garnett, Andrea Aime wants the javadocs cleaned up so it is obvious that the feature being visited is a Flyweight (ie the same object with just the values changing inside each time)
Project: GeoTools
Priority: Major Major
Reporter: Jody Garnett
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to