ucar.nc2.iosp.grid
Class GridIndex

java.lang.Object
  extended by ucar.nc2.iosp.grid.GridIndex

public final class GridIndex
extends java.lang.Object

An "in memory" index for 2D grid files.


Constructor Summary
GridIndex()
          Constructor for creating an Index from the Grid file.
 
Method Summary
 void addGlobalAttribute(java.lang.String name, java.lang.String value)
          adds a GlobalAttribute to the index.
 void addGridRecord(GridRecord gr)
          adds a GridRecord to the index.
 void addHorizCoordSys(GridDefRecord gds)
          adds a GridDefRecord to the index.
 java.util.HashMap getGlobalAttributes()
          GlobalAttributes of index.
 int getGridCount()
          Get the grid count
 java.util.List<GridRecord> getGridRecords()
          Grib records of index, one for each parameter.
 java.util.List getHorizCoordSys()
          GridDefs of the index.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GridIndex

public GridIndex()
Constructor for creating an Index from the Grid file. Use the addXXX() methods.

Method Detail

getGlobalAttributes

public final java.util.HashMap getGlobalAttributes()
GlobalAttributes of index.

Returns:
HashMap of type GlobalAttributes.

getGridRecords

public final java.util.List<GridRecord> getGridRecords()
Grib records of index, one for each parameter.

Returns:
list of type GridRecord.

getHorizCoordSys

public final java.util.List getHorizCoordSys()
GridDefs of the index.

Returns:
list of type GridDef.

addGridRecord

public final void addGridRecord(GridRecord gr)
adds a GridRecord to the index.

Parameters:
gr - GridRecord

addHorizCoordSys

public final void addHorizCoordSys(GridDefRecord gds)
adds a GridDefRecord to the index.

Parameters:
gds - GdsRecord

addGlobalAttribute

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

Parameters:
name - GlobalAttribute
value - String

getGridCount

public int getGridCount()
Get the grid count

Returns:
the count