visad.data.dods
Class VectorAdapter
- java.lang.Object
-
- visad.data.dods.Adapter
-
- visad.data.dods.VectorAdapter
-
- Direct Known Subclasses:
- BaseTypeVectorAdapter, NumericVectorAdapter
public abstract class VectorAdapter extends Adapter
Provides support for adapting DODS primitive vectors to the VisAD data-import context.Instances are immutable.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description MathTypegetMathType()Returns the VisAD math-type of this instance.SimpleSet[]getRepresentationalSets(boolean copy)GriddedSetgriddedSet(dods.dap.PrimitiveVector vector)Throws aVisADException.booleanisFlat()Indicates whether or not the VisADMathTypeof this instance is "flat".voidsetField(dods.dap.BaseTypePrimitiveVector vector, FieldImpl field, boolean copy)Throws aVisADException.voidsetField(dods.dap.BooleanPrimitiveVector vector, FieldImpl field, boolean copy)Throws aVisADException.voidsetField(dods.dap.BytePrimitiveVector vector, FieldImpl field, boolean copy)Throws aVisADException.voidsetField(dods.dap.Float32PrimitiveVector vector, FieldImpl field, boolean copy)Throws aVisADException.voidsetField(dods.dap.Float64PrimitiveVector vector, FieldImpl field, boolean copy)Throws aVisADException.voidsetField(dods.dap.Int16PrimitiveVector vector, FieldImpl field, boolean copy)Throws aVisADException.voidsetField(dods.dap.Int32PrimitiveVector vector, FieldImpl field, boolean copy)Throws aVisADException.voidsetField(dods.dap.PrimitiveVector vector, FieldImpl field, boolean copy)Sets the range of a compatible VisADField.voidsetField(dods.dap.UInt16PrimitiveVector vector, FieldImpl field, boolean copy)Throws aVisADException.voidsetField(dods.dap.UInt32PrimitiveVector vector, FieldImpl field, boolean copy)Throws aVisADException.
-
-
-
Method Detail
-
getMathType
public final MathType getMathType()
Returns the VisAD math-type of this instance.- Returns:
- The math-type this instance.
-
isFlat
public boolean isFlat()
Indicates whether or not the VisADMathTypeof this instance is "flat". A MathType is flat if it comprises a VisADRealType,RealTupleType, or aTupleof RealTypes and RealTupleTypes.- Returns:
trueif and only if the MathType of this instance is "flat".
-
getRepresentationalSets
public final SimpleSet[] getRepresentationalSets(boolean copy)
Returns the VisADSets that will be used to represent this instance's data values in the range of a VisADFlatField.- Parameters:
copy- If true, then the array is cloned.- Returns:
- The VisAD Sets used to represent the data values in the range of a FlatField. WARNING: Modify the returned array only under extreme duress.
-
setField
public void setField(dods.dap.PrimitiveVector vector, FieldImpl field, boolean copy) throws VisADException, java.rmi.RemoteExceptionSets the range of a compatible VisADField. 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.- 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 the range values are copied from the primitive vector.- Throws:
VisADException- VisAD failure.java.rmi.RemoteException- Java RMI failure.
-
setField
public void setField(dods.dap.BooleanPrimitiveVector vector, FieldImpl field, boolean copy) throws VisADExceptionThrows aVisADException. Override this method in subclasses where appropriate.- 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 the range values are copied from the primitive vector.- Throws:
VisADException- The vector has the wrong DODS type.
-
setField
public void setField(dods.dap.BytePrimitiveVector vector, FieldImpl field, boolean copy) throws VisADExceptionThrows aVisADException. Override this method in subclasses where appropriate.- Parameters:
vector- A DODS primitive vector whose data values are to be used to set the range of the VisAD field.copy- If true, then the range values are copied from the primitive vector.field- A VisAD field to have its range values set.- Throws:
VisADException- The vector has the wrong DODS type.
-
setField
public void setField(dods.dap.UInt16PrimitiveVector vector, FieldImpl field, boolean copy) throws VisADExceptionThrows aVisADException. Override this method in subclasses where appropriate.- 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 the range values are copied from the primitive vector.- Throws:
VisADException- The vector has the wrong DODS type.
-
setField
public void setField(dods.dap.Int16PrimitiveVector vector, FieldImpl field, boolean copy) throws VisADExceptionThrows aVisADException. Override this method in subclasses where appropriate.- 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 the range values are copied from the primitive vector.- Throws:
VisADException- The vector has the wrong DODS type.
-
setField
public void setField(dods.dap.UInt32PrimitiveVector vector, FieldImpl field, boolean copy) throws VisADExceptionThrows aVisADException. Override this method in subclasses where appropriate.- 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 the range values are copied from the primitive vector.- Throws:
VisADException- The vector has the wrong DODS type.
-
setField
public void setField(dods.dap.Int32PrimitiveVector vector, FieldImpl field, boolean copy) throws VisADExceptionThrows aVisADException. Override this method in subclasses where appropriate.- 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 the range values are copied from the primitive vector.- Throws:
VisADException- The vector has the wrong DODS type.
-
setField
public void setField(dods.dap.Float32PrimitiveVector vector, FieldImpl field, boolean copy) throws VisADExceptionThrows aVisADException. Override this method in subclasses where appropriate.- 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 the range values are copied from the primitive vector.- Throws:
VisADException- The vector has the wrong DODS type.
-
setField
public void setField(dods.dap.Float64PrimitiveVector vector, FieldImpl field, boolean copy) throws VisADExceptionThrows aVisADException. Override this method in subclasses where appropriate.- 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 the range values are copied from the primitive vector.- Throws:
VisADException- The vector has the wrong DODS type.
-
setField
public void setField(dods.dap.BaseTypePrimitiveVector vector, FieldImpl field, boolean copy) throws VisADException, java.rmi.RemoteExceptionThrows aVisADException. Override this method in subclasses where appropriate.- 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 the range values are copied from the primitive vector.- Throws:
VisADException- The vector has the wrong DODS type.java.rmi.RemoteException- Java RMI failure.
-
griddedSet
public GriddedSet griddedSet(dods.dap.PrimitiveVector vector) throws VisADException, java.rmi.RemoteException
Throws aVisADException. Override this method in subclasses where appropriate.- Parameters:
vector- A DODS primitive vector whose data values are to be used to set the range of the VisAD field.- Throws:
VisADException- The vector has the wrong DODS type.java.rmi.RemoteException- Java RMI failure.
-
-
DMelt 3.0 © DataMelt by jWork.ORG