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 class
GribCollectionMutable.Dataset
class
GribCollectionMutable.GroupGC
static class
GribCollectionMutable.Record
class
GribCollectionMutable.VariableIndex
-
Field Summary
Fields Modifier and Type Field Description int
backProcessId
int
center
protected FeatureCollectionConfig
config
protected GribTables
cust
protected List<GribCollectionMutable.Dataset>
datasets
protected CalendarDateRange
dateRange
protected File
directory
protected Map<Integer,MFile>
fileMap
protected long
fileSize
int
genProcessId
int
genProcessType
protected String
indexFilename
protected RandomAccessFile
indexRaf
protected int
indexVersion
protected boolean
isGrib1
protected long
lastModified
int
local
int
master
protected CoordinateRuntime
masterRuntime
protected String
name
protected String
orgDirectory
List<Parameter>
params
int
subcenter
int
version
-
Constructor Summary
Constructors Modifier Constructor Description protected
GribCollectionMutable(String name, File directory, FeatureCollectionConfig config, boolean isGrib1)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
FeatureCollectionConfig
getConfig()
List<GribCollectionMutable.Dataset>
getDatasets()
File
getDirectory()
String
getFilename(int fileno)
List<String>
getFilenames()
The files that comprise the collection.Collection<MFile>
getFiles()
String
getLocation()
String
getName()
GribCollectionMutable.GroupGC
makeGroup()
void
setFileMap(Map<Integer,MFile> fileMap)
void
showIndex(Formatter f)
String
showLocation()
String
toString()
-
-
-
Field Detail
-
name
protected final String name
-
config
protected final 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
-
datasets
protected List<GribCollectionMutable.Dataset> datasets
-
masterRuntime
protected CoordinateRuntime masterRuntime
-
cust
protected GribTables cust
-
indexVersion
protected int indexVersion
-
dateRange
protected CalendarDateRange dateRange
-
indexRaf
protected RandomAccessFile indexRaf
-
indexFilename
protected String indexFilename
-
lastModified
protected long lastModified
-
fileSize
protected long fileSize
-
-
Constructor Detail
-
GribCollectionMutable
protected GribCollectionMutable(String name, File directory, FeatureCollectionConfig config, boolean isGrib1)
-
-
Method Detail
-
getName
public String getName()
-
getDirectory
public File getDirectory()
-
getLocation
public String getLocation()
-
getFiles
public Collection<MFile> getFiles()
-
getConfig
public 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:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
showIndex
public void showIndex(Formatter f)
-
showLocation
public String showLocation()
-
makeGroup
public GribCollectionMutable.GroupGC makeGroup()
-
-