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 java.lang.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 java.lang.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() |
java.lang.String |
getDetailInfo()
Show debug / underlying implementation details
|
abstract java.lang.Object |
getGribCustomizer() |
abstract java.lang.Object |
getLastRecordRead() |
protected abstract GribTables.Parameter |
getParameter(GribCollectionImmutable.VariableIndex vindex) |
protected abstract java.lang.String |
getVerticalCoordDesc(int vc_code) |
protected abstract java.lang.String |
makeVariableLongName(GribCollectionImmutable.VariableIndex vindex) |
protected abstract java.lang.String |
makeVariableName(GribCollectionImmutable.VariableIndex vindex) |
protected abstract java.lang.String |
makeVariableNameFromRecord(GribCollectionImmutable.VariableIndex vindex) |
protected abstract java.lang.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.
|
java.lang.Object |
sendIospMessage(java.lang.Object special)
A way to communicate arbitrary information to an iosp.
|
static void |
setDebugFlags(DebugFlags debugFlag) |
void |
setLookupTablePath(java.lang.String lookupTablePath) |
void |
setParamTable(org.jdom2.Element paramTable) |
void |
setParamTablePath(java.lang.String paramTablePath) |
protected abstract void |
show(RandomAccessFile rafData,
long pos) |
long |
streamToByteChannel(Variable v2,
Section section,
java.nio.channels.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 java.lang.String VARIABLE_ID_ATTNAME
public static final java.lang.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(java.lang.String lookupTablePath)
public void setParamTablePath(java.lang.String paramTablePath)
public java.lang.Object sendIospMessage(java.lang.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 java.io.IOException
java.io.IOException
protected abstract java.lang.String makeVariableName(GribCollectionImmutable.VariableIndex vindex)
protected abstract java.lang.String makeVariableLongName(GribCollectionImmutable.VariableIndex vindex)
protected abstract java.lang.String makeVariableNameFromRecord(GribCollectionImmutable.VariableIndex vindex)
protected abstract java.lang.String makeVariableUnits(GribCollectionImmutable.VariableIndex vindex)
protected abstract java.lang.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 java.io.IOException
java.io.IOException
protected abstract float[] readData(RandomAccessFile rafData, ucar.nc2.grib.collection.GribIosp.DataRecord dr) throws java.io.IOException
java.io.IOException
public void open(RandomAccessFile raf, NetcdfFile ncfile, CancelTask cancelTask) throws java.io.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.java.io.IOException
- if read errorpublic void close() throws java.io.IOException
IOServiceProvider
close
in interface IOServiceProvider
close
in class AbstractIOServiceProvider
java.io.IOException
- if read errorpublic java.lang.String getDetailInfo()
IOServiceProvider
getDetailInfo
in interface IOServiceProvider
getDetailInfo
in class AbstractIOServiceProvider
public Array readData(Variable v2, Section section) throws java.io.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.java.io.IOException
- if read errorInvalidRangeException
- if invalid sectionRange
public long streamToByteChannel(Variable v2, Section section, java.nio.channels.WritableByteChannel channel) throws java.io.IOException, InvalidRangeException
streamToByteChannel
in interface IOServiceProvider
streamToByteChannel
in class AbstractIOServiceProvider
java.io.IOException
InvalidRangeException
public abstract java.lang.Object getLastRecordRead()
public abstract void clearLastRecordRead()
public abstract java.lang.Object getGribCustomizer()