|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object visad.data.netcdf.QuantityDB visad.data.netcdf.in.NetcdfQuantityDB
public class NetcdfQuantityDB
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 | |
---|---|
NetcdfQuantityDB(QuantityDB db)
Constructs from another quantity database. |
Method Summary | |
---|---|
void |
add(String name,
Quantity quantity)
Adds a given Quantity to the database under a given name. |
Quantity |
get(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. |
Quantity |
getBest(String longName,
String name)
Return the VisAD quantity corresponding to the best combination of long name and name. |
Iterator |
nameIterator()
Returns an iterator of the names in the database. |
Iterator |
quantityIterator()
Returns an iterator of the quantities in the database. |
Methods inherited from class visad.data.netcdf.QuantityDB |
---|
add, get |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NetcdfQuantityDB(QuantityDB db)
Method Detail |
---|
public void add(String name, Quantity quantity) throws VisADException
add
in class QuantityDB
name
- The name under which the quantity is to be
added. May be an alias.quantity
- The quantity to be added.
VisADException
- Couldn't create necessary VisAD object.public Quantity getBest(String longName, String name)
longName
- The long name of the quantity. May be
null
.name
- The name of the quantity.
null
if no such quantity exists.public Iterator nameIterator()
nameIterator
in class QuantityDB
public Iterator quantityIterator()
quantityIterator
in class QuantityDB
public Quantity[] get(Unit unit)
get
in class QuantityDB
unit
- The unit of the quantity.
unit
.public Quantity get(String name)
get
in class QuantityDB
name
- The name of the quantity.
name
. Note that
RETURN_VALUE.getName().equals(name)
can
be false due to aliasing.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |