public abstract class GribIosp extends AbstractIOServiceProvider
Modifier and Type | Class and Description |
---|---|
protected class |
GribIosp.DataReader |
Modifier and Type | Field and Description |
---|---|
protected FeatureCollectionConfig |
config |
static boolean |
debugGbxIndexOnly |
static int |
debugIndexOnlyCount |
static boolean |
debugRead |
protected GribCollectionImmutable.GroupGC |
gHcs |
static String |
GRIB_VALID_TIME |
protected GribCollectionImmutable |
gribCollection |
protected GribTables |
gribTable |
protected GribCollectionImmutable.Type |
gtype |
protected boolean |
isGrib1 |
protected boolean |
isPartitioned |
protected org.slf4j.Logger |
logger |
protected boolean |
owned |
static String |
VARIABLE_ID_ATTNAME |
location, ncfile, raf, rafOrder
Constructor and Description |
---|
GribIosp(boolean isGrib1,
org.slf4j.Logger logger) |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
addVariableAttributes(Variable v,
GribCollectionImmutable.VariableIndex vindex) |
abstract void |
clearLastRecordRead() |
void |
close()
Close the file.
|
protected abstract GribTables |
createCustomizer() |
String |
getDetailInfo()
Show debug / underlying implementation details
|
abstract Object |
getGribCustomizer() |
abstract Object |
getLastRecordRead() |
protected abstract GribTables.Parameter |
getParameter(GribCollectionImmutable.VariableIndex vindex) |
protected abstract String |
getVerticalCoordDesc(int vc_code) |
protected abstract String |
makeVariableLongName(GribCollectionImmutable.VariableIndex vindex) |
protected abstract String |
makeVariableName(GribCollectionImmutable.VariableIndex vindex) |
protected abstract String |
makeVariableNameFromRecord(GribCollectionImmutable.VariableIndex vindex) |
protected abstract String |
makeVariableUnits(GribCollectionImmutable.VariableIndex vindex) |
void |
open(RandomAccessFile raf,
NetcdfFile ncfile,
CancelTask cancelTask)
Open existing file, and populate ncfile with it.
|
protected abstract float[] |
readData(RandomAccessFile rafData,
ucar.nc2.grib.collection.GribIosp.DataRecord dr) |
Array |
readData(Variable v2,
Section section)
Read data from a top level Variable and return a memory resident Array.
|
Object |
sendIospMessage(Object special)
A way to communicate arbitrary information to an iosp.
|
static void |
setDebugFlags(DebugFlags debugFlag) |
void |
setLookupTablePath(String lookupTablePath) |
void |
setParamTable(org.jdom2.Element paramTable) |
void |
setParamTablePath(String paramTablePath) |
protected abstract void |
show(RandomAccessFile rafData,
long pos) |
long |
streamToByteChannel(Variable v2,
Section section,
WritableByteChannel channel) |
getFileTypeVersion, getLastModified, getStructureIterator, reacquire, readSection, readToByteChannel, readToOutputStream, release, syncExtend, toStringDebug
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFileTypeDescription, getFileTypeId, isValidFile
public static final String VARIABLE_ID_ATTNAME
public static final String GRIB_VALID_TIME
public static boolean debugRead
public static int debugIndexOnlyCount
public static boolean debugGbxIndexOnly
protected FeatureCollectionConfig config
protected final boolean isGrib1
protected final org.slf4j.Logger logger
protected GribCollectionImmutable gribCollection
protected GribCollectionImmutable.GroupGC gHcs
protected GribCollectionImmutable.Type gtype
protected boolean isPartitioned
protected boolean owned
protected GribTables gribTable
public static void setDebugFlags(DebugFlags debugFlag)
public void setParamTable(org.jdom2.Element paramTable)
public void setLookupTablePath(String lookupTablePath)
public void setParamTablePath(String paramTablePath)
public Object sendIospMessage(Object special)
IOServiceProvider
sendIospMessage
in interface IOServiceProvider
sendIospMessage
in class AbstractIOServiceProvider
special
- opaque message sent to the IOSP object when its opened (not when isValidFile() is called)protected abstract GribTables createCustomizer() throws IOException
IOException
protected abstract String makeVariableName(GribCollectionImmutable.VariableIndex vindex)
protected abstract String makeVariableLongName(GribCollectionImmutable.VariableIndex vindex)
protected abstract String makeVariableNameFromRecord(GribCollectionImmutable.VariableIndex vindex)
protected abstract String makeVariableUnits(GribCollectionImmutable.VariableIndex vindex)
protected abstract String getVerticalCoordDesc(int vc_code)
protected abstract GribTables.Parameter getParameter(GribCollectionImmutable.VariableIndex vindex)
protected abstract void addVariableAttributes(Variable v, GribCollectionImmutable.VariableIndex vindex)
protected abstract void show(RandomAccessFile rafData, long pos) throws IOException
IOException
protected abstract float[] readData(RandomAccessFile rafData, ucar.nc2.grib.collection.GribIosp.DataRecord dr) throws IOException
IOException
public void open(RandomAccessFile raf, NetcdfFile ncfile, CancelTask cancelTask) throws IOException
IOServiceProvider
open
in interface IOServiceProvider
open
in class AbstractIOServiceProvider
raf
- the file to work on, it has already passed the isValidFile() test.ncfile
- add objects to this empty NetcdfFilecancelTask
- used to monitor user cancellation; may be null.IOException
- if read errorpublic void close() throws IOException
IOServiceProvider
close
in interface IOServiceProvider
close
in class AbstractIOServiceProvider
IOException
- if read errorpublic String getDetailInfo()
IOServiceProvider
getDetailInfo
in interface IOServiceProvider
getDetailInfo
in class AbstractIOServiceProvider
public Array readData(Variable v2, Section section) throws IOException, InvalidRangeException
IOServiceProvider
v2
- a top-level Variablesection
- the section of data to read.
There must be a Range for each Dimension in the variable, in order.
Note: no nulls allowed. IOSP may not modify.IOException
- if read errorInvalidRangeException
- if invalid sectionRange
public long streamToByteChannel(Variable v2, Section section, WritableByteChannel channel) throws IOException, InvalidRangeException
streamToByteChannel
in interface IOServiceProvider
streamToByteChannel
in class AbstractIOServiceProvider
IOException
InvalidRangeException
public abstract Object getLastRecordRead()
public abstract void clearLastRecordRead()
public abstract Object getGribCustomizer()
Copyright © 1999–2019 UCAR/Unidata. All rights reserved.