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

Class QuantityDB

  • Direct Known Subclasses:
    NetcdfQuantityDB, QuantityDBImpl


    public abstract class QuantityDB
    extends java.lang.Object
    Provides support for a database of quantities.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static QuantityDB emptyDB
      The empty quantity database.
    • Constructor Summary

      Constructors 
      Constructor and Description
      QuantityDB() 
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method and Description
      void add(Quantity quantity)
      Adds a given Quantity to the database.
      abstract void add(java.lang.String name, Quantity quantity)
      Adds a given Quantity to the database under a given name.
      abstract Quantity get(java.lang.String name)
      Returns the quantity in the database whose name matches a given name.
      Quantity get(java.lang.String name, java.lang.String unitSpec)
      Returns the quantity that matches the given name and unit.
      abstract Quantity[] get(Unit unit)
      Returns all quantities in the database whose default unit is convertible with a given unit.
      abstract java.util.Iterator nameIterator()
      Returns an iterator of the names in the database.
      abstract java.util.Iterator quantityIterator()
      Returns an iterator of the quantities in the database.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • emptyDB

        public static final QuantityDB emptyDB
        The empty quantity database. This is useful if, for example, you do not want the netCDF import package to map incoming netCDF variables to canonical ones by, effectively, altering their names and units. This database cannot be altered.
    • Constructor Detail

      • QuantityDB

        public QuantityDB()
    • Method Detail

      • get

        public abstract Quantity get(java.lang.String name)
        Returns the quantity in the database whose name matches a given name.
        Parameters:
        name - The name of the quantity.
        Returns:
        The quantity in the loal database that matches name. Note that RETURN_VALUE.getName().equals(name) can be false due to aliasing.
      • get

        public abstract Quantity[] get(Unit unit)
        Returns all quantities in the database whose default unit is convertible with a given unit.
        Parameters:
        unit - The unit of the quantity.
        Returns:
        The quantities in the database whose unit is convertible with unit.
      • get

        public Quantity get(java.lang.String name,
                            java.lang.String unitSpec)
                     throws ParseException,
                            NoSuchUnitException,
                            UnitException,
                            VisADException
        Returns the quantity that matches the given name and unit. If necessary, it creates the quantity and adds it to the database.
        Parameters:
        name - The name of the quantity.
        unitSpec - The unit of the quantity.
        Returns:
        The quantity in the database that matches name and unit. Note that RETURN_VALUE.getName().equals(name) can be false due to aliasing and RETURN_VALUE. getDefaultUnit().equals(unit) can be false due to allowable unit conversion.
        Throws:
        ParseException - Couldn't decode unitSpec.
        NoSuchUnitException - unitSpec not in unit database.
        UnitException - The quantity already exists with an incompatible unit.
        VisADException - Couldn't create necessary VisAD object.
      • add

        public abstract void add(java.lang.String name,
                                 Quantity quantity)
                          throws VisADException
        Adds a given Quantity to the database under a given name.
        Parameters:
        name - The name under which the quantity is to be added. May be an alias.
        quantity - The quantity to be added.
        Throws:
        VisADException - Couldn't create necessary VisAD object.
      • add

        public void add(Quantity quantity)
                 throws VisADException
        Adds a given Quantity to the database.
        Parameters:
        quantity - The quantity to be added. The quantity will be added under it own name.
        Throws:
        VisADException - Couldn't create necessary VisAD object.
      • quantityIterator

        public abstract java.util.Iterator quantityIterator()
        Returns an iterator of the quantities in the database.
      • nameIterator

        public abstract java.util.Iterator nameIterator()
        Returns an iterator of the names in the database.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.