public abstract class DodsVarDataSet extends java.lang.Object implements WritableDataSet
| Modifier and Type | Class and Description |
|---|---|
static class |
DodsVarDataSet.DoubleArray |
static class |
DodsVarDataSet.EpochStringArray |
static class |
DodsVarDataSet.FloatArray |
static class |
DodsVarDataSet.Int16Array |
static class |
DodsVarDataSet.Int32Array |
static class |
DodsVarDataSet.NominalStringArray |
AVERAGE_TYPE, BIN_MAX, BIN_MAX_NAME, BIN_MIN, BIN_MIN_NAME, BIN_MINUS, BIN_MINUS_NAME, BIN_PLUS, BIN_PLUS_NAME, BINS_0, BINS_1, BUNDLE_0, BUNDLE_1, BUNDLE_2, BUNDLE_3, CACHE_TAG, CADENCE, CONTEXT_0, CONTEXT_1, COORDINATE_FRAME, DEFAULT_FILL_VALUE, DELTA_MINUS, DELTA_MINUS_NAME, DELTA_PLUS, DELTA_PLUS_NAME, DEPEND_0, DEPEND_1, DEPEND_2, DEPEND_3, DEPENDNAME_0, DEPENDNAME_1, DESCRIPTION, ELEMENT_DIMENSIONS, ELEMENT_LABEL, ELEMENT_NAME, FILL_VALUE, FORMAT, JOIN_0, LABEL, LIMIT_HUGE_DATASET, MAX_HIGH_RANK, MAX_PLANE_COUNT, MAX_RANK, MAX_UNIT_BUNDLE_COUNT, METADATA, METADATA_MODEL, MIN_WAVEFORM_LENGTH, MONOTONIC, NAME, NOTES, PLANE_0, QUBE, RENDER_TYPE, SCALE_TYPE, SOURCE, START_INDEX, TITLE, TYPICAL_MAX, TYPICAL_MIN, UNITS, USER_PROPERTIES, VALID_MAX, VALID_MIN, VALUE_AVERAGE_TYPE_GEOMETRIC, VALUE_AVERAGE_TYPE_LINEAR, VALUE_AVERAGE_TYPE_MOD24, VALUE_AVERAGE_TYPE_MOD360, VALUE_AVERAGE_TYPE_MODPI, VALUE_AVERAGE_TYPE_MODTAU, VALUE_AVERAGE_TYPE_NONE, VALUE_BINS_MIN_MAX, VALUE_COORDINATE_FRAME_COMPLEX_NUMBER, VALUE_METADATA_MODEL_ISTP, VALUE_METADATA_MODEL_SPASE, VALUE_RENDER_TYPE_COMPOSITE_IMAGE, VALUE_RENDER_TYPE_DIGITAL, VALUE_RENDER_TYPE_EVENTS_BAR, VALUE_RENDER_TYPE_NNSPECTROGRAM, VALUE_RENDER_TYPE_SERIES, VALUE_SCALE_TYPE_LINEAR, VALUE_SCALE_TYPE_LOG, VERSION, WEIGHTS| Constructor and Description |
|---|
DodsVarDataSet(opendap.dap.DArray array)
Creates a new instance of DodsVarDataSet
|
| Modifier and Type | Method and Description |
|---|---|
<T> T |
capability(java.lang.Class<T> clazz)
return null or an object implementing the capability for the given interface
For example:
|
protected void |
checkImmutable()
here is the one place where we check immutable, and we can make this throw an exception
once things look stable.
|
boolean |
isImmutable()
return true if the dataset has been made immutable.
|
int |
length()
return the length of the first dimension
|
int |
length(int i)
return the length of the second dimension, for the ith element of the first dimension.
|
int |
length(int i0,
int i1)
return the length of the third dimension, for the ith element of the first dimension and jth element of the second dimension.
|
int |
length(int i0,
int i1,
int i2)
return the length of the fourth dimension for the ith, jth and kth elements of the first three dimensions.
|
void |
makeImmutable()
mark the dataset as being immutable.
|
protected static DodsVarDataSet |
newDataSet(opendap.dap.DArray z,
java.util.Map<java.lang.String,java.lang.Object> properties) |
java.lang.Object |
property(java.lang.String name)
accessor for properties attached to the dataset.
|
java.lang.Object |
property(java.lang.String name,
int i)
accessor for properties attached to the dataset's first index.
|
void |
putProperty(java.lang.String name,
int i,
java.lang.Object value)
assign the name value to the property at the slice index.
|
void |
putProperty(java.lang.String name,
java.lang.Object value)
assign the name value to the property.
|
void |
putValue(int i0,
int i1,
int i2,
int i3,
double v)
put a value into the rank 4 dataset.
|
int |
rank()
returns the rank of the dataset, which is the number of indeces used to access data.
|
QDataSet |
slice(int i)
return a dataset that is a slice of this dataset, slicing on the zeroth
dimension.
|
java.lang.String |
svalue()
rank 0 accessor which provides the string value
|
java.lang.String |
toString() |
QDataSet |
trim(int start,
int end)
return a dataset that is a subset of this dataset.
|
abstract double |
value(int i)
rank 1 accessor.
|
abstract double |
value(int i0,
int i1)
rank 2 accessor.
|
abstract double |
value(int i0,
int i1,
int i2)
rank 3 accessor.
|
abstract double |
value(int i0,
int i1,
int i2,
int i3)
rank 4 accessor.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitputValue, putValue, putValue, putValuepublic DodsVarDataSet(opendap.dap.DArray array)
array - the openDap array.public java.lang.String toString()
toString in class java.lang.Objectpublic int rank()
QDataSetpublic java.lang.String svalue()
QDataSetpublic abstract double value(int i)
QDataSetpublic abstract double value(int i0,
int i1)
QDataSetpublic abstract double value(int i0,
int i1,
int i2)
QDataSetpublic abstract double value(int i0,
int i1,
int i2,
int i3)
QDataSetpublic void putValue(int i0,
int i1,
int i2,
int i3,
double v)
WritableDataSetputValue in interface WritableDataSeti0 - the indexi1 - the indexi2 - the indexi3 - the indexv - the valuepublic java.lang.Object property(java.lang.String name)
QDataSetproperty in interface QDataSetname - property name, such as "DEPEND_0" or "UNITS"QDataSet.DEPEND_0,
QDataSet.UNITSpublic java.lang.Object property(java.lang.String name,
int i)
QDataSetproperty in interface QDataSetname - property name, such as "DEPEND_0" or "UNITS"i - the indexQDataSet.DEPEND_0,
QDataSet.UNITSpublic void putProperty(java.lang.String name,
java.lang.Object value)
MutablePropertyDataSetputProperty in interface MutablePropertyDataSetname - property name like "UNITS" (Use QDataSet.UNITS)value - the property value.putProperty which properly checks mutability of the dataset,
QDataSet.UNITSpublic void putProperty(java.lang.String name,
int i,
java.lang.Object value)
MutablePropertyDataSetputProperty in interface MutablePropertyDataSetname - property name like "UNITS" (Use QDataSet.UNITS)i - the index of the slice.value - the property value.Ops.putProperty(org.das2.qds.QDataSet, java.lang.String, java.lang.Object),
QDataSet.UNITS,
QDataSet.property(java.lang.String, int)public int length()
QDataSetpublic int length(int i)
QDataSetpublic int length(int i0,
int i1)
QDataSetpublic int length(int i0,
int i1,
int i2)
QDataSetpublic <T> T capability(java.lang.Class<T> clazz)
QDataSetThis allows operations to be performed efficiently. Note there is no WriteCapability class, this is just an example.ds= DDataSet.createRank1(100); WriteCapability write= ds.capability( WriteCapability.class ); write.putValue( 99, -1e31 );
capability in interface QDataSetT - a capabilityclazz - the class, such as WriteCapability.classpublic QDataSet slice(int i)
QDataSetpublic QDataSet trim(int start, int end)
QDataSet
ds= DDataSet.createRank1(100);
QDataSet trim= ds.trim(50,60);
assert( trim.length()==10 );
Note start and end must be positive. Negative indices,
referenced from the end of the dataset, are not supported here.public void makeImmutable()
MutablePropertyDataSetmakeImmutable in interface MutablePropertyDataSetpublic boolean isImmutable()
MutablePropertyDataSetisImmutable in interface MutablePropertyDataSetprotected final void checkImmutable()
protected static DodsVarDataSet newDataSet(opendap.dap.DArray z, java.util.Map<java.lang.String,java.lang.Object> properties)