visad.data.netcdf.in
Class VirtualField

java.lang.Object
  extended by visad.data.netcdf.in.VirtualData
      extended by visad.data.netcdf.in.VirtualField
Direct Known Subclasses:
VirtualFlatField

public class VirtualField
extends VirtualData

Provides support for a virtual VisAD Field.


Constructor Summary
protected VirtualField(FunctionType funcType, SampledSet domainSet, VirtualTuple rangeTuple)
          Constructs from a function type, domain set, and range tuple.
 
Method Summary
 Object clone()
          Clones this instance.
 DataImpl getData(Context context)
          Gets the VisAD data object corresponding to this virtual, data object.
 DataFactory getDataFactory()
          Returns the factory used to create VisAD data objects.
 SampledSet getDomainSet()
          Gets the domain sampling set of this virtual field.
 FunctionType getFunctionType()
          Gets the FunctionType of this virtual Field.
 VirtualTuple getRangeTuple()
          Gets the range tuple of this virtual field.
 MathType getType()
          Gets the MathType of this virtual Field.
static VirtualField newVirtualField(FunctionType funcType, SampledSet domainSet, VirtualTuple rangeTuple)
          Factory method for creating a new instance.
static VirtualField newVirtualField(SampledSet domainSet, VirtualTuple rangeTuple)
          Factory method for creating a new instance.
 void setDataFactory(DataFactory factory)
          Sets the factory used to create VisAD data objects.
 
Methods inherited from class visad.data.netcdf.in.VirtualData
getData, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VirtualField

protected VirtualField(FunctionType funcType,
                       SampledSet domainSet,
                       VirtualTuple rangeTuple)
Constructs from a function type, domain set, and range tuple.

Parameters:
funcType - The VisAD FunctionType of the field.
domainSet - The domain sampling set of the field.
rangeTuple - The range of the field.
Method Detail

newVirtualField

public static VirtualField newVirtualField(SampledSet domainSet,
                                           VirtualTuple rangeTuple)
                                    throws VisADException
Factory method for creating a new instance.

Parameters:
domainSet - The domain sampling set of the field.
rangeTuple - The range of the field.
Returns:
The corresponding VirtualField.
Throws:
VisADException - Couldn't created necessary VisAD object.

newVirtualField

public static VirtualField newVirtualField(FunctionType funcType,
                                           SampledSet domainSet,
                                           VirtualTuple rangeTuple)
Factory method for creating a new instance.

Parameters:
funcType - The VisAD FunctionType of the field.
domainSet - The domain sampling set of the field.
rangeTuple - The range of the field.
Returns:
The corresponding VirtualField.

getFunctionType

public FunctionType getFunctionType()
Gets the FunctionType of this virtual Field.

Returns:
The FunctionType of this virtual Field.

getType

public MathType getType()
Gets the MathType of this virtual Field.

Specified by:
getType in class VirtualData
Returns:
The FunctionType of this virtual Field.

getDomainSet

public SampledSet getDomainSet()
Gets the domain sampling set of this virtual field.

Returns:
The domain sampling set of this field.

getRangeTuple

public VirtualTuple getRangeTuple()
Gets the range tuple of this virtual field.

Returns:
The range tuple of this virtual field.

getData

public DataImpl getData(Context context)
                 throws VisADException,
                        RemoteException,
                        IOException
Gets the VisAD data object corresponding to this virtual, data object.

Specified by:
getData in class VirtualData
Parameters:
context - The context in which the data is to be retrieved.
Returns:
The VisAD Field corresponding to this virtual Field.
Throws:
VisADException - Couldn't created necessary VisAD object.
RemoteException - Remote access failure.
IOException - I/O failure.

clone

public Object clone()
Clones this instance.

Specified by:
clone in class VirtualData
Returns:
A (deep) clone of this instance.

setDataFactory

public void setDataFactory(DataFactory factory)
Sets the factory used to create VisAD data objects.

Specified by:
setDataFactory in class VirtualData
Parameters:
factory - The factory for creating VisAD data objects.

getDataFactory

public DataFactory getDataFactory()
Returns the factory used to create VisAD data objects.

Specified by:
getDataFactory in class VirtualData
Returns:
factory The factory for creating VisAD data objects.