// called by tdm
 public static boolean update(CollectionManager dcm, Formatter f) throws IOException {
   Grib2CollectionBuilder builder = new Grib2CollectionBuilder(dcm);
   if (!builder.needsUpdate()) return false;
   builder.readOrCreateIndex(CollectionManager.Force.always, f);
   builder.gc.close();
   return true;
 }
 // from a single file, read in the index, create if it doesnt exist
 public static GribCollection readOrCreateIndexFromSingleFile(
     MFile file,
     CollectionManager.Force force,
     FeatureCollectionConfig.GribConfig config,
     Formatter f)
     throws IOException {
   Grib2CollectionBuilder builder = new Grib2CollectionBuilder(file, config, f);
   builder.readOrCreateIndex(force, f);
   return builder.gc;
 }
Ejemplo n.º 3
0
 // from a collection, read in the index, create if it doesnt exist or is out of date
 // assume that the CollectionManager is up to date, eg doesnt need to be scanned
 public static GribCollection factory(
     CollectionManager dcm, CollectionManager.Force force, Formatter f) throws IOException {
   Grib2CollectionBuilder builder = new Grib2CollectionBuilder(dcm);
   builder.readOrCreateIndex(force, f);
   return builder.gc;
 }
Ejemplo n.º 4
0
 // from a single file, read in the index, create if it doesnt exist
 public static GribCollection createFromSingleFile(
     File file, CollectionManager.Force force, Formatter f) throws IOException {
   Grib2CollectionBuilder builder = new Grib2CollectionBuilder(file, f);
   builder.readOrCreateIndex(force, f);
   return builder.gc;
 }