org.geotools.feature.collection
Class SubFeatureList

java.lang.Object
  extended byorg.geotools.feature.collection.AbstractResourceCollection
      extended byorg.geotools.feature.collection.SubFeatureCollection
          extended byorg.geotools.feature.collection.SubFeatureList
All Implemented Interfaces:
java.util.Collection, Feature, FeatureCollection, FeatureList, FeatureResults, java.util.List, RandomFeatureAccess, ResourceCollection

public class SubFeatureList
extends SubFeatureCollection
implements FeatureList, RandomFeatureAccess


Nested Class Summary
 
Nested classes inherited from class org.geotools.feature.Feature
Feature.NULL
 
Field Summary
 
Fields inherited from class org.geotools.feature.collection.SubFeatureCollection
collection, filter, state
 
Fields inherited from class org.geotools.feature.collection.AbstractResourceCollection
open
 
Constructor Summary
SubFeatureList(FeatureCollection list, Filter filter)
           
SubFeatureList(FeatureCollection list, Filter filter, SortBy subSort)
          Create a simple SubFeatureList with the provided filter.
SubFeatureList(FeatureCollection list, java.util.List order)
           
SubFeatureList(FeatureCollection list, SortBy sort)
           
 
Method Summary
 void add(int index, java.lang.Object feature)
           
 boolean addAll(int index, java.util.Collection c)
           
protected  Filter createFilter()
          Lazy create a filter based on index
protected  java.util.List createIndex()
          Put this SubFeatureList in touch with its inner index
 java.lang.Object get(int index)
           
 Feature getFeatureMember(java.lang.String id)
          Access Feature content by feature id.
protected  java.util.List index()
           
 int indexOf(java.lang.Object o)
           
 int lastIndexOf(java.lang.Object o)
           
 java.util.ListIterator listIterator()
           
 java.util.ListIterator listIterator(int index)
           
 java.util.ListIterator openIterator(int index)
           
 java.lang.Object remove(int index)
           
 Feature removeFeatureMember(java.lang.String id)
          Optional Method
 java.lang.Object set(int index, java.lang.Object feature)
           
 FeatureList sort(SortBy order)
          collection.subCollection( myFilter ).sort( {"foo","bar"} ); collection.subCollection( myFilter ).sort( "bar" ).sort("foo")
 FeatureList subList(Filter subfilter)
          Sublist of this sublist!
 java.util.List subList(int fromIndex, int toIndex)
           
 
Methods inherited from class org.geotools.feature.collection.SubFeatureCollection
accepts, addListener, close, closeIterator, collection, features, filter, getAttribute, getAttribute, getAttributes, getBounds, getCount, getDefaultGeometry, getFeatureType, getID, getNumberOfAttributes, getParent, getSchema, isEmpty, openIterator, purge, reader, removeListener, setAttribute, setAttribute, setDefaultGeometry, setParent, size, subCollection
 
Methods inherited from class org.geotools.feature.collection.AbstractResourceCollection
add, addAll, clear, close, contains, containsAll, iterator, remove, removeAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 
Methods inherited from interface org.geotools.feature.FeatureCollection
accepts, addListener, close, close, features, getFeatureType, getSchema, removeListener, subCollection
 
Methods inherited from interface org.geotools.data.collection.ResourceCollection
iterator, purge
 
Methods inherited from interface org.geotools.data.FeatureResults
collection, getBounds, getCount, reader
 
Methods inherited from interface org.geotools.feature.Feature
getAttribute, getAttribute, getAttributes, getBounds, getDefaultGeometry, getID, getNumberOfAttributes, getParent, setAttribute, setAttribute, setDefaultGeometry, setParent
 

Constructor Detail

SubFeatureList

public SubFeatureList(FeatureCollection list,
                      Filter filter)

SubFeatureList

public SubFeatureList(FeatureCollection list,
                      SortBy sort)

SubFeatureList

public SubFeatureList(FeatureCollection list,
                      Filter filter,
                      SortBy subSort)
Create a simple SubFeatureList with the provided filter.

Parameters:
filter -

SubFeatureList

public SubFeatureList(FeatureCollection list,
                      java.util.List order)
Method Detail

createFilter

protected Filter createFilter()
Lazy create a filter based on index

Overrides:
createFilter in class SubFeatureCollection

index

protected java.util.List index()

createIndex

protected java.util.List createIndex()
Put this SubFeatureList in touch with its inner index


addAll

public boolean addAll(int index,
                      java.util.Collection c)
Specified by:
addAll in interface java.util.List

get

public java.lang.Object get(int index)
Specified by:
get in interface java.util.List

set

public java.lang.Object set(int index,
                            java.lang.Object feature)
Specified by:
set in interface java.util.List

add

public void add(int index,
                java.lang.Object feature)
Specified by:
add in interface java.util.List

remove

public java.lang.Object remove(int index)
Specified by:
remove in interface java.util.List

indexOf

public int indexOf(java.lang.Object o)
Specified by:
indexOf in interface java.util.List

lastIndexOf

public int lastIndexOf(java.lang.Object o)
Specified by:
lastIndexOf in interface java.util.List

listIterator

public java.util.ListIterator listIterator()
Specified by:
listIterator in interface java.util.List

listIterator

public java.util.ListIterator listIterator(int index)
Specified by:
listIterator in interface java.util.List

openIterator

public java.util.ListIterator openIterator(int index)

subList

public FeatureList subList(Filter subfilter)
Sublist of this sublist!

Implementation will ensure this does not get out of hand, order is maintained and only indexed once.

Specified by:
subList in interface FeatureList
Parameters:
subfilter -
Returns:
FeatureList based on features selected by filter

getFeatureMember

public Feature getFeatureMember(java.lang.String id)
                         throws java.util.NoSuchElementException
Description copied from interface: RandomFeatureAccess
Access Feature content by feature id.

Specified by:
getFeatureMember in interface RandomFeatureAccess
Parameters:
id -
Returns:
Feature with the indicated or id
Throws:
java.util.NoSuchElementException - if a Feature with the indicated id is not present

removeFeatureMember

public Feature removeFeatureMember(java.lang.String id)
Description copied from interface: RandomFeatureAccess
Optional Method

Specified by:
removeFeatureMember in interface RandomFeatureAccess

subList

public java.util.List subList(int fromIndex,
                              int toIndex)
Specified by:
subList in interface java.util.List

sort

public FeatureList sort(SortBy order)
Description copied from interface: FeatureCollection
collection.subCollection( myFilter ).sort( {"foo","bar"} ); collection.subCollection( myFilter ).sort( "bar" ).sort("foo")

Specified by:
sort in interface FeatureCollection
Overrides:
sort in class SubFeatureCollection


Copyright © GeoTools. All Rights Reserved.