public class GribCdmIndex extends Object implements IndexReader
| Modifier and Type | Class and Description |
|---|---|
static class |
GribCdmIndex.GribCollectionType |
IndexReader.AddChildCallback| Constructor and Description |
|---|
GribCdmIndex(org.slf4j.Logger logger) |
| Modifier and Type | Method and Description |
|---|---|
static GribCdmIndex.GribCollectionType |
getType(RandomAccessFile raf)
Find out what kind of index this is
|
boolean |
isPartition(Path indexFile) |
static void |
main(String[] args) |
static GribCollection |
makeGribCollectionFromRaf(RandomAccessFile raf,
FeatureCollectionConfig config,
CollectionUpdateType updateType,
org.slf4j.Logger logger) |
static boolean |
makeIndex(FeatureCollectionConfig config,
Formatter errlog,
Path topPath) |
static boolean |
moveCdmIndex(String indexFilename,
org.slf4j.Logger logger) |
static GribCollection |
openCdmIndex(String indexFilename,
FeatureCollectionConfig config,
boolean dataOnly,
org.slf4j.Logger logger) |
static GribCollection |
openGribCollection(FeatureCollectionConfig config,
CollectionUpdateType updateType,
org.slf4j.Logger logger)
Open GribCollection from config.
|
static GribCollection |
openGribCollectionFromDataFile(boolean isGrib1,
MFile mfile,
CollectionUpdateType updateType,
FeatureCollectionConfig config,
Formatter errlog,
org.slf4j.Logger logger) |
static GribCollection |
openGribCollectionFromIndexFile(RandomAccessFile indexRaf,
FeatureCollectionConfig config,
boolean dataOnly,
org.slf4j.Logger logger)
Create a grib collection / partition collection from an existing ncx2 file.
|
static GribCollection |
openGribCollectionFromMCollection(boolean isGrib1,
MCollection dcm,
CollectionUpdateType updateType,
Formatter errlog,
org.slf4j.Logger logger)
Create a GribCollection from an MCollection.
|
boolean |
readChildren(Path indexFile,
IndexReader.AddChildCallback callback) |
boolean |
readMFiles(Path indexFile,
List<MFile> result) |
static boolean |
updateGribCollection(FeatureCollectionConfig config,
CollectionUpdateType updateType,
org.slf4j.Logger logger)
update the collection if needed
|
static boolean |
updateGribCollectionFromMCollection(boolean isGrib1,
MCollection dcm,
CollectionUpdateType updateType,
Formatter errlog,
org.slf4j.Logger logger) |
public static GribCdmIndex.GribCollectionType getType(RandomAccessFile raf) throws IOException
raf - open RAFIOException - on read errorpublic static GribCollection openCdmIndex(String indexFilename, FeatureCollectionConfig config, boolean dataOnly, org.slf4j.Logger logger)
public static GribCollection openGribCollectionFromMCollection(boolean isGrib1, MCollection dcm, CollectionUpdateType updateType, Formatter errlog, org.slf4j.Logger logger) throws IOException
isGrib1 - true if files are grib1, else grib2dcm - the MCollection : files or other collectionsupdateType - should index file be used or remade?IOException - on io errorpublic static boolean updateGribCollectionFromMCollection(boolean isGrib1,
MCollection dcm,
CollectionUpdateType updateType,
Formatter errlog,
org.slf4j.Logger logger)
throws IOException
IOExceptionpublic static boolean updateGribCollection(FeatureCollectionConfig config, CollectionUpdateType updateType, org.slf4j.Logger logger) throws IOException
IOExceptionpublic static GribCollection openGribCollection(FeatureCollectionConfig config, CollectionUpdateType updateType, org.slf4j.Logger logger) throws IOException
IOExceptionpublic static boolean makeIndex(FeatureCollectionConfig config, Formatter errlog, Path topPath) throws IOException
IOExceptionpublic static boolean moveCdmIndex(String indexFilename, org.slf4j.Logger logger) throws IOException
IOExceptionpublic static GribCollection makeGribCollectionFromRaf(RandomAccessFile raf, FeatureCollectionConfig config, CollectionUpdateType updateType, org.slf4j.Logger logger) throws IOException
IOExceptionpublic static GribCollection openGribCollectionFromDataFile(boolean isGrib1, MFile mfile, CollectionUpdateType updateType, FeatureCollectionConfig config, Formatter errlog, org.slf4j.Logger logger) throws IOException
IOExceptionpublic static GribCollection openGribCollectionFromIndexFile(RandomAccessFile indexRaf, FeatureCollectionConfig config, boolean dataOnly, org.slf4j.Logger logger) throws IOException
indexRaf - the ncx2 file already openconfig - special configurationIOException - on io errorpublic boolean readChildren(Path indexFile, IndexReader.AddChildCallback callback) throws IOException
readChildren in interface IndexReaderIOExceptionpublic boolean isPartition(Path indexFile) throws IOException
isPartition in interface IndexReaderIOExceptionpublic boolean readMFiles(Path indexFile, List<MFile> result) throws IOException
readMFiles in interface IndexReaderIOExceptionpublic static void main(String[] args) throws IOException
IOExceptionCopyright © 1999–2014 UCAR/Unidata. All rights reserved.