Java Doc for DataFeatureCollection.java in  » GIS » GeoTools-2.4.1 » org » geotools » data » store » 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.data.store 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.geotools.data.store.DataFeatureCollection

All known Subclasses:   org.geotools.data.DefaultFeatureResults,  org.geotools.renderer.lite.IndexedFeatureResults,  org.geotools.data.gml.GMLFeatureCollection,  org.geotools.data.store.EmptyFeatureCollection,
DataFeatureCollection
abstract public class DataFeatureCollection implements FeatureCollection(Code)
A starting point for implementing FeatureCollection's backed by real data.

The API you are required to implement is *identical* the the barebones FeatureResults interface:

  • getSchema()
  • reader()
  • getBounds()
  • getCount()
  • collection()

    This class will implement the 'extra' methods required by FeatureCollection for you (in simple terms based on the FeatureResults API). Anything that is often customized is available to you as a constructor parameters.

    Enjoy.


    author:
       jgarnett
    since:
       2.1.RC0


Field Summary
static  LoggerLOGGER
    
 FeatureTypefeatureType
    

Constructor Summary
protected  DataFeatureCollection()
    
protected  DataFeatureCollection(String id)
    
protected  DataFeatureCollection(String id, FeatureType featureType)
     Subclass must think about what consitructors it needs.

Method Summary
public  voidaccepts(FeatureVisitor visitor, ProgressListener progress)
     Accepts a visitor, which then visits each feature in the collection.
public  booleanadd(Object arg0)
    
public  booleanaddAll(Collection arg0)
     Optimized implementation of addAll that recognizes the use of collections obtained with subCollection( filter ).
public  voidaddListener(CollectionListener listener)
     Adds a listener for collection events.
public  voidclear()
    
final public  voidclose(Iterator close)
    
public  voidclose(FeatureIterator iterator)
    
protected  voidcloseIterator(Iterator close)
    
public  booleancontains(Object o)
    
public  booleancontainsAll(Collection arg0)
    
public  FeatureIteratorfeatures()
     FeatureIterator is entirely based on iterator().
protected  voidfireChange(Feature[] features, int type)
     To let listeners know that something has changed.
protected  voidfireChange(Feature feature, int type)
    
protected  voidfireChange(Collection coll, int type)
    
public  ObjectgetAttribute(String xPath)
     Not really interested yet ..
public  ObjectgetAttribute(int index)
    
public  Object[]getAttributes(Object[] attributes)
    
abstract public  ReferencedEnvelopegetBounds()
    
abstract public  intgetCount()
    
public  GeometrygetDefaultGeometry()
    
public synchronized  FeatureTypegetFeatureType()
     FeatureType of this FeatureCollection.
public  StringgetID()
    
public  intgetNumberOfAttributes()
    
public  FeatureCollectiongetParent()
    
abstract public  FeatureTypegetSchema()
    
public  booleanisEmpty()
     Default implementation based on creating an reader, testing hasNext, and closing.
final public  Iteratoriterator()
     Iterator may (or may) not support modification.
protected  IteratoropenIterator()
     Returns a FeatureWriterIterator, or FeatureReaderIterator over content.
public  voidpurge()
    
public  FeatureReaderreader()
    
public  booleanremove(Object arg0)
    
public  booleanremoveAll(Collection arg0)
    
public  voidremoveListener(CollectionListener listener)
     Removes a listener for collection events.
public  booleanretainAll(Collection arg0)
    
public  voidsetAttribute(int position, Object val)
    
public  voidsetAttribute(String xPath, Object attribute)
    
public  voidsetDefaultGeometry(Geometry geometry)
    
public  voidsetParent(FeatureCollection collection)
    
public  intsize()
    
public  FeatureListsort(SortBy order)
     Construct a sorted view of this content.
public  FeatureListsort(SortBy2 order)
     Allows for "Advanced" sort capabilities specific to the GeoTools platform!

Advanced in this case really means making use of a generic Expression, rather then being limited to PropertyName.

public  FeatureCollectionsubCollection(Filter filter)
     Will return an optimized subCollection based on access to the origional FeatureSource.
public  Object[]toArray()
    
public  Object[]toArray(Object[] array)
    
protected  FeatureWriterwriter()
     Subclass may provide an implementation of this method to indicate that read/write support is provided.

Field Detail
LOGGER
static Logger LOGGER(Code)
logger



featureType
FeatureType featureType(Code)
The featureType of this actual colletion




Constructor Detail
DataFeatureCollection
protected DataFeatureCollection()(Code)
Collection based on a generic collection



DataFeatureCollection
protected DataFeatureCollection(String id)(Code)
Collection based on a generic collection



DataFeatureCollection
protected DataFeatureCollection(String id, FeatureType featureType)(Code)
Subclass must think about what consitructors it needs.




Method Detail
accepts
public void accepts(FeatureVisitor visitor, ProgressListener progress) throws IOException(Code)
Accepts a visitor, which then visits each feature in the collection.
throws:
  IOException -



add
public boolean add(Object arg0)(Code)



addAll
public boolean addAll(Collection arg0)(Code)
Optimized implementation of addAll that recognizes the use of collections obtained with subCollection( filter ).

This method is constructed by either:

  • Filter OR
  • Removing an extact match of Filter AND



addListener
public void addListener(CollectionListener listener)(Code)
Adds a listener for collection events.
Parameters:
  listener - The listener to add



clear
public void clear()(Code)



close
final public void close(Iterator close)(Code)



close
public void close(FeatureIterator iterator)(Code)



closeIterator
protected void closeIterator(Iterator close) throws IOException(Code)



contains
public boolean contains(Object o)(Code)



containsAll
public boolean containsAll(Collection arg0)(Code)



features
public FeatureIterator features()(Code)
FeatureIterator is entirely based on iterator().

So when we implement FeatureCollection.iterator() this will work out of the box.




fireChange
protected void fireChange(Feature[] features, int type)(Code)
To let listeners know that something has changed.



fireChange
protected void fireChange(Feature feature, int type)(Code)



fireChange
protected void fireChange(Collection coll, int type)(Code)



getAttribute
public Object getAttribute(String xPath)(Code)
Not really interested yet ..



getAttribute
public Object getAttribute(int index)(Code)



getAttributes
public Object[] getAttributes(Object[] attributes)(Code)



getBounds
abstract public ReferencedEnvelope getBounds()(Code)



getCount
abstract public int getCount() throws IOException(Code)



getDefaultGeometry
public Geometry getDefaultGeometry()(Code)



getFeatureType
public synchronized FeatureType getFeatureType()(Code)
FeatureType of this FeatureCollection.

Unless a FeatureType was provided during consturction (or this method is overriden) a FeatureType will be generated based on getSchmea according to the following assumptions:

  • FeatureType is gml:AbstractFeatureCollectionType
  • first attribute is getSchema.typeName
  • the attribute FeatureType the same as returned by getSchema()




getID
public String getID()(Code)



getNumberOfAttributes
public int getNumberOfAttributes()(Code)



getParent
public FeatureCollection getParent()(Code)



getSchema
abstract public FeatureType getSchema()(Code)



isEmpty
public boolean isEmpty()(Code)
Default implementation based on creating an reader, testing hasNext, and closing.

For once the Collections API does not give us an escape route, we *have* to check the data.




iterator
final public Iterator iterator()(Code)
Iterator may (or may) not support modification.



openIterator
protected Iterator openIterator() throws IOException(Code)
Returns a FeatureWriterIterator, or FeatureReaderIterator over content.

If you have a way to tell that you are readonly please subclass with a less hardcore check - this implementations catches a UnsupportedOpperationsException from wrtier()! Iterator, should be closed closeIterator




purge
public void purge()(Code)



reader
public FeatureReader reader() throws IOException(Code)



remove
public boolean remove(Object arg0)(Code)



removeAll
public boolean removeAll(Collection arg0)(Code)



removeListener
public void removeListener(CollectionListener listener)(Code)
Removes a listener for collection events.
Parameters:
  listener - The listener to remove



retainAll
public boolean retainAll(Collection arg0)(Code)



setAttribute
public void setAttribute(int position, Object val) throws IllegalAttributeException, ArrayIndexOutOfBoundsException(Code)



setAttribute
public void setAttribute(String xPath, Object attribute) throws IllegalAttributeException(Code)



setDefaultGeometry
public void setDefaultGeometry(Geometry geometry) throws IllegalAttributeException(Code)



setParent
public void setParent(FeatureCollection collection)(Code)



size
public int size()(Code)
Default implementation based on getCount() - this may be expensive



sort
public FeatureList sort(SortBy order)(Code)
Construct a sorted view of this content.

Sorts may be combined togther in a stable fashion, in congruence with the Filter 1.1 specification.

This method should also be able to handle GeoTools specific sorting through detecting order as a SortBy2 instance.
Parameters:
  order -
since:
   GeoTools 2.2, Filter 1.1 FeatureList sorted according to provided order



sort
public FeatureList sort(SortBy2 order)(Code)
Allows for "Advanced" sort capabilities specific to the GeoTools platform!

Advanced in this case really means making use of a generic Expression, rather then being limited to PropertyName.


Parameters:
  order - GeoTools SortBy FeatureList sorted according to provided order



subCollection
public FeatureCollection subCollection(Filter filter)(Code)
Will return an optimized subCollection based on access to the origional FeatureSource.

The subCollection is constructed by using an AND Filter. For the converse of this opperation please see collection.addAll( Collection ), it has been optimized to be aware of these filter based SubCollections.

This method is intended in a manner similar to subList, example use: collection.subCollection( myFilter ).clear()


Parameters:
  filter - Filter used to determine sub collection.
since:
   GeoTools 2.2, Filter 1.1



toArray
public Object[] toArray()(Code)



toArray
public Object[] toArray(Object[] array)(Code)



writer
protected FeatureWriter writer() throws IOException(Code)
Subclass may provide an implementation of this method to indicate that read/write support is provided.

All operations that attempt to modify the "data" will use this method, allowing them to throw an "UnsupportedOperationException" in the same manner as Collections.unmodifiableCollection(Collection c)


throws:
  UnsupportedOperationException - To indicate that write support is not avaiable



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(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.