public abstract class GribIndex
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static boolean |
debug |
static java.lang.String |
GBX9_IDX |
Constructor and Description |
---|
GribIndex() |
Modifier and Type | Method and Description |
---|---|
static CollectionManager.ChangeChecker |
getChangeChecker() |
abstract int |
getNRecords()
The number of records in the index.
|
abstract boolean |
makeIndex(java.lang.String location,
RandomAccessFile dataRaf)
Make the gbx9 index file.
|
static GribIndex |
open(boolean isGrib1,
MFile mfile) |
abstract boolean |
readIndex(java.lang.String location,
long dataModified,
CollectionUpdateType force)
Read the gbx9 index file.
|
static GribIndex |
readOrCreateIndexFromSingleFile(boolean isGrib1,
MFile mfile,
CollectionUpdateType force,
org.slf4j.Logger logger)
Create a gbx9 index from a single grib1 or grib2 file.
|
public static final java.lang.String GBX9_IDX
public static final boolean debug
public static CollectionManager.ChangeChecker getChangeChecker()
public static GribIndex open(boolean isGrib1, MFile mfile) throws java.io.IOException
java.io.IOException
public static GribIndex readOrCreateIndexFromSingleFile(boolean isGrib1, MFile mfile, CollectionUpdateType force, org.slf4j.Logger logger) throws java.io.IOException
isGrib1
- true if grib1mfile
- the grib fileforce
- force writing indexjava.io.IOException
- on io errorpublic abstract boolean readIndex(java.lang.String location, long dataModified, CollectionUpdateType force) throws java.io.IOException
location
- location of the data filedataModified
- last modified date of the data fileforce
- rewrite? always, test, nocheck, neverjava.io.IOException
- on io errorpublic abstract boolean makeIndex(java.lang.String location, RandomAccessFile dataRaf) throws java.io.IOException
location
- location of the data filedataRaf
- already opened data raf (leave open); if null, makeIndex opens and closes)java.io.IOException
- on io errorpublic abstract int getNRecords()