## 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 DODS `DArray` variables to the VisAD data-import context.

Instances are immutable.

Method Summary
`static ArrayVariableAdapter` `arrayVariableAdapter(DArray array, DAS das, VariableAdapterFactory factory)` Returns an instance corresponding to a DODS `DArray`.
`DataImpl` `data(DArray array, boolean copy)` Returns the VisAD `DataImpl` corresponding to a DODS `DArray`.
`FunctionType` `getFunctionType()` Returns the VisAD `FunctionType` of this instance.
`MathType` `getMathType()` Returns the VisAD `MathType` of this instance.
`SimpleSet[]` `getRepresentationalSets(boolean copy)` Returns the VisAD `Set`s that will be used to represent the data values in the range of a VisAD `FlatField`.
`void` `setField(DArray array, FieldImpl field, boolean copy)` Sets a compatible VisAD `Field`.

Methods inherited from class visad.data.dods.VariableAdapter
`data, data, data, data, data, data, data, data, data, data, data, data, data, data, mathType`

Methods inherited from class visad.data.dods.Adapter
`attributeTable, attributeTable, getCacheStrategy, isFlat, mathType, realType, realType, realType, realType, scalarName`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### arrayVariableAdapter

    public static ArrayVariableAdapter arrayVariableAdapter(DArray array,
                                                            DAS das,
                                                            VariableAdapterFactory factory)
                                                     throws VisADException,
                                                            RemoteException

  Returns an instance corresponding to a DODS `DArray`.

  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.
    `RemoteException` - Java RMI failure.

### getMathType

    public MathType getMathType()

  Returns the VisAD `MathType` of this instance.

  Specified by:
    `getMathType` in class `VariableAdapter`
  Returns:
    The MathType of this instance.

### getFunctionType

    public FunctionType getFunctionType()

  Returns the VisAD `FunctionType` of this instance.

  Returns:
    The FunctionType of this instance.

### getRepresentationalSets

    public SimpleSet[] getRepresentationalSets(boolean copy)

  Returns the VisAD `Set`s that will be used to represent the data values in the range of a VisAD `FlatField`.

  Overrides:
    `getRepresentationalSets` in class `VariableAdapter`
  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(DArray array,
                         boolean copy)
                  throws VisADException,
                         RemoteException

  Returns the VisAD `DataImpl` corresponding to a DODS `DArray`.

  Overrides:
    `data` in class `VariableAdapter`
  Parameters:
    `array` - The DODS `DArray` to 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 `FieldImpl` and may be a `FlatField` or `FileFlatField`.
  Throws:
    `VisADException` - VisAD failure. Possible the array wasn't compatible with the array used to construct this instance.
    `RemoteException` - Java RMI failure.

### setField

    public void setField(DArray array,
                         FieldImpl field,
                         boolean copy)
                  throws VisADException,
                         RemoteException

  Sets a compatible VisAD `Field`. This method is used by `GridVariableAdapter` for the DArray portion of a DODS DGrid.

  Parameters:
    `array` - The DODS `DArray` to 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:
    `VisADException`
    `RemoteException`