ucar.nc2.ncml
Class AggregationUnion

java.lang.Object
  extended by ucar.nc2.ncml.Aggregation
      extended by ucar.nc2.ncml.AggregationUnion
All Implemented Interfaces:
ProxyReader

public class AggregationUnion
extends Aggregation

Aggregation on datasets to be simply combined - aka "union". The variables are transferred from the component files to the

Author:
caron

Nested Class Summary
 
Nested classes/interfaces inherited from class ucar.nc2.ncml.Aggregation
Aggregation.DatasetProxyReader, Aggregation.Type, Aggregation.TypicalDataset
 
Field Summary
 
Fields inherited from class ucar.nc2.ncml.Aggregation
cacheDirty, datasetManager, datasets, dateFormatMark, debug, debugDateParse, debugOpenFile, debugProxy, debugRead, debugSyncDetail, dimName, diskCache2, enhance, executor, explicitDatasets, formatter, isDate, logger, ncDataset, spiObject, timeUnitsChange, type, typicalDatasetMode
 
Constructor Summary
AggregationUnion(NetcdfDataset ncd, java.lang.String dimName, java.lang.String recheckS)
           
 
Method Summary
protected  void buildDataset(CancelTask cancelTask)
          Call this to build the dataset objects
protected  void closeDatasets()
           
 Array read(Variable mainv, CancelTask cancelTask)
          Read an aggregation variable: A variable whose data spans multiple files.
 Array read(Variable mainv, Section section, CancelTask cancelTask)
          Read a section of an aggregation variable.
protected  void rebuildDataset()
          Call this when rescan has found changed datasets
 
Methods inherited from class ucar.nc2.ncml.Aggregation
addDataset, addDatasetScan, addExplicitDataset, close, findVariable, finish, getDatasets, getDimensionName, getLocation, getType, getTypicalDataset, makeDataset, makeDatasets, persistRead, persistWrite, setDatasetAcquireProxy, setExecutor, setPersistenceCache, setTypicalDatasetMode, sync, syncExtend
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AggregationUnion

public AggregationUnion(NetcdfDataset ncd,
                        java.lang.String dimName,
                        java.lang.String recheckS)
Method Detail

buildDataset

protected void buildDataset(CancelTask cancelTask)
                     throws java.io.IOException
Description copied from class: Aggregation
Call this to build the dataset objects

Specified by:
buildDataset in class Aggregation
Parameters:
cancelTask - maybe cancel
Throws:
java.io.IOException - on read error

rebuildDataset

protected void rebuildDataset()
                       throws java.io.IOException
Description copied from class: Aggregation
Call this when rescan has found changed datasets

Specified by:
rebuildDataset in class Aggregation
Throws:
java.io.IOException - on read error

read

public Array read(Variable mainv,
                  CancelTask cancelTask)
           throws java.io.IOException
Description copied from class: Aggregation
Read an aggregation variable: A variable whose data spans multiple files.

Specified by:
read in interface ProxyReader
Specified by:
read in class Aggregation
Parameters:
mainv - the aggregation variable
cancelTask - allow the user to cancel
Returns:
the data array
Throws:
java.io.IOException - on error

read

public Array read(Variable mainv,
                  Section section,
                  CancelTask cancelTask)
           throws java.io.IOException,
                  InvalidRangeException
Description copied from class: Aggregation
Read a section of an aggregation variable.

Specified by:
read in interface ProxyReader
Specified by:
read in class Aggregation
Parameters:
mainv - the aggregation variable
section - read just this section of the data, refers to aggregated Variable's section.
cancelTask - allow the user to cancel
Returns:
the data array section
Throws:
java.io.IOException - on error
InvalidRangeException - if section has incorrect rank or shape.

closeDatasets

protected void closeDatasets()
                      throws java.io.IOException
Overrides:
closeDatasets in class Aggregation
Throws:
java.io.IOException