visad.data.dods
Class SequenceVariableAdapter.SequenceAccessor

java.lang.Object
  extended by visad.data.FileAccessor
      extended by visad.data.dods.SequenceVariableAdapter.SequenceAccessor
Enclosing class:
SequenceVariableAdapter

protected class SequenceVariableAdapter.SequenceAccessor
extends FileAccessor

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

Instances are immutable.

Author:
Steven R. Emmerson

Constructor Summary
SequenceVariableAdapter.SequenceAccessor(SampledSet domain, dods.dap.DSequence sequence)
          Constructs from a domain and a DODS DSequence.
 
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

SequenceVariableAdapter.SequenceAccessor

public SequenceVariableAdapter.SequenceAccessor(SampledSet domain,
                                                dods.dap.DSequence sequence)
Constructs from a domain and a DODS DSequence.

Parameters:
domain - The domain for the FileFlatField.
sequence - 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.