Package ucar.nc2.ncml

Class Aggregation

    • Field Detail

      • 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.
      • spiObject

        protected Object spiObject
        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 NetcdfDataset
        dimName - the aggregation dimension name
        type - the Aggregation.Type
        recheckS - 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 caching
        location - attribute "location" on the netcdf element
        id - attribute "id" on the netcdf element
        ncoordS - attribute "ncoords" on the netcdf element
        coordValueS - attribute "coordValue" on the netcdf element
        sectionSpec - attribute "section" on the netcdf element
        reader - factory for reading this netcdf dataset
      • 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 null
        dirName - scan this directory
        suffix - 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 enhanced
        subdirs - equals "false" if should not descend into subdirectories
        olderThan - files must be older than this time (now - lastModified >= olderThan); must be a time unit, may ne bull
      • addCollection

        public void addCollection​(String spec,
                                  String olderThan)
        Deprecated.
      • 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.
      • 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 interface AggregationIF
        Returns:
        true if directory was rescanned and dataset may have been updated
        Throws:
        IOException - on io error
      • 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 interface AggregationIF
        Throws:
        IOException - on error
      • persistRead

        protected void persistRead()
        Deprecated.
        read info from the persistent XML file, if it exists; overridden in AggregationExisting
      • 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 caching
        location - attribute "location" on the netcdf element
        id - attribute "id" on the netcdf element
        ncoordS - attribute "ncoords" on the netcdf element
        coordValueS - attribute "coordValue" on the netcdf element
        sectionSpec - attribute "sectionSpec" on the netcdf element
        enhance - open dataset in enhance mode NOT USED
        reader - factory for reading this netcdf dataset
        Returns:
        a Aggregation.Dataset
      • 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