@Immutable public abstract class GribCollectionImmutable extends java.lang.Object implements java.io.Closeable, FileCacheable
Could use the Proto equivalents, and eliminate GribCollectionMutable ?
Modifier and Type | Class and Description |
---|---|
class |
GribCollectionImmutable.Dataset |
class |
GribCollectionImmutable.GroupGC |
static class |
GribCollectionImmutable.Record |
static class |
GribCollectionImmutable.Type |
class |
GribCollectionImmutable.VariableIndex |
Modifier and Type | Field and Description |
---|---|
protected FeatureCollectionConfig |
config |
static int |
countGC |
protected GribTables |
cust |
protected java.util.List<GribCollectionImmutable.Dataset> |
datasets |
protected CalendarDateRange |
dateRange |
protected java.io.File |
directory |
protected java.util.Map<java.lang.Integer,MFile> |
fileMap |
protected java.lang.String |
indexFilename |
protected ucar.nc2.grib.collection.GribCollectionImmutable.Info |
info |
boolean |
isGrib1 |
protected CoordinateRuntime |
masterRuntime |
protected java.lang.String |
name |
public static int countGC
protected final java.lang.String name
protected final java.io.File directory
protected final FeatureCollectionConfig config
public final boolean isGrib1
protected final ucar.nc2.grib.collection.GribCollectionImmutable.Info info
protected final java.util.List<GribCollectionImmutable.Dataset> datasets
protected final CoordinateRuntime masterRuntime
protected final CalendarDateRange dateRange
protected final java.util.Map<java.lang.Integer,MFile> fileMap
protected final GribTables cust
protected final java.lang.String indexFilename
protected GribCollectionImmutable.VariableIndex makeVariableIndex(GribCollectionImmutable.GroupGC group, GribCollectionMutable.VariableIndex mutableVar)
public java.util.List<GribCollectionImmutable.Dataset> getDatasets()
public GribCollectionImmutable.Dataset getDataset(int idx)
public GribCollectionImmutable.Dataset getDatasetCanonical()
public java.lang.String getName()
public java.io.File getDirectory()
public CoordinateRuntime getMasterRuntime()
public CalendarDate getMasterFirstDate()
public int getVersion()
public int getCenter()
public int getSubcenter()
public int getMaster()
public int getLocal()
public int getGenProcessType()
public int getGenProcessId()
public int getBackProcessId()
public AttributeContainer getGlobalAttributes()
public abstract void addGlobalAttributes(AttributeContainer result)
public abstract void addVariableAttributes(AttributeContainer v, GribCollectionImmutable.VariableIndex vindex)
protected abstract java.lang.String makeVariableId(GribCollectionImmutable.VariableIndex v)
public void close() throws java.io.IOException
FileCacheable
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in interface FileCacheable
java.io.IOException
- on io error@Deprecated public void release()
release
in interface FileCacheable
@Deprecated public void reacquire()
reacquire
in interface FileCacheable
public java.lang.String getLocation()
FileCacheable
getLocation
in interface FileCacheable
public long getLastModified()
FileCacheable
FileFactory
.getLastModified
in interface FileCacheable
long
value representing the time the file(s) were last modified or 0L
if the
last-modified time couldn't be determined for any reason.@Deprecated public void setFileCache(FileCacheIF fileCache)
FileCacheable
public synchronized void close() throws java.io.IOException { if (cache != null) { if (cache.release(this)) return; } reallyClose(); }
setFileCache
in interface FileCacheable
fileCache
- must store this, use it on close as above.public void showStatus(java.util.Formatter f)
public void showStatusSummary(java.util.Formatter f, java.lang.String type)
public void showIndex(java.util.Formatter f)
public java.lang.String toString()
toString
in class java.lang.Object
public long getIndexFileSize()
public MFile getFile(int fileno)
public java.lang.String getFilename(int fileno)
public java.util.Collection<MFile> getFiles()
@Nullable public MFile findMFileByName(java.lang.String filename)
protected static NetcdfDataset buildNetcdfDataset(AbstractIOServiceProvider iosp, java.lang.String location) throws java.io.IOException
java.io.IOException
@Nullable public abstract NetcdfDataset getNetcdfDataset(GribCollectionImmutable.Dataset ds, GribCollectionImmutable.GroupGC group, java.lang.String filename, FeatureCollectionConfig gribConfig, java.util.Formatter errlog, org.slf4j.Logger logger) throws java.io.IOException
java.io.IOException
@Nullable public abstract GridDataset getGridDataset(GribCollectionImmutable.Dataset ds, GribCollectionImmutable.GroupGC group, java.lang.String filename, FeatureCollectionConfig gribConfig, java.util.Formatter errlog, org.slf4j.Logger logger) throws java.io.IOException
java.io.IOException
@Nullable public abstract CoverageCollection getGridCoverage(GribCollectionImmutable.Dataset ds, GribCollectionImmutable.GroupGC group, java.lang.String filename, FeatureCollectionConfig gribConfig, java.util.Formatter errlog, org.slf4j.Logger logger) throws java.io.IOException
java.io.IOException