|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.nc2.ncml.Aggregation
public abstract class Aggregation
Superclass for NcML Aggregation.
| Nested Class Summary | |
|---|---|
protected class |
Aggregation.DatasetProxyReader
|
static class |
Aggregation.Type
|
protected static class |
Aggregation.TypicalDataset
|
| Field Summary | |
|---|---|
protected boolean |
cacheDirty
|
protected DatasetCollectionManager |
datasetManager
|
protected java.util.List<ucar.nc2.ncml.Aggregation.Dataset> |
datasets
|
protected java.lang.String |
dateFormatMark
|
protected boolean |
debug
|
protected boolean |
debugDateParse
|
protected boolean |
debugOpenFile
|
protected boolean |
debugProxy
|
protected boolean |
debugRead
|
protected boolean |
debugSyncDetail
|
protected java.lang.String |
dimName
|
protected static DiskCache2 |
diskCache2
|
protected java.util.EnumSet<NetcdfDataset.Enhance> |
enhance
|
protected static java.util.concurrent.Executor |
executor
|
protected java.util.List<ucar.nc2.ncml.Aggregation.Dataset> |
explicitDatasets
|
protected DateFormatter |
formatter
|
protected boolean |
isDate
|
protected static org.slf4j.Logger |
logger
|
protected NetcdfDataset |
ncDataset
|
protected java.lang.Object |
spiObject
|
protected boolean |
timeUnitsChange
|
protected Aggregation.Type |
type
|
protected static Aggregation.TypicalDataset |
typicalDatasetMode
|
| Constructor Summary | |
|---|---|
protected |
Aggregation(NetcdfDataset ncd,
java.lang.String dimName,
Aggregation.Type type,
java.lang.String recheckS)
Create an Aggregation for the given NetcdfDataset. |
| Method Summary | |
|---|---|
void |
addCrawlableDatasetScan(org.jdom.Element crawlableDatasetElement,
java.lang.String dirName,
java.lang.String suffix,
java.lang.String regexpPatternString,
java.lang.String dateFormatMark,
java.util.EnumSet<NetcdfDataset.Enhance> mode,
java.lang.String subdirs,
java.lang.String olderThan)
Add a crawlable dataset scan |
void |
addDataset(ucar.nc2.ncml.Aggregation.Dataset nested)
|
void |
addExplicitDataset(java.lang.String cacheName,
java.lang.String location,
java.lang.String ncoordS,
java.lang.String coordValueS,
java.lang.String sectionSpec,
FileFactory reader,
CancelTask cancelTask)
Add a nested dataset, specified by an explicit netcdf element. |
protected abstract void |
buildDataset(CancelTask cancelTask)
Call this to build the dataset objects |
void |
close()
Release all resources associated with the aggregation |
protected void |
closeDatasets()
|
protected Variable |
findVariable(NetcdfFile ncfile,
Variable mainV)
|
void |
finish(CancelTask cancelTask)
|
protected java.util.List<ucar.nc2.ncml.Aggregation.Dataset> |
getDatasets()
|
java.lang.String |
getDimensionName()
Get dimension name to join on |
protected java.lang.String |
getLocation()
|
Aggregation.Type |
getType()
Get type of aggregation |
protected ucar.nc2.ncml.Aggregation.Dataset |
getTypicalDataset()
Open one of the nested datasets as a template for the aggregation dataset. |
protected ucar.nc2.ncml.Aggregation.Dataset |
makeDataset(java.lang.String cacheName,
java.lang.String location,
java.lang.String ncoordS,
java.lang.String coordValueS,
java.lang.String sectionSpec,
java.util.EnumSet<NetcdfDataset.Enhance> enhance,
FileFactory reader)
Dataset factory, so subclasses can override |
protected void |
makeDatasets(CancelTask cancelTask)
Make the Dataset objects. |
protected void |
persistRead()
read info from the persistent XML file, if it exists; overridden in AggregationExisting |
void |
persistWrite()
Allow information to be make persistent. |
abstract Array |
read(Variable mainv,
CancelTask cancelTask)
Read an aggregation variable: A variable whose data spans multiple files. |
abstract Array |
read(Variable mainv,
Section section,
CancelTask cancelTask)
Read a section of an aggregation variable. |
protected abstract void |
rebuildDataset()
Call this when rescan has found changed datasets |
protected void |
setDatasetAcquireProxy(ucar.nc2.ncml.Aggregation.Dataset typicalDataset,
NetcdfDataset newds)
All non-agg variables use a proxy to acquire the file before reading. |
static void |
setExecutor(java.util.concurrent.Executor exec)
|
static void |
setPersistenceCache(DiskCache2 dc)
|
static void |
setTypicalDatasetMode(java.lang.String mode)
|
boolean |
sync()
|
boolean |
syncExtend(boolean force)
Check to see if its time to rescan directory, and if so, rescan and extend dataset if needed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static Aggregation.TypicalDataset typicalDatasetMode
protected static org.slf4j.Logger logger
protected static DiskCache2 diskCache2
protected static java.util.concurrent.Executor executor
protected NetcdfDataset ncDataset
protected Aggregation.Type type
protected java.lang.Object spiObject
protected java.util.List<ucar.nc2.ncml.Aggregation.Dataset> explicitDatasets
protected java.util.List<ucar.nc2.ncml.Aggregation.Dataset> datasets
protected DatasetCollectionManager datasetManager
protected boolean cacheDirty
protected java.lang.String dimName
protected boolean timeUnitsChange
protected java.lang.String dateFormatMark
protected java.util.EnumSet<NetcdfDataset.Enhance> enhance
protected boolean isDate
protected DateFormatter formatter
protected boolean debug
protected boolean debugOpenFile
protected boolean debugSyncDetail
protected boolean debugProxy
protected boolean debugRead
protected boolean debugDateParse
| Constructor Detail |
|---|
protected Aggregation(NetcdfDataset ncd,
java.lang.String dimName,
Aggregation.Type type,
java.lang.String recheckS)
ncd - Aggregation belongs to this NetcdfDatasetdimName - the aggregation dimension nametype - the Aggregation.TyperecheckS - how often to check if files have changes| Method Detail |
|---|
public static void setPersistenceCache(DiskCache2 dc)
public static void setExecutor(java.util.concurrent.Executor exec)
public static void setTypicalDatasetMode(java.lang.String mode)
public void addExplicitDataset(java.lang.String cacheName,
java.lang.String location,
java.lang.String ncoordS,
java.lang.String coordValueS,
java.lang.String sectionSpec,
FileFactory reader,
CancelTask cancelTask)
cacheName - a unique name to use for cachinglocation - attribute "location" 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 datasetcancelTask - user may cancel, may be nullpublic void addDataset(ucar.nc2.ncml.Aggregation.Dataset nested)
public void addCrawlableDatasetScan(org.jdom.Element crawlableDatasetElement,
java.lang.String dirName,
java.lang.String suffix,
java.lang.String regexpPatternString,
java.lang.String dateFormatMark,
java.util.EnumSet<NetcdfDataset.Enhance> mode,
java.lang.String subdirs,
java.lang.String olderThan)
throws java.io.IOException
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)mode - 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
java.io.IOException - if I/O errorpublic Aggregation.Type getType()
public java.lang.String getDimensionName()
public void close()
throws java.io.IOException
java.io.IOException - on error
protected void closeDatasets()
throws java.io.IOException
java.io.IOException
public void persistWrite()
throws java.io.IOException
java.io.IOException - on errorprotected void persistRead()
public void finish(CancelTask cancelTask)
throws java.io.IOException
java.io.IOExceptionprotected java.util.List<ucar.nc2.ncml.Aggregation.Dataset> getDatasets()
protected void makeDatasets(CancelTask cancelTask)
throws java.io.IOException
cancelTask - user can cancel
java.io.IOException - on i/o error
protected abstract void buildDataset(CancelTask cancelTask)
throws java.io.IOException
cancelTask - maybe cancel
java.io.IOException - on read error
protected abstract void rebuildDataset()
throws java.io.IOException
java.io.IOException - on read error
public boolean syncExtend(boolean force)
throws java.io.IOException
force - if true, always rescan even if time not expired
java.io.IOException - on io error
public boolean sync()
throws java.io.IOException
java.io.IOExceptionprotected java.lang.String getLocation()
protected ucar.nc2.ncml.Aggregation.Dataset getTypicalDataset()
throws java.io.IOException
java.io.FileNotFoundException - if there are no datasets
java.io.IOException
public abstract Array read(Variable mainv,
CancelTask cancelTask)
throws java.io.IOException
read in interface ProxyReadermainv - the aggregation variablecancelTask - allow the user to cancel
java.io.IOException
public abstract Array read(Variable mainv,
Section section,
CancelTask cancelTask)
throws java.io.IOException,
InvalidRangeException
read in interface ProxyReadermainv - the aggregation variablecancelTask - allow the user to cancelsection - read just this section of the data, refers to aggregated Variable's section.
java.io.IOException
InvalidRangeException - if section has incorrect rank or shape.
protected ucar.nc2.ncml.Aggregation.Dataset makeDataset(java.lang.String cacheName,
java.lang.String location,
java.lang.String ncoordS,
java.lang.String coordValueS,
java.lang.String sectionSpec,
java.util.EnumSet<NetcdfDataset.Enhance> enhance,
FileFactory reader)
cacheName - a unique name to use for cachinglocation - attribute "location" 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 modereader - factory for reading this netcdf dataset
protected void setDatasetAcquireProxy(ucar.nc2.ncml.Aggregation.Dataset typicalDataset,
NetcdfDataset newds)
throws java.io.IOException
typicalDataset - read from a "typical dataset"newds - containing dataset
java.io.IOException - on i/o error
protected Variable findVariable(NetcdfFile ncfile,
Variable mainV)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||