Documentation of 'visad.data.netcdf.StandardQuantityDB' Java class
StandardQuantityDB
visad.data.netcdf

Class StandardQuantityDB

  • All Implemented Interfaces:
    java.io.Serializable


    public final class StandardQuantityDB
    extends QuantityDBImpl
    The following class implements a database of standard quantities. It is implemented as a singleton. Instances of the class are modifiable.
    See Also:
    Serialized Form
    • Method Detail

      • add

        public QuantityDB add(java.lang.String[] definitions,
                              java.lang.String[] aliases)
                       throws ParseException,
                              TypeException,
                              VisADException
        Adds the given quantities and aliases to the database.
        Overrides:
        add in class QuantityDBImpl
        Parameters:
        definitions - New quantities and their definitions. definitions[2*i] contains the name (e.g. "speed") of the quantity whose preferred unit specification (e.g. "m/s") is in definitions[2*i+1].
        aliases - Aliases for quantities. aliases[2*i] contains the alias for the quantity named in aliases[2*i+1].
        Returns:
        The database resulting from the addition. Will not be the original object.
        Throws:
        ParseException - A unit specification couldn't be parsed.
        TypeException - An incompatible version of the quantity already exists.
        VisADException - Couldn't create necessary VisAD object.
      • add

        public void add(java.lang.String name,
                        java.lang.String unitSpec)
        Adds a quantity to the database given a name and a display unit specification.
        Parameters:
        name - The name of the quantity (e.g. "length").
        unitSpec - The preferred display unit for the quantity (e.g. "feet").
        Throws:
        UnsupportedOperationException - Always thrown because a standard database must be unmodifiable.
      • main

        public static void main(java.lang.String[] args)
                         throws java.lang.Exception
        Tests this class. If the only argument is "list", then this method will print the list of standard quantities -- one per line -- in the following format: name "(" CannonicalName ")" " in " PreferredUnit e.g. VolumicElectricCharge (ElectricChargeDensity) in C/m3
        Throws:
        java.lang.Exception

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.