Package ucar.nc2.grib.collection
Class GribCollectionMutable
- java.lang.Object
-
- ucar.nc2.grib.collection.GribCollectionMutable
-
- All Implemented Interfaces:
Closeable,AutoCloseable
- Direct Known Subclasses:
PartitionCollectionMutable
public class GribCollectionMutable extends Object implements Closeable
A mutable class for writing indices or building GribCollectionImmutable. Better to use a Builder?- Since:
- 12/1/13
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classGribCollectionMutable.DatasetclassGribCollectionMutable.GroupGCstatic classGribCollectionMutable.RecordclassGribCollectionMutable.VariableIndex
-
Field Summary
Fields Modifier and Type Field Description intbackProcessIdintcenterprotected thredds.featurecollection.FeatureCollectionConfigconfigprotected GribTablescustprotected List<GribCollectionMutable.Dataset>datasetsprotected ucar.nc2.time.CalendarDateRangedateRangeprotected Filedirectoryprotected Map<Integer,thredds.inventory.MFile>fileMapprotected longfileSizeintgenProcessIdintgenProcessTypeprotected StringindexFilenameprotected ucar.unidata.io.RandomAccessFileindexRafprotected intindexVersionprotected booleanisGrib1protected longlastModifiedintlocalintmasterprotected CoordinateRuntimemasterRuntimeprotected Stringnameprotected StringorgDirectoryList<ucar.unidata.util.Parameter>paramsintsubcenterintversion
-
Constructor Summary
Constructors Modifier Constructor Description protectedGribCollectionMutable(String name, File directory, thredds.featurecollection.FeatureCollectionConfig config, boolean isGrib1)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()thredds.featurecollection.FeatureCollectionConfiggetConfig()List<GribCollectionMutable.Dataset>getDatasets()FilegetDirectory()StringgetFilename(int fileno)List<String>getFilenames()The files that comprise the collection.Collection<thredds.inventory.MFile>getFiles()StringgetLocation()StringgetName()GribCollectionMutable.GroupGCmakeGroup()voidsetFileMap(Map<Integer,thredds.inventory.MFile> fileMap)voidshowIndex(Formatter f)StringshowLocation()StringtoString()
-
-
-
Field Detail
-
name
protected final String name
-
config
protected final thredds.featurecollection.FeatureCollectionConfig config
-
isGrib1
protected final boolean isGrib1
-
directory
protected File directory
-
orgDirectory
protected String orgDirectory
-
version
public int version
-
center
public int center
-
subcenter
public int subcenter
-
master
public int master
-
local
public int local
-
genProcessType
public int genProcessType
-
genProcessId
public int genProcessId
-
backProcessId
public int backProcessId
-
params
public List<ucar.unidata.util.Parameter> params
-
datasets
protected List<GribCollectionMutable.Dataset> datasets
-
masterRuntime
protected CoordinateRuntime masterRuntime
-
cust
protected GribTables cust
-
indexVersion
protected int indexVersion
-
dateRange
protected ucar.nc2.time.CalendarDateRange dateRange
-
indexRaf
protected ucar.unidata.io.RandomAccessFile indexRaf
-
indexFilename
protected String indexFilename
-
lastModified
protected long lastModified
-
fileSize
protected long fileSize
-
-
Method Detail
-
getName
public String getName()
-
getDirectory
public File getDirectory()
-
getLocation
public String getLocation()
-
getFiles
public Collection<thredds.inventory.MFile> getFiles()
-
getConfig
public thredds.featurecollection.FeatureCollectionConfig getConfig()
-
getFilenames
public List<String> getFilenames()
The files that comprise the collection. Actual paths, including the grib cache if used.- Returns:
- list of filename.
-
getFilename
public String getFilename(int fileno)
-
getDatasets
public List<GribCollectionMutable.Dataset> getDatasets()
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
showIndex
public void showIndex(Formatter f)
-
showLocation
public String showLocation()
-
makeGroup
public GribCollectionMutable.GroupGC makeGroup()
-
-