Package ucar.nc2.internal.ncml
Class AggregationNew
- java.lang.Object
-
- ucar.nc2.internal.ncml.Aggregation
-
- ucar.nc2.internal.ncml.AggregationNew
-
- All Implemented Interfaces:
AggregationIF
,ProxyReader
public class AggregationNew extends Aggregation
JoinNew Aggregation.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ucar.nc2.internal.ncml.Aggregation
Aggregation.Type, Aggregation.TypicalDataset
-
-
Field Summary
Fields Modifier and Type Field Description protected List<String>
aggVarNames
protected List<VariableDS.Builder>
aggVars
protected List<ucar.nc2.internal.ncml.AggregationOuter.CacheVar>
cacheList
protected static boolean
debugCache
protected static boolean
debugInvocation
protected static boolean
debugStride
static int
invocation
protected boolean
timeUnitsChange
-
Fields inherited from class ucar.nc2.internal.ncml.Aggregation
cacheDirty, datasetManager, datasets, dateFormatMark, dateFormatter, debug, debugConvert, debugDateParse, debugOpenFile, debugProxy, debugRead, debugSyncDetail, dimName, diskCache2, executor, explicitDatasets, isDate, logger, ncDataset, spiObject, type, typicalDatasetMode
-
-
Constructor Summary
Constructors Constructor Description AggregationNew(NetcdfDataset.Builder ncd, String dimName, String recheckS)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addVariable(String varName)
Add a name for a variableAgg elementprotected void
buildCoords(CancelTask cancelTask)
protected void
buildNetcdfDataset(CancelTask cancelTask)
Call this to build the dataset objects in the NetcdfDatasetvoid
getDetailInfo(Formatter f)
protected int
getTotalCoords()
protected ucar.nc2.internal.ncml.AggDataset
makeDataset(String cacheName, String location, String id, String ncoordS, String coordValueS, String sectionSpec, EnumSet<NetcdfDataset.Enhance> enhance, FileFactory reader)
Dataset factory, so subclasses can overrideprotected ucar.nc2.internal.ncml.AggDataset
makeDataset(MFile dset)
protected void
promoteGlobalAttributes(ucar.nc2.internal.ncml.AggDatasetOuter typicalDataset)
protected void
readTimeCoordinates(Variable.Builder timeAxis, CancelTask cancelTask)
Array
reallyRead(Variable mainv, Section section, CancelTask cancelTask)
Read a section of an aggregation variable.Array
reallyRead(Variable mainv, CancelTask cancelTask)
Read an aggregation variable: A variable whose data spans multiple files.-
Methods inherited from class ucar.nc2.internal.ncml.Aggregation
addCollection, addDataset, addDatasetScan, addExplicitDataset, build, close, getDatasets, getDimensionName, getFileTypeDescription, getFileTypeId, getLastModified, getLocation, getType, getTypicalDataset, makeDatasets, persistRead, persistWrite, setExecutor, setModifications, setPersistenceCache, setTypicalDatasetMode, syncExtend
-
-
-
-
Field Detail
-
debugCache
protected static boolean debugCache
-
debugInvocation
protected static boolean debugInvocation
-
debugStride
protected static boolean debugStride
-
invocation
public static int invocation
-
aggVars
protected List<VariableDS.Builder> aggVars
-
cacheList
protected List<ucar.nc2.internal.ncml.AggregationOuter.CacheVar> cacheList
-
timeUnitsChange
protected boolean timeUnitsChange
-
-
Constructor Detail
-
AggregationNew
public AggregationNew(NetcdfDataset.Builder ncd, String dimName, String recheckS)
-
-
Method Detail
-
buildNetcdfDataset
protected void buildNetcdfDataset(CancelTask cancelTask) throws IOException
Description copied from class:Aggregation
Call this to build the dataset objects in the NetcdfDataset- Specified by:
buildNetcdfDataset
in classAggregation
- Parameters:
cancelTask
- maybe cancel- Throws:
IOException
- on read error
-
addVariable
public void addVariable(String varName)
Add a name for a variableAgg element- Parameters:
varName
- name of agg variable
-
buildCoords
protected void buildCoords(CancelTask cancelTask) throws IOException
- Throws:
IOException
-
readTimeCoordinates
protected void readTimeCoordinates(Variable.Builder timeAxis, CancelTask cancelTask) throws IOException
- Throws:
IOException
-
getTotalCoords
protected int getTotalCoords()
-
promoteGlobalAttributes
protected void promoteGlobalAttributes(ucar.nc2.internal.ncml.AggDatasetOuter typicalDataset) throws IOException
- Throws:
IOException
-
reallyRead
public Array reallyRead(Variable mainv, Section section, CancelTask cancelTask) throws IOException, InvalidRangeException
Read a section of an aggregation variable.- Specified by:
reallyRead
in interfaceProxyReader
- Parameters:
section
- read just this section of the data, array of Rangemainv
- the client VariablecancelTask
- user may cancel- Returns:
- the data array section
- Throws:
IOException
- on errorInvalidRangeException
- if section has incorrect rank or illegal shape.
-
reallyRead
public Array reallyRead(Variable mainv, CancelTask cancelTask) throws IOException
Read an aggregation variable: A variable whose data spans multiple files. This is an implementation of ProxyReader, so must fulfill that contract.- Specified by:
reallyRead
in interfaceProxyReader
- Parameters:
mainv
- the aggregation variablecancelTask
- user may cancel- Returns:
- memory resident Array containing the data. Will have same shape as the Variable.
- Throws:
IOException
- on error
-
makeDataset
protected ucar.nc2.internal.ncml.AggDataset makeDataset(String cacheName, String location, String id, String ncoordS, String coordValueS, String sectionSpec, EnumSet<NetcdfDataset.Enhance> enhance, FileFactory reader)
Description copied from class:Aggregation
Dataset factory, so subclasses can override- Overrides:
makeDataset
in classAggregation
- Parameters:
cacheName
- a unique name to use for cachinglocation
- attribute "location" on the netcdf elementid
- attribute "id" on the netcdf elementncoordS
- attribute "ncoords" on the netcdf elementcoordValueS
- attribute "coordValue" on the netcdf elementsectionSpec
- attribute "sectionSpec" on the netcdf elementenhance
- open dataset in enhance mode NOT USEDreader
- factory for reading this netcdf dataset- Returns:
- a Dataset
-
makeDataset
protected ucar.nc2.internal.ncml.AggDataset makeDataset(MFile dset)
- Overrides:
makeDataset
in classAggregation
-
getDetailInfo
public void getDetailInfo(Formatter f)
- Specified by:
getDetailInfo
in interfaceAggregationIF
- Overrides:
getDetailInfo
in classAggregation
-
-