visad.data.netcdf.in
Class VirtualScalar
- java.lang.Object
-
- visad.data.netcdf.in.VirtualData
-
- visad.data.netcdf.in.VirtualScalar
-
- Direct Known Subclasses:
- VirtualReal, VirtualText
public abstract class VirtualScalar extends VirtualData
Provides support for a virtual VisAD Scalar.
-
-
Constructor Summary
Constructors Constructor and Description VirtualScalar(ScalarType type, ucar.netcdf.Variable var)Constructs from a scalar type and a 1-D netCDF variableVirtualScalar(ScalarType type, ucar.netcdf.Variable var, SimpleSet rangeSet, Unit unit, visad.data.netcdf.in.Vetter vetter)Constructs from a scalar type, a 1-D netCDF variable, a range set, a unit, and a value vetter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description DataImplgetData(Context context)Gets the VisAD data object corresponding to this virtual, data object.DataFactorygetDataFactory()Returns the factory used to create VisAD data objects.double[]getDoubles(Context context)Gets the double values corresponding to this virtual, data object at a given context.SimpleSetgetRangeSet()Gets the range set of this scalar.ScalarTypegetScalarType()Gets the ScalarType of this scalar.MathTypegetType()Gets the MathType of this scalar.UnitgetUnit()Gets the unit of the value.ucar.netcdf.VariablegetVariable()Gets the netCDF variable.visad.data.netcdf.in.VettergetVetter()Gets the value vetter.booleanisReal()Determines if this is a VirtualReal or not.voidsetDataFactory(DataFactory factory)Sets the factory used to create VisAD data objects.-
Methods inherited from class visad.data.netcdf.in.VirtualData
clone, getData, toString
-
-
-
-
Constructor Detail
-
VirtualScalar
public VirtualScalar(ScalarType type, ucar.netcdf.Variable var, SimpleSet rangeSet, Unit unit, visad.data.netcdf.in.Vetter vetter)
Constructs from a scalar type, a 1-D netCDF variable, a range set, a unit, and a value vetter.- Parameters:
type- The type of the nested scalar.var- The 1-D netCDF variable.rangeSet- The range set of the values.unit- The unit of the values.vetter- The value vetter.
-
VirtualScalar
public VirtualScalar(ScalarType type, ucar.netcdf.Variable var)
Constructs from a scalar type and a 1-D netCDF variable- Parameters:
type- The type of the nested scalar.var- The 1-D netCDF variable.
-
-
Method Detail
-
getScalarType
public ScalarType getScalarType()
Gets the ScalarType of this scalar.- Returns:
- The ScalarType of this scalar.
-
getType
public MathType getType()
Gets the MathType of this scalar.- Specified by:
getTypein classVirtualData- Returns:
- The ScalarType of this scalar.
-
isReal
public boolean isReal()
Determines if this is a VirtualReal or not.- Returns:
- true if this is a VirtualReal
-
getRangeSet
public SimpleSet getRangeSet()
Gets the range set of this scalar.- Returns:
- The range set of this scalar.
- Throws:
java.lang.RuntimeException- if class doesn't support this.
-
getUnit
public Unit getUnit()
Gets the unit of the value.- Returns:
- The unit of the value.
- Throws:
java.lang.RuntimeException- if class doesn't support this.
-
getVariable
public ucar.netcdf.Variable getVariable()
Gets the netCDF variable.- Returns:
- The netCDF variable.
-
getVetter
public visad.data.netcdf.in.Vetter getVetter()
Gets the value vetter.- Returns:
- The value vetter.
- Throws:
java.lang.RuntimeException- if class doesn't support this.
-
getData
public DataImpl getData(Context context) throws InvalidContextException, VisADException, java.rmi.RemoteException, java.io.IOException
Gets the VisAD data object corresponding to this virtual, data object.- Specified by:
getDatain classVirtualData- Parameters:
context- The context in which the data is to be gotten.- Returns:
- The VisAD Scalar corresponding to this virtual, data object. throws InvalidContextException Invalid context.
- Throws:
InvalidContextException- if the indicial context is invalid.VisADException- Couldn't create necessary VisAD object.java.rmi.RemoteException- if a Java RMI failure occurs.java.io.IOException- I/O failure.
-
getDoubles
public double[] getDoubles(Context context) throws java.io.IOException, VisADException
Gets the double values corresponding to this virtual, data object at a given context.- Returns:
- The double values of this virtual, data object.
- Throws:
VisADException- Couldn't create necessary VisAD object.java.io.IOException- I/O failure.java.lang.RuntimeException- if class doesn't support this.
-
setDataFactory
public void setDataFactory(DataFactory factory)
Sets the factory used to create VisAD data objects.- Specified by:
setDataFactoryin classVirtualData- Parameters:
factory- The factory for creating VisAD data objects.
-
getDataFactory
public DataFactory getDataFactory()
Returns the factory used to create VisAD data objects.- Specified by:
getDataFactoryin classVirtualData- Returns:
- factory The factory for creating VisAD data objects.
-
-
DMelt 3.0 © DataMelt by jWork.ORG