visad.data.dods
Class GridVariableAdapter.GridAccessor

java.lang.Object
  extended by visad.data.FileAccessor
      extended by visad.data.dods.GridVariableAdapter.GridAccessor
Enclosing class:
GridVariableAdapter

protected class GridVariableAdapter.GridAccessor
extends FileAccessor

Provides support for accessing a DODS DGrid as a VisAD FileFlatField.

Instances are immutable.

Author:
Steven R. Emmerson

Constructor Summary
GridVariableAdapter.GridAccessor(SampledSet domain, dods.dap.DArray array)
          Constructs from a domain and a DODS DArray.
 
Method Summary
 FlatField getFlatField()
          Returns a VisAD FlatField corresponding to this instance.
 FunctionType getFunctionType()
           
 double[][] readFlatField(FlatField template, int[] fileLocation)
          Throws a VisADError.
 void writeFile(int[] fileLocation, Data range)
          Throws a VisADError.
 void writeFlatField(double[][] values, FlatField template, int[] fileLocation)
          Throws a VisADError.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GridVariableAdapter.GridAccessor

public GridVariableAdapter.GridAccessor(SampledSet domain,
                                        dods.dap.DArray array)
Constructs from a domain and a DODS DArray.

Parameters:
domain - The domain for the FileFlatField.
array - The DODS variable.
Method Detail

getFunctionType

public FunctionType getFunctionType()
Specified by:
getFunctionType in class FileAccessor

getFlatField

public FlatField getFlatField()
                       throws VisADException,
                              RemoteException
Returns a VisAD FlatField corresponding to this instance.

Specified by:
getFlatField in class FileAccessor
Returns:
A FlatField corresponding to the construction arguments.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

writeFlatField

public void writeFlatField(double[][] values,
                           FlatField template,
                           int[] fileLocation)
Throws a VisADError.

Specified by:
writeFlatField in class FileAccessor
Parameters:
values - Some values.
template - A template FlatField.
fileLocation - An array of positional parameters.
Throws:
VisADError - This method does nothing and should not have been invoked. Always thrown.

readFlatField

public double[][] readFlatField(FlatField template,
                                int[] fileLocation)
Throws a VisADError.

Specified by:
readFlatField in class FileAccessor
Parameters:
template - A template FlatField.
fileLocation - An array of positional parameters.
Returns:
null.
Throws:
VisADError - This method does nothing and should not have been invoked. Always thrown.

writeFile

public void writeFile(int[] fileLocation,
                      Data range)
Throws a VisADError.

Specified by:
writeFile in class FileAccessor
Parameters:
fileLocation - An array of positional parameters.
range - The range of a FlatField.
Throws:
VisADError - This method does nothing and should not have been invoked. Always thrown.