|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.netcdf.ProtoVariable
visad.data.netcdf.out.ExportVar
visad.data.netcdf.out.DependentVar
The DependentVar class provides an abstract class for adapting data in a VisAD data object to a netCDF, dependent-variable API for the purpose of exporting the data.
| Constructor Summary | |
protected |
DependentVar(String name,
Class type,
Dimension[] dims,
Attribute[] attrs,
VisADAccessor accessor)
Construct. |
| Method Summary | |
void |
copyin(int[] origin,
MultiArray multiArray)
Set an array element identified by position. |
MultiArray |
copyout(int[] origin,
int[] shape)
Return a MultiArray into a slice of the data. |
abstract Object |
get(int[] indexes)
Return a netCDF datum identified by position. |
protected VisADAccessor |
getAccessor()
Return the data accessor. |
boolean |
getBoolean(int[] indexes)
Return an array element identified by position. |
byte |
getByte(int[] indexes)
Return an array element identified by position. |
char |
getChar(int[] indexes)
Return an array element identified by position. |
double |
getDouble(int[] indexes)
Return an array element identified by position. |
float |
getFloat(int[] indexes)
Return an array element identified by position. |
int |
getInt(int[] indexes)
Return an array element identified by position. |
long |
getLong(int[] indexes)
Return an array element identified by position. |
short |
getShort(int[] indexes)
Return an array element identified by position. |
void |
set(int[] index,
Object value)
Set an array element identified by position. |
void |
setBoolean(int[] index,
boolean value)
Set an array element identified by position. |
void |
setByte(int[] index,
byte value)
Set an array element identified by position. |
void |
setChar(int[] index,
char value)
Set an array element identified by position. |
void |
setDouble(int[] index,
double value)
Set an array element identified by position. |
void |
setFloat(int[] index,
float value)
Set an array element identified by position. |
void |
setInt(int[] index,
int value)
Set an array element identified by position. |
void |
setLong(int[] index,
long value)
Set an array element identified by position. |
void |
setShort(int[] index,
short value)
Set an array element identified by position. |
Object |
toArray()
Convert values to an array. |
Object |
toArray(Object obj,
int[] dummy1,
int[] dummy2)
Convert values to an array. |
| Methods inherited from class ucar.netcdf.ProtoVariable |
clone, getAttribute, getAttributes, getComponentType, getDimensionIterator, getLengths, getName, getRank, isScalar, isUnlimited, putAttribute, toCdl, toString |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
protected DependentVar(String name,
Class type,
Dimension[] dims,
Attribute[] attrs,
VisADAccessor accessor)
throws BadFormException
name - The name of the netCDF, dependent variable.type - The Java class of the type of the variable (i.e.
Double, Byte, Character, etc.).dims - The netCDF dimensions of the variable.attrs - The netCDF attributes of the variable.
BadFormException - The VisAD data object cannot be adapted to a netCDF API.| Method Detail |
public abstract Object get(int[] indexes)
throws IOException
get in interface Accessorget in class ExportVarindexes - The netCDF indexes of the desired datum. Includes all
adapted dimensions -- including those of all enclosing
VisAD data objects.
IOException - Data access failure.protected VisADAccessor getAccessor()
public void copyin(int[] origin,
MultiArray multiArray)
throws IOException
copyin in interface Accessororigin - int array specifying the starting index.multiArray - MultiArray with the same componentType as
this and shape smaller than
this.getLengths() - origin
IOException
public void set(int[] index,
Object value)
set in interface Accessorindex - MultiArray indexvalue - the new value.
public void setBoolean(int[] index,
boolean value)
setBoolean in interface AccessorAccessor.set(int[], java.lang.Object)
public void setChar(int[] index,
char value)
setChar in interface AccessorAccessor.set(int[], java.lang.Object)
public void setByte(int[] index,
byte value)
setByte in interface AccessorAccessor.set(int[], java.lang.Object)
public void setShort(int[] index,
short value)
setShort in interface AccessorAccessor.set(int[], java.lang.Object)
public void setInt(int[] index,
int value)
setInt in interface AccessorAccessor.set(int[], java.lang.Object)
public void setLong(int[] index,
long value)
setLong in interface AccessorAccessor.set(int[], java.lang.Object)
public void setFloat(int[] index,
float value)
setFloat in interface AccessorAccessor.set(int[], java.lang.Object)
public void setDouble(int[] index,
double value)
setDouble in interface AccessorAccessor.set(int[], java.lang.Object)
public boolean getBoolean(int[] indexes)
throws IOException
getBoolean in interface AccessorIOExceptionAccessor.get(int[])
public char getChar(int[] indexes)
throws IOException
getChar in interface AccessorIOExceptionAccessor.get(int[])
public byte getByte(int[] indexes)
throws IOException
getByte in interface AccessorIOExceptionAccessor.get(int[])
public short getShort(int[] indexes)
throws IOException
getShort in interface AccessorIOExceptionAccessor.get(int[])
public int getInt(int[] indexes)
throws IOException
getInt in interface AccessorIOExceptionAccessor.get(int[])
public long getLong(int[] indexes)
throws IOException
getLong in interface AccessorIOExceptionAccessor.get(int[])
public float getFloat(int[] indexes)
throws IOException
getFloat in interface AccessorIOExceptionAccessor.get(int[])
public double getDouble(int[] indexes)
throws IOException
getDouble in interface AccessorIOExceptionAccessor.get(int[])
public MultiArray copyout(int[] origin,
int[] shape)
throws IOException
copyout in interface Accessororigin - int array specifying the starting index.shape - int array specifying the extents in each
dimension. This becomes the shape of the return.
IOExceptionpublic Object toArray()
toArray in interface Accessor
public Object toArray(Object obj,
int[] dummy1,
int[] dummy2)
toArray in interface Accessor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||