Package ucar.nc2.grib.collection
Class Grib1Iosp
- java.lang.Object
-
- ucar.nc2.iosp.AbstractIOServiceProvider
-
- ucar.nc2.grib.collection.GribIosp
-
- ucar.nc2.grib.collection.Grib1Iosp
-
- All Implemented Interfaces:
Comparable<IOServiceProvider>
,IOServiceProvider
public class Grib1Iosp extends GribIosp
Grib-1 Collection IOSP. Handles both collections and single GRIB files.- Since:
- 4/6/11
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface ucar.nc2.iosp.IOServiceProvider
IOServiceProvider.SortGroup
-
-
Field Summary
-
Fields inherited from class ucar.nc2.grib.collection.GribIosp
config, debugIndexOnlyCount, gHcs, gribCollection, gribTable, gtype, isGrib1, isPartitioned, owned
-
Fields inherited from class ucar.nc2.iosp.AbstractIOServiceProvider
location, ncfile, raf, rafOrder
-
-
Constructor Summary
Constructors Constructor Description Grib1Iosp()
Grib1Iosp(GribCollectionImmutable gc)
Grib1Iosp(GribCollectionImmutable.GroupGC gHcs, GribCollectionImmutable.Type gtype)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearLastRecordRead()
protected GribTables
createCustomizer()
String
getFileTypeDescription()
Get a human-readable description for this file type.String
getFileTypeId()
Get a unique id for this file type.Object
getGribCustomizer()
Object
getLastRecordRead()
protected GribTables.Parameter
getParameter(GribCollectionImmutable.VariableIndex vindex)
protected String
getVerticalCoordDesc(int vc_code)
boolean
isValidFile(RandomAccessFile raf)
Check if this is a valid file for this IOServiceProvider.String
makeVariableLongName(GribCollectionImmutable.VariableIndex v)
String
makeVariableName(GribCollectionImmutable.VariableIndex v)
static String
makeVariableName(Grib1Customizer cust, FeatureCollectionConfig.GribConfig gribConfig, Grib1SectionProductDefinition pds)
protected String
makeVariableUnits(GribCollectionImmutable.VariableIndex vindex)
-
Methods inherited from class ucar.nc2.grib.collection.GribIosp
build, close, getDetailInfo, isBuilder, open, readData, sendIospMessage, setLookupTablePath, setParamTable, setParamTablePath
-
Methods inherited from class ucar.nc2.iosp.AbstractIOServiceProvider
buildFinish, getFileTypeVersion, getLastModified, getStructureIterator, reacquire, readSection, readToByteChannel, readToOutputStream, release, setNetcdfFile, streamToByteChannel, syncExtend, toStringDebug
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ucar.nc2.iosp.IOServiceProvider
compareTo, getSortGroup
-
-
-
-
Constructor Detail
-
Grib1Iosp
public Grib1Iosp()
-
Grib1Iosp
public Grib1Iosp(GribCollectionImmutable.GroupGC gHcs, GribCollectionImmutable.Type gtype)
-
Grib1Iosp
public Grib1Iosp(GribCollectionImmutable gc)
-
-
Method Detail
-
makeVariableName
public String makeVariableName(GribCollectionImmutable.VariableIndex v)
- Specified by:
makeVariableName
in classGribIosp
-
makeVariableName
public static String makeVariableName(Grib1Customizer cust, FeatureCollectionConfig.GribConfig gribConfig, Grib1SectionProductDefinition pds)
-
makeVariableLongName
public String makeVariableLongName(GribCollectionImmutable.VariableIndex v)
- Specified by:
makeVariableLongName
in classGribIosp
-
makeVariableUnits
protected String makeVariableUnits(GribCollectionImmutable.VariableIndex vindex)
- Specified by:
makeVariableUnits
in classGribIosp
-
isValidFile
public boolean isValidFile(RandomAccessFile raf) throws IOException
Description copied from interface:IOServiceProvider
Check if this is a valid file for this IOServiceProvider. You must make this method thread safe, ie dont keep any state.- Parameters:
raf
- RandomAccessFile- Returns:
- true if valid.
- Throws:
IOException
- if read error
-
getFileTypeId
public String getFileTypeId()
Description copied from interface:IOServiceProvider
Get a unique id for this file type.- Returns:
- registered id of the file type
- See Also:
- "https://www.unidata.ucar.edu/software/netcdf-java/formats/FileTypes.html"
-
getFileTypeDescription
public String getFileTypeDescription()
Description copied from interface:IOServiceProvider
Get a human-readable description for this file type.- Returns:
- description of the file type
- See Also:
- "https://www.unidata.ucar.edu/software/netcdf-java/formats/FileTypes.html"
-
createCustomizer
protected GribTables createCustomizer() throws IOException
- Specified by:
createCustomizer
in classGribIosp
- Throws:
IOException
-
getVerticalCoordDesc
protected String getVerticalCoordDesc(int vc_code)
- Specified by:
getVerticalCoordDesc
in classGribIosp
-
getParameter
protected GribTables.Parameter getParameter(GribCollectionImmutable.VariableIndex vindex)
- Specified by:
getParameter
in classGribIosp
-
getLastRecordRead
public Object getLastRecordRead()
- Specified by:
getLastRecordRead
in classGribIosp
-
clearLastRecordRead
public void clearLastRecordRead()
- Specified by:
clearLastRecordRead
in classGribIosp
-
getGribCustomizer
public Object getGribCustomizer()
- Specified by:
getGribCustomizer
in classGribIosp
-
-