visad.data.netcdf.in
Class View
- java.lang.Object
-
- visad.data.netcdf.in.View
-
- Direct Known Subclasses:
- DefaultView
public abstract class View extends java.lang.ObjectA convention-dependent view of a netCDF dataset.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description VirtualDatagetData(java.lang.String name)Returns the virtual VisAD data object corresponding to a named netCDF variable.static ViewgetInstance(ucar.netcdf.Netcdf netcdf, QuantityDB db)Returns a view of a netCDF dataset.static ViewgetInstance(ucar.netcdf.Netcdf netcdf, QuantityDB db, boolean charToText)Returns a view of a netCDF dataset.ucar.netcdf.NetcdfgetNetcdf()Returns the underlying netCDF dataset.java.util.SetgetOuterDimensionNameSet()Returns the factorName objectVirtualDataIteratorgetVirtualDataIterator()Returns an iterator over the virtual VisAD data objects of this view.booleanisCharToText()Does this View handle text.voidsetOuterDimensionNameSet(java.util.Set nameSet)Defines the names of domain components to factor out.
-
-
-
Method Detail
-
getInstance
public static View getInstance(ucar.netcdf.Netcdf netcdf, QuantityDB db)
Returns a view of a netCDF dataset. The exact view returned depends on the netCDF dataset.- Parameters:
netcdf- The netCDF dataset.db- A quantity database to be used to map netCDF variables to VisADQuantitys.- Returns:
- A view of the dataset.
-
getInstance
public static View getInstance(ucar.netcdf.Netcdf netcdf, QuantityDB db, boolean charToText)
Returns a view of a netCDF dataset. The exact view returned depends on the netCDF dataset.- Parameters:
netcdf- The netCDF dataset.db- A quantity database to be used to map netCDF variables to VisADQuantitys.charToText- Specifies whether the View should map char variables to VisAD Text objects- Returns:
- A view of the dataset.
-
isCharToText
public boolean isCharToText()
Does this View handle text.- Returns:
- true if text is handled
-
getNetcdf
public ucar.netcdf.Netcdf getNetcdf()
Returns the underlying netCDF dataset.- Returns:
- The netCDF dataset.
-
setOuterDimensionNameSet
public void setOuterDimensionNameSet(java.util.Set nameSet)
Defines the names of domain components to factor out. This only works if this names correspond to the outermost dimension. The list of names may be changed after calling this.
The Set should contain only String(s).
Typically, a TreeSet will be used. For example:
TreeSet ts = new TreeSet();ts.add("myParameter");view.setOuterDimensionNameSet(ts);- Parameters:
nameSet- A Set containing the names (as Strings) of the dimensions to factor out.
-
getOuterDimensionNameSet
public java.util.Set getOuterDimensionNameSet()
Returns the factorName object
- Returns:
- The Set of factorNames.
-
getVirtualDataIterator
public VirtualDataIterator getVirtualDataIterator()
Returns an iterator over the virtual VisAD data objects of this view.- Returns:
- An iterator over the virtual VisAD data objects of the view.
-
getData
public VirtualData getData(java.lang.String name) throws TypeException, VisADException, java.io.IOException
Returns the virtual VisAD data object corresponding to a named netCDF variable.
This implementation uses
getData(Variable).- Parameters:
name- The name of the netCDF variable.- Returns:
- The corresponding virtual VisAD data object.
- Throws:
java.lang.NullPointerException- if the argument isnull.java.lang.IllegalArgumentException- if the netCDF variable doesn't exist.TypeException- if aRealTypeneeded to be created but couldn't.VisADException- if a VisAD object couldn't be created.java.io.IOException- if a netCDF read-error occurs.
-
-
DMelt 3.0 © DataMelt by jWork.ORG