public static Grib1ParamTables factory ( String paramTablePath , String lookupTablePath ) throws IOException { if ( paramTablePath == null && lookupTablePath == null ) return new Grib1ParamTables ( ) ; Lookup lookup = null ; Grib1ParamTableReader override = null ; Grib1ParamTableReader table ; if ( paramTablePath != null ) { table = localTableHash . get ( paramTablePath ) ; if ( table == null ) { table = new Grib1ParamTableReader ( paramTablePath ) ; localTableHash . put ( paramTablePath , table ) ; override = table ; } } if ( lookupTablePath != null ) { lookup = new Lookup ( ) ; if ( ! lookup . readLookupTable ( lookupTablePath ) ) throw new FileNotFoundException ( "cant read lookup table=" + lookupTablePath ) ; } return new Grib1ParamTables ( lookup , override ) ; }
Get a Grib1ParamTables object optionally specifying a parameter table or lookup table specific to this dataset .