visad.data.netcdf
Class QuantityDBManager

java.lang.Object
  extended by visad.data.netcdf.QuantityDBManager
All Implemented Interfaces:
Serializable

public final class QuantityDBManager
extends Object
implements Serializable

Provides support for managing a database of quantities. This class insulates the user from knowing or caring, for example, whether or not the quantity database is unchanging or whether it's implemented using singletons.

Author:
Steven R. Emmerson
See Also:
Serialized Form

Method Summary
protected static QuantityDB defaultInstance()
          Returns the default quantity database.
static QuantityDB instance()
          Returns the current instance of the quantity database.
static void main(String[] args)
          Tests this class by listing the contents -- one per line -- in the following format: ( ) in e.g.
static void setInstance(QuantityDB db)
          Sets the current instance of the quantity database.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

defaultInstance

protected static QuantityDB defaultInstance()
                                     throws VisADException
Returns the default quantity database.

Returns:
The default quantity database.
Throws:
VisADException - Couldn't create necessary VisAD object.

instance

public static QuantityDB instance()
Returns the current instance of the quantity database.

Returns:
The current instance of the quantity database.

setInstance

public static void setInstance(QuantityDB db)
                        throws VisADException
Sets the current instance of the quantity database.

Parameters:
db - The new current instance of the quantity database. May be null, in which case the default instance is used.
Throws:
VisADException - Couldn't create necessary VisAD object.

main

public static void main(String[] args)
                 throws Exception
Tests this class by listing the contents -- one per line -- in the following format: ( ) in e.g. VolumicElectricCharge (ElectricChargeDensity) in C/m3

Throws:
Exception