ucar.nc2.ncml
Class Aggregation.DatasetProxyReader

java.lang.Object
  extended by ucar.nc2.ncml.Aggregation.DatasetProxyReader
All Implemented Interfaces:
ProxyReader
Enclosing class:
Aggregation

protected class Aggregation.DatasetProxyReader
extends java.lang.Object
implements ProxyReader


Method Summary
 Array read(Variable mainV, CancelTask cancelTask)
          Read all the data for a Variable.
 Array read(Variable mainV, CancelTask cancelTask, java.util.List section)
          Read a section of the data for a Variable and return a memory resident Array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

read

public Array read(Variable mainV,
                  CancelTask cancelTask)
           throws java.io.IOException
Description copied from interface: ProxyReader
Read all the data for a Variable. The Array has the same element type and shape as the Variable.

Specified by:
read in interface ProxyReader
Parameters:
mainV - the Variable
cancelTask - allow user to cancel, may be null.
Returns:
memory resident Array containing the data. Will have same shape as the Variable.
Throws:
java.io.IOException - on error

read

public Array read(Variable mainV,
                  CancelTask cancelTask,
                  java.util.List section)
           throws java.io.IOException,
                  InvalidRangeException
Description copied from interface: ProxyReader
Read a section of the data for a Variable and return a memory resident Array. The Array has the same element type as the Variable, and the requested shape. Note that this does not do rank reduction, so the returned Array has the same rank as the Variable. Use Array.reduce() for rank reduction.

Specified by:
read in interface ProxyReader
Parameters:
mainV - the Variable
cancelTask - allow user to cancel, may be null.
section - list of Range specifying the section of data to read. Must be null or same rank as variable. If list is null, assume all data. Each Range corresponds to a Dimension. If the Range object is null, it means use the entire dimension.
Returns:
memory resident Array containing the data. Will have same shape as the Variable.
Throws:
java.io.IOException - on error
InvalidRangeException - if section is incorrect rank or shape.