visad.data.netcdf
Class InputNetcdf

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

public class InputNetcdf
extends Object
implements Serializable

A Java bean for importing a netCDF file.

See Also:
Serialized Form

Constructor Summary
InputNetcdf()
          Construct.
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener p)
          Add a property change listener.
 DataImpl getData()
          Returns the VisAD data object property.
 String getPathname()
          Returns the dataset pathname property.
 void removePropertyChangeListener(PropertyChangeListener p)
          Remove a property change listener.
 void setPathname(String name)
          Sets the dataset name property.
 void setQuantityDB(QuantityDB db)
          Set the quantity database property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InputNetcdf

public InputNetcdf()
Construct. The pathname and data object properties will be null; the quantity database property will be StandardQuantityDB.

Method Detail

setQuantityDB

public void setQuantityDB(QuantityDB db)
                   throws BadFormException,
                          IOException,
                          VisADException
Set the quantity database property. The quantity database is used to transform the incoming netCDF variables into their canonical RealTypes. If no transformation is desired, then use QuantityDB.emptyDB. A PropertyChangeEvent for quantityDB will be fired, if appropriate. If the pathname property is non-null, then the netCDF database will be read and a PropertyChangeEvent for the data property will be fired, if appropriate.

Parameters:
db - The new quantity database.
Throws:
NullPointerException - if the argument is null.
BadFormException - if the netCDF dataset doesn't have the right form.
IOException - if an error occurs while reading the netCDF dataset.
VisADException - if a VisAD failure occurs.

setPathname

public void setPathname(String name)
                 throws IOException,
                        VisADException,
                        BadFormException
Sets the dataset name property. If the name is null, then the data property will be set to null; otherwise, the dataset will be read. PropertyChangeEvents for the pathname and data properties will be fired when appropriate.

Parameters:
name - The new name of the dataset or null.
Throws:
IOException
VisADException
BadFormException

getPathname

public String getPathname()
Returns the dataset pathname property. Returns null if the property has no value.


getData

public DataImpl getData()
Returns the VisAD data object property. Returns null if the property has no value.


addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener p)
Add a property change listener.


removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener p)
Remove a property change listener.