net.sourceforge.jgrib.cube
Class GribCube4D

Object
  extended by GribCube4D

public final class GribCube4D
extends Object

Implementation of a 4D hypercube. It represent a single band of a Grib5DCube. The different bands are spotted by using the parameter name.

Author:
Simone Giannecchini
See Also:
GribCube5D

Constructor Summary
GribCube4D()
           
 
Method Summary
 boolean add(GribRecord record)
          This method is responsible for adding the provided record to this cube.
 GregorianCalendar getFirstForecastTime()
           
 GregorianCalendar getLastForecastTime()
           
 double getMaxLevel()
           
 double getMinLevel()
           
 int getNumberOfRecords()
           
 String getParameterSName()
          This method retrieves the short name for the parameter of this cube.
 int getRank()
           
 boolean hasNumericLevel()
           
 boolean increasingUp()
           
 boolean isCompatible(GribRecord record)
          This method tells me if this cube is suitable for the provided record, which means that the parameter is compatible, the grid is compatible, the level is compatible, the base time is compatible.
 boolean isWeakCompatible(GribRecord record)
          This method tells me if this cube is compatible with the provided record, which means that the the grid is compatible, the level is compatible, the base time is compatible but parameter is not compatible.
 Iterator iterator()
          This method returns an iterator for the underlying recordset,
 GribCube4D subset(GregorianCalendar startTimeGMT, GregorianCalendar endTimeGMT, Float minLevel, Float maxLevel)
          This method is responsible for the subsetting of an original 4D cube over a time span and a level range.
 String toString()
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GribCube4D

public GribCube4D()
Method Detail

isCompatible

public boolean isCompatible(GribRecord record)
This method tells me if this cube is suitable for the provided record, which means that the parameter is compatible, the grid is compatible, the level is compatible, the base time is compatible.

Parameters:
record - The record to check for the compatibility.
Returns:
True in case there is strong compatibility, false otherwise.

isWeakCompatible

public boolean isWeakCompatible(GribRecord record)
This method tells me if this cube is compatible with the provided record, which means that the the grid is compatible, the level is compatible, the base time is compatible but parameter is not compatible. This test tell me if the provided record can reside in the same 5D cube of this 4D cube.

Parameters:
record - The record to check for the weak compatibility.
Returns:
True in case there is weak compatibility, false otherwise.

add

public boolean add(GribRecord record)
This method is responsible for adding the provided record to this cube. In case the record is successfully added the return value is true, otherwise it is false.

Parameters:
record -
Returns:

getParameterSName

public String getParameterSName()
This method retrieves the short name for the parameter of this cube.

Returns:
Short name for the parameter of this cube.

increasingUp

public boolean increasingUp()

iterator

public Iterator iterator()
This method returns an iterator for the underlying recordset,

Returns:
An iterator to browse the underlying recordset.

getFirstForecastTime

public GregorianCalendar getFirstForecastTime()

getNumberOfRecords

public int getNumberOfRecords()

getLastForecastTime

public GregorianCalendar getLastForecastTime()

hasNumericLevel

public boolean hasNumericLevel()

getMinLevel

public double getMinLevel()

getMaxLevel

public double getMaxLevel()

subset

public GribCube4D subset(GregorianCalendar startTimeGMT,
                         GregorianCalendar endTimeGMT,
                         Float minLevel,
                         Float maxLevel)
This method is responsible for the subsetting of an original 4D cube over a time span and a level range. The object returned is a new 4D cube which contains only the records satisfying the conditions provided by the users, in case such records exist. In case no record satisfied the provided conditions an empty cube is returned.

Parameters:
startTimeGMT - Lower temporal limit, GMT time.
endTimeGMT - Upper temporal limit, GMT time.
minLevel -
maxLevel -
Returns:

getRank

public int getRank()
Returns:

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2006-2010 GeoSolutions. All Rights Reserved.