Java Doc for FeatureCollectionImpl.java in  » GIS » GeoTools-2.4.1 » org » geotools » feature » iso » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » GIS » GeoTools 2.4.1 » org.geotools.feature.iso 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.geotools.feature.iso.collection.AbstractResourceCollection
   org.geotools.feature.iso.collection.AbstractFeatureCollection
      org.geotools.feature.iso.FeatureCollectionImpl

All known Subclasses:   org.geotools.feature.iso.simple.SimpleFeatureCollectionImpl,
FeatureCollectionImpl
public class FeatureCollectionImpl extends AbstractFeatureCollection implements FeatureCollection(Code)
This is is a sample FeatureCollection implementation.

If you are a user - yes this FeatureCollection can be used to hold content in memory.

Note/Rant to data providers:

If you are a data provider (implementing a DataStore?) please don't use this class, you should be doing your own thing.

As an example of doing your own thing, JDBC DataStore should be making a JDBCFeatureCollection that just maintains a Filter defining the contents. Until such time as content is accessed for the first time; at which point the collection can be relized by fetching a ResultSet. If possible (for a paged result set) this may be cached for subsequent access.

Note that in a good implementation FeatureCollection will form a "chain" that is grounded by a FeatureStore that holds the Transaction etc... It is up to the implementor to decide what to do when an FeatureCollection in the chain actually relizes content? Collections downstream should be able to work off the FeatureCollection that is already relized. Note additional API may be used, as the FeatureCollection directly creates subCollections that act views on the origional content.

If this is too complicated (aka you don't want to break out data mining techniques) please consider working with the following - A three tiered approach with different assumptions at each level:
  1. Level 1 - All
    Example:FeatureStore.getFeatures()
    • represents all the content, assume this cannot fit into memory.
    • don't cache unless high latency w/ modification notification or timestamp available (aka WFS)
    • use metadata for aggregate function results if available (bounds, count)
  2. Level 2 - Collection
    Example:FeatureStore.getFeatures().getSubCollection( Filter )
    Example:FeatureStore.getFeatures( Filter )
    • - represents the results of a query, may cache
    • - consider cache result of aggregate functions
    • - consider cache data (database resultset, local hsql cache, whatever)
    • - consider cache in memory (for small count)
  3. Level 3 - Transient
    Example:FeatureStore.getFeatures().getSubCollection( Filter ).getSubCollection( Filter )
    Example:FeatureCollection.getSubCollection( Filter )
    • temporary collection (used to hold a Filter for subsequent opperation and cut down on API)
      Example:collection.getSubCollection( Filter ).remove()
    • don't cache result, see above use
    • if getSubCollection( Filter) then they are breaking out assumption, take appropriate action.
      Appropriate Action:
    The above breakdown would be a good breakdown of abstract classes for implementors to work against. However even if this is provided, there is no excuse not to do the right thing for your datasource. And for a data source the right thing is never to burn memory.


    author:
       Jody Garnett


Field Summary
 Listfeatures
    
 Setfids
    

Constructor Summary
public  FeatureCollectionImpl(Collection values, AttributeDescriptor desc, String id)
    
public  FeatureCollectionImpl(Collection values, FeatureCollectionType type, String id)
    

Method Summary
public  booleanadd(Object object)
    
public  voidclear()
    
protected  voidcloseIterator(Iterator close)
    
protected  IteratoropenIterator()
    
public  booleanremove(Object object)
    
public  booleanremoveAll(Collection c)
    
public  intsize()
    

Field Detail
features
List features(Code)



fids
Set fids(Code)




Constructor Detail
FeatureCollectionImpl
public FeatureCollectionImpl(Collection values, AttributeDescriptor desc, String id)(Code)



FeatureCollectionImpl
public FeatureCollectionImpl(Collection values, FeatureCollectionType type, String id)(Code)




Method Detail
add
public boolean add(Object object)(Code)
Implemens Collection.add(E)
Parameters:
  f -



clear
public void clear()(Code)



closeIterator
protected void closeIterator(Iterator close)(Code)
Implements AbstractResourceCollection.closeIterator(Iterator)



openIterator
protected Iterator openIterator()(Code)
Implements AbstractResourceCollection.openIterator



remove
public boolean remove(Object object)(Code)



removeAll
public boolean removeAll(Collection c)(Code)



size
public int size()(Code)
Implements Collection.size()



Methods inherited from org.geotools.feature.iso.collection.AbstractFeatureCollection
public void accepts(FeatureVisitor visitor, ProgressListener progress)(Code)(Java Doc)
public Collection associations()(Code)(Java Doc)
public Collection attributes()(Code)(Java Doc)
public PropertyDescriptor descriptor()(Code)(Java Doc)
public List get(Name name)(Code)(Java Doc)
public BoundingBox getBounds()(Code)(Java Doc)
public CoordinateReferenceSystem getCRS()(Code)(Java Doc)
public GeometryAttribute getDefaultGeometry()(Code)(Java Doc)
public AttributeDescriptor getDescriptor()(Code)(Java Doc)
public String getID()(Code)(Java Doc)
public AttributeType getType()(Code)(Java Doc)
public Object getUserData(Object key)(Code)(Java Doc)
public Object getValue()(Code)(Java Doc)
public Collection memberTypes()(Code)(Java Doc)
public Name name()(Code)(Java Doc)
public boolean nillable()(Code)(Java Doc)
public Object operation(Name arg0, List arg1)(Code)(Java Doc)
public void putUserData(Object key, Object value)(Code)(Java Doc)
public void setCRS(CoordinateReferenceSystem crs)(Code)(Java Doc)
public void setDefaultGeometry(GeometryAttribute geom)(Code)(Java Doc)
public void setValue(List newValue) throws IllegalArgumentException(Code)(Java Doc)
public void setValue(Object newValue) throws IllegalArgumentException(Code)(Java Doc)
public FeatureCollection sort(org.opengis.filter.sort.SortBy order)(Code)(Java Doc)
public FeatureCollection subCollection(org.opengis.filter.Filter filter)(Code)(Java Doc)

Fields inherited from org.geotools.feature.iso.collection.AbstractResourceCollection
final protected Set open(Code)(Java Doc)

Methods inherited from org.geotools.feature.iso.collection.AbstractResourceCollection
public boolean add(Object o)(Code)(Java Doc)
public boolean addAll(Collection c)(Code)(Java Doc)
public void clear()(Code)(Java Doc)
final public void close(Iterator close)(Code)(Java Doc)
abstract protected void closeIterator(Iterator close) throws IOException(Code)(Java Doc)
public boolean contains(Object o)(Code)(Java Doc)
public boolean containsAll(Collection c)(Code)(Java Doc)
public boolean isEmpty()(Code)(Java Doc)
final public Iterator iterator()(Code)(Java Doc)
abstract protected Iterator openIterator() throws IOException(Code)(Java Doc)
public void purge()(Code)(Java Doc)
public boolean remove(Object o)(Code)(Java Doc)
public boolean removeAll(Collection c)(Code)(Java Doc)
public boolean retainAll(Collection c)(Code)(Java Doc)
abstract public int size()(Code)(Java Doc)
public Object[] toArray()(Code)(Java Doc)
public Object[] toArray(Object[] a)(Code)(Java Doc)
public String toString()(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.