visad.data.dods
Class BaseTypeVectorAdapter

java.lang.Object
  extended by visad.data.dods.Adapter
      extended by visad.data.dods.VectorAdapter
          extended by visad.data.dods.BaseTypeVectorAdapter

public class BaseTypeVectorAdapter
extends VectorAdapter

Provides support for adapting a DODS BaseTypePrimitiveVector to the VisAD data-import context.

Instances are immutable.

Author:
Steven R. Emmerson

Constructor Summary
protected BaseTypeVectorAdapter(dods.dap.BaseTypePrimitiveVector vector, dods.dap.DAS das, VariableAdapterFactory factory)
          Constructs from a DODS vector and a factory for creating DODS variable adapters.
 
Method Summary
static BaseTypeVectorAdapter baseTypeVectorAdapter(dods.dap.BaseTypePrimitiveVector vector, dods.dap.DAS das, VariableAdapterFactory factory)
          Returns an instance of this class corresponding to a DODS vector and a factory for creating DODS variable adapters.
 void setField(dods.dap.BaseTypePrimitiveVector vector, FieldImpl field, boolean copy)
          Sets the range of a compatible VisAD Field.
 
Methods inherited from class visad.data.dods.VectorAdapter
getMathType, getRepresentationalSets, getVariableAdapter, griddedSet, isFlat, setField, setField, setField, setField, setField, setField, setField, setField, setField
 
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
 

Constructor Detail

BaseTypeVectorAdapter

protected BaseTypeVectorAdapter(dods.dap.BaseTypePrimitiveVector vector,
                                dods.dap.DAS das,
                                VariableAdapterFactory factory)
                         throws VisADException,
                                RemoteException
Constructs from a DODS vector and a factory for creating DODS variable adapters.

Parameters:
vector - A DODS vector to be adapted.
das - The DODS DAS in which the attribute table for the DODS vector is embedded.
factory - A factory for creating adapters of DODS variables.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.
Method Detail

baseTypeVectorAdapter

public static BaseTypeVectorAdapter baseTypeVectorAdapter(dods.dap.BaseTypePrimitiveVector vector,
                                                          dods.dap.DAS das,
                                                          VariableAdapterFactory factory)
                                                   throws VisADException,
                                                          RemoteException
Returns an instance of this class corresponding to a DODS vector and a factory for creating DODS variable adapters.

Parameters:
vector - A DODS vector to be adapted.
das - The DODS DAS in which the attribute table for the DODS vector is embedded.
factory - A factory for creating adapters of DODS variables.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

setField

public void setField(dods.dap.BaseTypePrimitiveVector vector,
                     FieldImpl field,
                     boolean copy)
              throws VisADException,
                     RemoteException
Sets the range of a compatible VisAD Field. The range values are taken from a DODS primitive vector whose metadata must be compatible with the metadata of the primitive vector used during construction of this instance.

Overrides:
setField in class VectorAdapter
Parameters:
vector - A DODS primitive vector whose data values are to be used to set the range of the VisAD field.
field - A VisAD field to have its range values set.
copy - If true, then range values are copied from the primitive vector.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.