public abstract class GribIosp extends AbstractIOServiceProvider
IOServiceProvider.SortGroup
Modifier and Type | Field and Description |
---|---|
protected FeatureCollectionConfig |
config |
static int |
debugIndexOnlyCount |
protected GribCollectionImmutable.GroupGC |
gHcs |
protected GribCollectionImmutable |
gribCollection |
protected GribTables |
gribTable |
protected GribCollectionImmutable.Type |
gtype |
protected boolean |
isGrib1 |
protected boolean |
isPartitioned |
protected org.slf4j.Logger |
logger |
protected boolean |
owned |
location, ncfile, raf, rafOrder
Constructor and Description |
---|
GribIosp(boolean isGrib1,
org.slf4j.Logger logger) |
Modifier and Type | Method and Description |
---|---|
void |
build(RandomAccessFile raf,
Group.Builder rootGroup,
CancelTask cancelTask)
Open existing file, and populate it.
|
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) |
boolean |
isBuilder()
If this iosp implements build().
|
protected abstract java.lang.String |
makeVariableLongName(GribCollectionImmutable.VariableIndex vindex) |
protected abstract java.lang.String |
makeVariableName(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.
|
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 and from an iosp.
|
void |
setLookupTablePath(java.lang.String lookupTablePath) |
void |
setParamTable(org.jdom2.Element paramTable) |
void |
setParamTablePath(java.lang.String paramTablePath) |
buildFinish, getFileTypeVersion, getLastModified, getStructureIterator, reacquire, readSection, readToByteChannel, readToOutputStream, release, setNetcdfFile, streamToByteChannel, syncExtend, toStringDebug
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
compareTo, getFileTypeDescription, getFileTypeId, getSortGroup, isValidFile
public static int debugIndexOnlyCount
protected final 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 void setParamTable(org.jdom2.Element paramTable)
public void setLookupTablePath(java.lang.String lookupTablePath)
public void setParamTablePath(java.lang.String paramTablePath)
@Nullable 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 makeVariableUnits(GribCollectionImmutable.VariableIndex vindex)
protected abstract java.lang.String getVerticalCoordDesc(int vc_code)
protected abstract GribTables.Parameter getParameter(GribCollectionImmutable.VariableIndex vindex)
public boolean isBuilder()
IOServiceProvider
isBuilder
in interface IOServiceProvider
isBuilder
in class AbstractIOServiceProvider
public void build(RandomAccessFile raf, Group.Builder rootGroup, CancelTask cancelTask) throws java.io.IOException
IOServiceProvider
build
in interface IOServiceProvider
build
in class AbstractIOServiceProvider
raf
- the file to work on, it has already passed the isValidFile() test.rootGroup
- add objects to the root group.cancelTask
- used to monitor user cancellation; may be null.java.io.IOException
- if read errorpublic 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 abstract java.lang.Object getLastRecordRead()
public abstract void clearLastRecordRead()
public abstract java.lang.Object getGribCustomizer()