ucar.grib
Class Index

java.lang.Object
  extended by ucar.grib.Index

Deprecated.

public final class Index
extends java.lang.Object

An "in memory" index for Grib (ver 1 or 2) files. May be constructed by scanning the file with GribInput, or by reading a "Grib File Index" that was created by GribIndexer.

This has all the info in it needed to construct a netcdf object. see IndexFormat.txt .

Author:
caron

Nested Class Summary
static class Index.GdsRecord
          Deprecated. class to represent GDS in the index.
 class Index.GribRecord
          Deprecated. class to represent each record (parameter) in the index.
 
Field Summary
static java.lang.String current_index_version
          Deprecated. used to check versions of already created indexes.
 
Constructor Summary
Index()
          Deprecated. Constructor for creating an Index from the Grib file.
 
Method Summary
 void addGlobalAttribute(java.lang.String name, java.lang.String value)
          Deprecated. adds a GlobalAttribute to the index.
 void addGribRecord(Index.GribRecord gr)
          Deprecated. adds a GribRecord to the index.
 void addHorizCoordSys(Index.GdsRecord gds)
          Deprecated. adds a GdsRecord to the index.
 java.lang.String getGlobalAttribute(java.lang.String key)
          Deprecated.  
 java.util.Map<java.lang.String,java.lang.String> getGlobalAttributes()
          Deprecated. GlobalAttributes of index.
 Index.GribRecord getGribRecord()
          Deprecated. _more_
 java.util.List<Index.GribRecord> getGribRecords()
          Deprecated. Grib records of index, one for each parameter.
 java.util.List<Index.GdsRecord> getHorizCoordSys()
          Deprecated. GDSs of the index.
static void main(java.lang.String[] args)
          Deprecated. main.
 boolean open(java.lang.String location)
          Deprecated. open Grib Index file for scanning.
 boolean open(java.lang.String location, java.io.InputStream ios)
          Deprecated. open Grib Index file for scanning.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

current_index_version

public static final java.lang.String current_index_version
Deprecated. 
used to check versions of already created indexes.

See Also:
Constant Field Values
Constructor Detail

Index

public Index()
Deprecated. 
Constructor for creating an Index from the Grib file. Use the addXXX() methods.

Method Detail

open

public final boolean open(java.lang.String location)
                   throws java.io.IOException
Deprecated. 
open Grib Index file for scanning.

Parameters:
location - URL or local filename of Grib Index file
Returns:
false if does not match current version; you should regenerate it in that case.
Throws:
java.io.IOException

open

public final boolean open(java.lang.String location,
                          java.io.InputStream ios)
                   throws java.io.IOException
Deprecated. 
open Grib Index file for scanning.

Parameters:
location - URL or local filename of Grib Index file
ios - input stream
Returns:
false if does not match current version; you should regenerate it in that case.
Throws:
java.io.IOException

getGlobalAttributes

public final java.util.Map<java.lang.String,java.lang.String> getGlobalAttributes()
Deprecated. 
GlobalAttributes of index.

Returns:
HashMap of type GlobalAttributes.

getGlobalAttribute

public final java.lang.String getGlobalAttribute(java.lang.String key)
Deprecated. 

getGribRecords

public final java.util.List<Index.GribRecord> getGribRecords()
Deprecated. 
Grib records of index, one for each parameter.

Returns:
list of type GribRecord.

getHorizCoordSys

public final java.util.List<Index.GdsRecord> getHorizCoordSys()
Deprecated. 
GDSs of the index.

Returns:
list of type GdsRecord.

addGribRecord

public final void addGribRecord(Index.GribRecord gr)
Deprecated. 
adds a GribRecord to the index.

Parameters:
gr - GribRecord

addHorizCoordSys

public final void addHorizCoordSys(Index.GdsRecord gds)
Deprecated. 
adds a GdsRecord to the index.

Parameters:
gds - GdsRecord

addGlobalAttribute

public final void addGlobalAttribute(java.lang.String name,
                                     java.lang.String value)
Deprecated. 
adds a GlobalAttribute to the index.

Parameters:
name - GlobalAttribute
value - String

getGribRecord

public Index.GribRecord getGribRecord()
Deprecated. 
_more_

Returns:
_more_

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException
Deprecated. 
main.

Parameters:
args - empty
Throws:
java.io.IOException