visad.data.dods
Class ArrayVariableAdapter
- java.lang.Object
-
- visad.data.dods.Adapter
-
- visad.data.dods.VariableAdapter
-
- visad.data.dods.ArrayVariableAdapter
-
public class ArrayVariableAdapter extends VariableAdapter
Provides support for adapting DODSDArrayvariables to the VisAD data-import context.Instances are immutable.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static ArrayVariableAdapterarrayVariableAdapter(dods.dap.DArray array, dods.dap.DAS das, VariableAdapterFactory factory)Returns an instance corresponding to a DODSDArray.DataImpldata(dods.dap.DArray array, boolean copy)Returns the VisADDataImplcorresponding to a DODSDArray.FunctionTypegetFunctionType()Returns the VisADFunctionTypeof this instance.MathTypegetMathType()Returns the VisADMathTypeof this instance.SimpleSet[]getRepresentationalSets(boolean copy)voidsetField(dods.dap.DArray array, FieldImpl field, boolean copy)Sets a compatible VisADField.
-
-
-
Method Detail
-
arrayVariableAdapter
public static ArrayVariableAdapter arrayVariableAdapter(dods.dap.DArray array, dods.dap.DAS das, VariableAdapterFactory factory) throws VisADException, java.rmi.RemoteException
Returns an instance corresponding to a DODSDArray.- Parameters:
array- The DODS DArray. Only the DODS metadata is used: the array needn't have any actual data.das- The DODS DAS in which the attribute table for the DODS variable is embedded.factory- A factory for creating variable adapters.- Returns:
- An instance of this class corresponding to the input arguments.
- Throws:
VisADException- VisAD failure.java.rmi.RemoteException- Java RMI failure.
-
getMathType
public MathType getMathType()
Returns the VisADMathTypeof this instance.- Specified by:
getMathTypein classVariableAdapter- Returns:
- The MathType of this instance.
-
getFunctionType
public FunctionType getFunctionType()
Returns the VisADFunctionTypeof this instance.- Returns:
- The FunctionType of this instance.
-
getRepresentationalSets
public SimpleSet[] getRepresentationalSets(boolean copy)
Returns the VisADSets that will be used to represent the data values in the range of a VisADFlatField.- Overrides:
getRepresentationalSetsin classVariableAdapter- Parameters:
copy- If true, then the array is copied.- Returns:
- The VisAD Sets used to represent the data values in the range of a FlatField.
-
data
public DataImpl data(dods.dap.DArray array, boolean copy) throws VisADException, java.rmi.RemoteException
Returns the VisADDataImplcorresponding to a DODSDArray.- Overrides:
datain classVariableAdapter- Parameters:
array- The DODSDArrayto have the corresponding VisAD data object returned. The array must be compatible with the array used to construct this instance.copy- If true, then data values are copied.- Returns:
- The VisAD data object of this instance. The
object will be a
FieldImpland may be aFlatFieldorFileFlatField. - Throws:
VisADException- VisAD failure. Possible the array wasn't compatible with the array used to construct this instance.java.rmi.RemoteException- Java RMI failure.
-
setField
public void setField(dods.dap.DArray array, FieldImpl field, boolean copy) throws VisADException, java.rmi.RemoteExceptionSets a compatible VisADField. This method is used byGridVariableAdapterfor the DArray portion of a DODS DGrid.- Parameters:
array- The DODSDArrayto be used to set a compatible VisAD Field. The array must be compatible with the array used to construct this instance.copy- If true, then the data values are copied.field- The VisAD Field to be set. The field must be compatible with the array.- Throws:
VisADExceptionjava.rmi.RemoteException
-
-
DMelt 3.0 © DataMelt by jWork.ORG