visad.data.dods
Class Valuator
- java.lang.Object
-
- visad.data.dods.Valuator
-
- Direct Known Subclasses:
- Float32Valuator, Float64Valuator, IntValuator
public abstract class Valuator extends java.lang.ObjectProvides support for processing numeric values in a DODS dataset. Processing includes checking for non-equality with "missing" or "fill" values, unpacking into more capacious data types, and checking that the values lie within a valid range.Instances are immutable.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description abstract SimpleSetgetRepresentationalSet(RealType realType)Returns the set used to represent unpacked, numeric values associated with this instance in the range of a VisADFlatField.doubleprocess(double value)Processes values.double[]process(double[] values)Processes values.floatprocess(float value)Processes a value.float[]process(float[] values)Processes a value.static Valuatorvaluator(dods.dap.AttributeTable table, int type)Returns an instance of this class corresponding to the attributes for a DODS variable.static ValueRangervalueRanger(dods.dap.AttributeTable table)Returns an instance of a value ranger corresponding to the attributes of a DODS variable.static ValueUnpackervalueUnpacker(dods.dap.AttributeTable table)Returns an instance of a value unpacker corresponding to the attributes of a DODS variable.static ValueVettervalueVetter(dods.dap.AttributeTable table)Returns an instance of a value vetter corresponding to the attributes of a DODS variable.
-
-
-
Method Detail
-
valuator
public static Valuator valuator(dods.dap.AttributeTable table, int type) throws BadFormException, VisADException, java.rmi.RemoteException
Returns an instance of this class corresponding to the attributes for a DODS variable.- Parameters:
table- The attribute table for a DODS variable.type- The type of packed variable:Attribute.BYTE,Attribute.INT16, etc.- Throws:
BadFormException- The attribute table is corrupt.VisADException- VisAD failure.java.rmi.RemoteException- Java RMI failure.
-
getRepresentationalSet
public abstract SimpleSet getRepresentationalSet(RealType realType) throws VisADException
Returns the set used to represent unpacked, numeric values associated with this instance in the range of a VisADFlatField.- Returns:
- realType The VisAD real-type for the set.
- Throws:
VisADException- VisAD failure.
-
process
public float process(float value)
Processes a value.- Parameters:
value- The value to be processed.
-
process
public float[] process(float[] values)
Processes a value.- Parameters:
values- The values to be processed.
-
process
public double process(double value)
Processes values.- Parameters:
value- The value to be processed.
-
process
public double[] process(double[] values)
Processes values.- Parameters:
values- The values to be processed.
-
valueVetter
public static ValueVetter valueVetter(dods.dap.AttributeTable table) throws BadFormException, VisADException, java.rmi.RemoteException
Returns an instance of a value vetter corresponding to the attributes of a DODS variable.- Parameters:
table- The DODS attribute table. May benull, in which case a trivial vetter is returned.- Returns:
- A value vetter.
- Throws:
BadFormException- The attribute table is corrupt.VisADException- VisAD failure.java.rmi.RemoteException- Java RMI failure.
-
valueUnpacker
public static ValueUnpacker valueUnpacker(dods.dap.AttributeTable table) throws BadFormException, VisADException, java.rmi.RemoteException
Returns an instance of a value unpacker corresponding to the attributes of a DODS variable.- Parameters:
table- A DODS attribute table. May benull, in which case a trivial unpacker is returned.- Returns:
- A value unpacker.
- Throws:
BadFormException- The attribute table is corrupt.VisADException- VisAD failure.java.rmi.RemoteException- Java RMI exception.
-
valueRanger
public static ValueRanger valueRanger(dods.dap.AttributeTable table) throws BadFormException, VisADException, java.rmi.RemoteException
Returns an instance of a value ranger corresponding to the attributes of a DODS variable.- Parameters:
table- A DODS attribute table. May benull, in which case a trivial ranger is returned.- Returns:
- A value ranger.
- Throws:
BadFormException- The attribute table is corrupt.VisADException- VisAD failure.java.rmi.RemoteException- Java RMI exception.
-
-
DMelt 3.0 © DataMelt by jWork.ORG