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>aggVarNamesprotected List<VariableDS.Builder>aggVarsprotected List<ucar.nc2.internal.ncml.AggregationOuter.CacheVar>cacheListprotected static booleandebugCacheprotected static booleandebugInvocationprotected static booleandebugStridestatic intinvocationprotected booleantimeUnitsChange-
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 voidaddVariable(String varName)Add a name for a variableAgg elementprotected voidbuildCoords(CancelTask cancelTask)protected voidbuildNetcdfDataset(CancelTask cancelTask)Call this to build the dataset objects in the NetcdfDatasetvoidgetDetailInfo(Formatter f)protected intgetTotalCoords()protected ucar.nc2.internal.ncml.AggDatasetmakeDataset(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.AggDatasetmakeDataset(MFile dset)protected voidpromoteGlobalAttributes(ucar.nc2.internal.ncml.AggDatasetOuter typicalDataset)protected voidreadTimeCoordinates(Variable.Builder timeAxis, CancelTask cancelTask)ArrayreallyRead(Variable mainv, Section section, CancelTask cancelTask)Read a section of an aggregation variable.ArrayreallyRead(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:AggregationCall this to build the dataset objects in the NetcdfDataset- Specified by:
buildNetcdfDatasetin 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:
reallyReadin 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:
reallyReadin 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:AggregationDataset factory, so subclasses can override- Overrides:
makeDatasetin 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:
makeDatasetin classAggregation
-
getDetailInfo
public void getDetailInfo(Formatter f)
- Specified by:
getDetailInfoin interfaceAggregationIF- Overrides:
getDetailInfoin classAggregation
-
-