visad.data.netcdf.in
Class NetcdfQuantityDB
- java.lang.Object
-
- visad.data.netcdf.QuantityDB
-
- visad.data.netcdf.in.NetcdfQuantityDB
-
public class NetcdfQuantityDB extends QuantityDB
Provides support for mapping netCDF elements to VisAD quantities by decorating a existing quantity database with methods specifically appropriate to netCDF variables.
-
-
Field Summary
-
Fields inherited from class visad.data.netcdf.QuantityDB
emptyDB
-
-
Constructor Summary
Constructors Constructor and Description NetcdfQuantityDB(QuantityDB db)Constructs from another quantity database.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidadd(java.lang.String name, Quantity quantity)Adds a given Quantity to the database under a given name.Quantityget(java.lang.String name)Returns the quantity in the database whose name matches a given name.Quantity[]get(Unit unit)Returns all quantities in the database whose default unit is convertible with a given unit.QuantitygetBest(java.lang.String longName, java.lang.String name)Return the VisAD quantity corresponding to the best combination of long name and name.java.util.IteratornameIterator()Returns an iterator of the names in the database.java.util.IteratorquantityIterator()Returns an iterator of the quantities in the database.-
Methods inherited from class visad.data.netcdf.QuantityDB
add, get
-
-
-
-
Constructor Detail
-
NetcdfQuantityDB
public NetcdfQuantityDB(QuantityDB db)
Constructs from another quantity database.
-
-
Method Detail
-
add
public void add(java.lang.String name, Quantity quantity) throws VisADExceptionAdds a given Quantity to the database under a given name.- Specified by:
addin classQuantityDB- 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.
-
getBest
public Quantity getBest(java.lang.String longName, java.lang.String name)
Return the VisAD quantity corresponding to the best combination of long name and name.- Parameters:
longName- The long name of the quantity. May benull.name- The name of the quantity.- Returns:
- The corresponding, unique, VisAD quantity or
nullif no such quantity exists.
-
nameIterator
public java.util.Iterator nameIterator()
Returns an iterator of the names in the database.- Specified by:
nameIteratorin classQuantityDB
-
quantityIterator
public java.util.Iterator quantityIterator()
Returns an iterator of the quantities in the database.- Specified by:
quantityIteratorin classQuantityDB
-
get
public Quantity[] get(Unit unit)
Returns all quantities in the database whose default unit is convertible with a given unit.- Specified by:
getin classQuantityDB- 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)
Returns the quantity in the database whose name matches a given name.- Specified by:
getin classQuantityDB- 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 befalse due to aliasing.
-
-
DMelt 3.0 © DataMelt by jWork.ORG