ucar.nc2.ft.point
Class SectionCollectionImpl

java.lang.Object
  extended by ucar.nc2.ft.point.MultipleNestedPointCollectionImpl
      extended by ucar.nc2.ft.point.SectionCollectionImpl
All Implemented Interfaces:
FeatureCollection, NestedPointFeatureCollection, SectionFeatureCollection
Direct Known Subclasses:
StandardSectionCollectionImpl

public abstract class SectionCollectionImpl
extends MultipleNestedPointCollectionImpl
implements SectionFeatureCollection

Superclass for implementations of SectionFeatureCollection: series of profiles along a trajectory Concrete subclass must implement getNestedPointFeatureCollectionIterator();

Since:
Oct 22, 2009
Author:
caron

Field Summary
 
Fields inherited from class ucar.nc2.ft.point.MultipleNestedPointCollectionImpl
name
 
Constructor Summary
protected SectionCollectionImpl(String name)
           
 
Method Summary
 PointFeatureCollectionIterator getPointFeatureCollectionIterator(int bufferSize)
          Iterate through the collection, composed of PointFeatureCollection.
 boolean hasNext()
          Use the internal iterator to check if there is another SectionFeature in the iteration.
 SectionFeature next()
          Use the internal iterator to get the next SectionFeature in the iteration.
 void resetIteration()
          Reset the internal iterator for another iteration over the SectionFeatures in this Collection.
 SectionFeatureCollection subset(LatLonRect boundingBox)
          Get a subsetted NestedPointFeatureCollection based on a LatLonRect
 
Methods inherited from class ucar.nc2.ft.point.MultipleNestedPointCollectionImpl
flatten, getCollectionFeatureType, getName, isMultipleNested, setSize, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ucar.nc2.ft.NestedPointFeatureCollection
flatten, getNestedPointFeatureCollectionIterator, isMultipleNested, size
 
Methods inherited from interface ucar.nc2.ft.FeatureCollection
getCollectionFeatureType, getName
 

Constructor Detail

SectionCollectionImpl

protected SectionCollectionImpl(String name)
Method Detail

getPointFeatureCollectionIterator

public PointFeatureCollectionIterator getPointFeatureCollectionIterator(int bufferSize)
                                                                 throws IOException
Description copied from interface: NestedPointFeatureCollection
Iterate through the collection, composed of PointFeatureCollection. Use this only if isMultipleNested() = false.

Specified by:
getPointFeatureCollectionIterator in interface NestedPointFeatureCollection
Overrides:
getPointFeatureCollectionIterator in class MultipleNestedPointCollectionImpl
Parameters:
bufferSize - how many bytes can be used to buffer data, use -1 to use default.
Returns:
an iterator through PointFeatureCollection objects.
Throws:
IOException - on read error

hasNext

public boolean hasNext()
                throws IOException
Description copied from interface: SectionFeatureCollection
Use the internal iterator to check if there is another SectionFeature in the iteration.

Specified by:
hasNext in interface SectionFeatureCollection
Returns:
true is there is another SectionFeature in the iteration.
Throws:
IOException - on read error

next

public SectionFeature next()
                    throws IOException
Description copied from interface: SectionFeatureCollection
Use the internal iterator to get the next SectionFeature in the iteration. You must call hasNext() before you call this.

Specified by:
next in interface SectionFeatureCollection
Returns:
the next SectionFeature in the iteration
Throws:
IOException - on read error

resetIteration

public void resetIteration()
                    throws IOException
Description copied from interface: SectionFeatureCollection
Reset the internal iterator for another iteration over the SectionFeatures in this Collection.

Specified by:
resetIteration in interface SectionFeatureCollection
Throws:
IOException - on read error

subset

public SectionFeatureCollection subset(LatLonRect boundingBox)
                                throws IOException
Description copied from interface: NestedPointFeatureCollection
Get a subsetted NestedPointFeatureCollection based on a LatLonRect

Specified by:
subset in interface NestedPointFeatureCollection
Parameters:
boundingBox - spatial subset
Returns:
subsetted collection
Throws:
IOException - on i/o error


Copyright © 1999-2011 UCAR/Unidata. All Rights Reserved.