Package ucar.nc2.ncml
Class Aggregation
- java.lang.Object
-
- ucar.nc2.ncml.Aggregation
-
- All Implemented Interfaces:
AggregationIF
- Direct Known Subclasses:
AggregationOuterDimension
,AggregationTiled
,AggregationUnion
@Deprecated public abstract class Aggregation extends Object implements AggregationIF
Deprecated.Superclass for NcML Aggregation. An Aggregation acts as a ProxyReader for VariableDS. That, is it must implement:public Array read(Variable mainv); public Array read(Variable mainv, Section section);
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
Aggregation.Dataset
Deprecated.Encapsolates a NetcdfFile that is a component of the aggregation.protected class
Aggregation.DatasetProxyReader
Deprecated.protected static class
Aggregation.Type
Deprecated.protected static class
Aggregation.TypicalDataset
Deprecated.
-
Field Summary
Fields Modifier and Type Field Description protected boolean
cacheDirty
Deprecated.protected MFileCollectionManager
datasetManager
Deprecated.protected List<Aggregation.Dataset>
datasets
Deprecated.protected String
dateFormatMark
Deprecated.protected DateFormatter
dateFormatter
Deprecated.protected static boolean
debug
Deprecated.protected static boolean
debugConvert
Deprecated.protected static boolean
debugDateParse
Deprecated.protected static boolean
debugOpenFile
Deprecated.protected static boolean
debugProxy
Deprecated.protected static boolean
debugRead
Deprecated.protected static boolean
debugSyncDetail
Deprecated.protected String
dimName
Deprecated.protected static DiskCache2
diskCache2
Deprecated.protected static Executor
executor
Deprecated.protected List<Aggregation.Dataset>
explicitDatasets
Deprecated.protected boolean
isDate
Deprecated.protected static org.slf4j.Logger
logger
Deprecated.protected NetcdfDataset
ncDataset
Deprecated.protected Object
spiObject
Deprecated.protected Aggregation.Type
type
Deprecated.protected static Aggregation.TypicalDataset
typicalDatasetMode
Deprecated.
-
Constructor Summary
Constructors Modifier Constructor Description protected
Aggregation(NetcdfDataset ncd, String dimName, Aggregation.Type type, String recheckS)
Deprecated.Create an Aggregation for the given NetcdfDataset.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addCollection(String spec, String olderThan)
Deprecated.void
addDataset(Aggregation.Dataset nested)
Deprecated.void
addDatasetScan(org.jdom2.Element crawlableDatasetElement, String dirName, String suffix, String regexpPatternString, String dateFormatMark, Set<NetcdfDataset.Enhance> enhanceMode, String subdirs, String olderThan)
Deprecated.Add a dataset scanvoid
addExplicitDataset(String cacheName, String location, String id, String ncoordS, String coordValueS, String sectionSpec, FileFactory reader)
Deprecated.Add a nested dataset, specified by an explicit netcdf element.protected abstract void
buildNetcdfDataset(CancelTask cancelTask)
Deprecated.Call this to build the dataset objects in the NetcdfDatasetvoid
close()
Deprecated.protected Variable
findVariable(NetcdfFile ncfile, Variable mainV)
Deprecated.void
finish(CancelTask cancelTask)
Deprecated.List<Aggregation.Dataset>
getDatasets()
Deprecated.void
getDetailInfo(Formatter f)
Deprecated.String
getDimensionName()
Deprecated.Get dimension name to join onString
getFileTypeDescription()
Deprecated.String
getFileTypeId()
Deprecated.long
getLastModified()
Deprecated.protected String
getLocation()
Deprecated.Aggregation.Type
getType()
Deprecated.Get type of aggregationprotected Aggregation.Dataset
getTypicalDataset()
Deprecated.Open one of the nested datasets as a template for the aggregation dataset.protected Aggregation.Dataset
makeDataset(String cacheName, String location, String id, String ncoordS, String coordValueS, String sectionSpec, EnumSet<NetcdfDataset.Enhance> enhance, FileFactory reader)
Deprecated.Dataset factory, so subclasses can overrideprotected Aggregation.Dataset
makeDataset(MFile dset)
Deprecated.protected void
makeDatasets(CancelTask cancelTask)
Deprecated.Make the list of Datasets, from explicit and scans.protected void
persistRead()
Deprecated.read info from the persistent XML file, if it exists; overridden in AggregationExistingvoid
persistWrite()
Deprecated.Allow information to be make persistent.protected abstract void
rebuildDataset()
Deprecated.Call this when rescan has found changed datasetsprotected void
setDatasetAcquireProxy(Aggregation.DatasetProxyReader proxy, Group g)
Deprecated.protected void
setDatasetAcquireProxy(Aggregation.Dataset typicalDataset, NetcdfDataset newds)
Deprecated.All non-agg variables use a proxy to acquire the file before reading.static void
setExecutor(Executor exec)
Deprecated.void
setModifications(org.jdom2.Element ncmlMods)
Deprecated.static void
setPersistenceCache(DiskCache2 dc)
Deprecated.static void
setTypicalDatasetMode(String mode)
Deprecated.boolean
syncExtend()
Deprecated.Check to see if its time to rescan directory, and if so, rescan and extend dataset if needed.
-
-
-
Field Detail
-
typicalDatasetMode
protected static Aggregation.TypicalDataset typicalDatasetMode
Deprecated.
-
logger
protected static org.slf4j.Logger logger
Deprecated.
-
diskCache2
protected static DiskCache2 diskCache2
Deprecated.
-
executor
protected static Executor executor
Deprecated.
-
debug
protected static boolean debug
Deprecated.
-
debugOpenFile
protected static boolean debugOpenFile
Deprecated.
-
debugSyncDetail
protected static boolean debugSyncDetail
Deprecated.
-
debugProxy
protected static boolean debugProxy
Deprecated.
-
debugRead
protected static boolean debugRead
Deprecated.
-
debugDateParse
protected static boolean debugDateParse
Deprecated.
-
debugConvert
protected static boolean debugConvert
Deprecated.
-
ncDataset
protected NetcdfDataset ncDataset
Deprecated.
-
type
protected Aggregation.Type type
Deprecated.
-
spiObject
protected Object spiObject
Deprecated.
-
explicitDatasets
protected List<Aggregation.Dataset> explicitDatasets
Deprecated.
-
datasets
protected List<Aggregation.Dataset> datasets
Deprecated.
-
datasetManager
protected MFileCollectionManager datasetManager
Deprecated.
-
cacheDirty
protected boolean cacheDirty
Deprecated.
-
dimName
protected String dimName
Deprecated.
-
dateFormatMark
protected String dateFormatMark
Deprecated.
-
isDate
protected boolean isDate
Deprecated.
-
dateFormatter
protected DateFormatter dateFormatter
Deprecated.
-
-
Constructor Detail
-
Aggregation
protected Aggregation(NetcdfDataset ncd, String dimName, Aggregation.Type type, String recheckS)
Deprecated.Create an Aggregation for the given NetcdfDataset. The following addXXXX methods are called, then finish(), before the object is ready for use.- Parameters:
ncd
- Aggregation belongs to this NetcdfDatasetdimName
- the aggregation dimension nametype
- the Aggregation.TyperecheckS
- how often to check if files have changes
-
-
Method Detail
-
setPersistenceCache
public static void setPersistenceCache(DiskCache2 dc)
Deprecated.
-
setExecutor
public static void setExecutor(Executor exec)
Deprecated.
-
setTypicalDatasetMode
public static void setTypicalDatasetMode(String mode)
Deprecated.
-
addExplicitDataset
public void addExplicitDataset(String cacheName, String location, String id, String ncoordS, String coordValueS, String sectionSpec, FileFactory reader)
Deprecated.Add a nested dataset, specified by an explicit netcdf element. enhance is handled by the reader, so its always false here.- 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 "section" on the netcdf elementreader
- factory for reading this netcdf dataset
-
addDataset
public void addDataset(Aggregation.Dataset nested)
Deprecated.
-
addDatasetScan
public void addDatasetScan(org.jdom2.Element crawlableDatasetElement, String dirName, String suffix, String regexpPatternString, String dateFormatMark, Set<NetcdfDataset.Enhance> enhanceMode, String subdirs, String olderThan)
Deprecated.Add a dataset scan- Parameters:
crawlableDatasetElement
- defines a CrawlableDataset, or nulldirName
- scan this directorysuffix
- filter on this suffix (may be null)regexpPatternString
- include if full name matches this regular expression (may be null)dateFormatMark
- create dates from the filename (may be null)enhanceMode
- how should files be enhancedsubdirs
- equals "false" if should not descend into subdirectoriesolderThan
- files must be older than this time (now - lastModified >= olderThan); must be a time unit, may ne bull
-
setModifications
public void setModifications(org.jdom2.Element ncmlMods)
Deprecated.
-
getType
public Aggregation.Type getType()
Deprecated.Get type of aggregation- Returns:
- type of aggregation
-
getDimensionName
public String getDimensionName()
Deprecated.Get dimension name to join on- Returns:
- dimension name or null if type union/tiled
-
getLocation
protected String getLocation()
Deprecated.
-
close
public void close() throws IOException
Deprecated.- Specified by:
close
in interfaceAggregationIF
- Throws:
IOException
-
syncExtend
public boolean syncExtend() throws IOException
Deprecated.Check to see if its time to rescan directory, and if so, rescan and extend dataset if needed. Note that this just calls sync(), so structural metadata may be modified (!!)- Specified by:
syncExtend
in interfaceAggregationIF
- Returns:
- true if directory was rescanned and dataset may have been updated
- Throws:
IOException
- on io error
-
getLastModified
public long getLastModified()
Deprecated.- Specified by:
getLastModified
in interfaceAggregationIF
-
getFileTypeId
public String getFileTypeId()
Deprecated.- Specified by:
getFileTypeId
in interfaceAggregationIF
-
getFileTypeDescription
public String getFileTypeDescription()
Deprecated.- Specified by:
getFileTypeDescription
in interfaceAggregationIF
-
buildNetcdfDataset
protected abstract void buildNetcdfDataset(CancelTask cancelTask) throws IOException
Deprecated.Call this to build the dataset objects in the NetcdfDataset- Parameters:
cancelTask
- maybe cancel- Throws:
IOException
- on read error
-
rebuildDataset
protected abstract void rebuildDataset() throws IOException
Deprecated.Call this when rescan has found changed datasets- Throws:
IOException
- on read error
-
persistWrite
public void persistWrite() throws IOException
Deprecated.Allow information to be make persistent. Overridden in AggregationExisting- Specified by:
persistWrite
in interfaceAggregationIF
- Throws:
IOException
- on error
-
persistRead
protected void persistRead()
Deprecated.read info from the persistent XML file, if it exists; overridden in AggregationExisting
-
getDetailInfo
public void getDetailInfo(Formatter f)
Deprecated.- Specified by:
getDetailInfo
in interfaceAggregationIF
-
finish
public void finish(CancelTask cancelTask) throws IOException
Deprecated.- Throws:
IOException
-
getDatasets
public List<Aggregation.Dataset> getDatasets()
Deprecated.
-
makeDatasets
protected void makeDatasets(CancelTask cancelTask) throws IOException
Deprecated.Make the list of Datasets, from explicit and scans.- Parameters:
cancelTask
- user can cancel- Throws:
IOException
- on i/o error
-
getTypicalDataset
protected Aggregation.Dataset getTypicalDataset() throws IOException
Deprecated.Open one of the nested datasets as a template for the aggregation dataset.- Returns:
- a typical Dataset
- Throws:
IOException
- if there are no datasets
-
makeDataset
protected Aggregation.Dataset makeDataset(String cacheName, String location, String id, String ncoordS, String coordValueS, String sectionSpec, EnumSet<NetcdfDataset.Enhance> enhance, FileFactory reader)
Deprecated.Dataset factory, so subclasses can override- 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 Aggregation.Dataset
-
makeDataset
protected Aggregation.Dataset makeDataset(MFile dset)
Deprecated.
-
setDatasetAcquireProxy
protected void setDatasetAcquireProxy(Aggregation.Dataset typicalDataset, NetcdfDataset newds) throws IOException
Deprecated.All non-agg variables use a proxy to acquire the file before reading. If the variable is caching, read data into cache now. If not caching, VariableEnhanced.setProxyReader() is called.- Parameters:
typicalDataset
- read from a "typical dataset"newds
- containing dataset- Throws:
IOException
- on i/o error
-
setDatasetAcquireProxy
protected void setDatasetAcquireProxy(Aggregation.DatasetProxyReader proxy, Group g) throws IOException
Deprecated.- Throws:
IOException
-
findVariable
protected Variable findVariable(NetcdfFile ncfile, Variable mainV)
Deprecated.
-
-