org.das2.qds.DataSetAnnotations

Place to experiment with runtime notes about datasets in this single-instance lookup table. This uses weak references so that datasets will be garbage collected.

DataSetAnnotations( )


VALUE_0

the value 0 to avoid the if statement in valueOf


VALUE_1

the value 1 to avoid the if statement in valueOf


ANNOTATION_INVALID_COUNT

number of invalid entries. If zero, the data is all valid, within valid min to valid max and not fill.


ANNOTATION_ZERO_COUNT

number of entries containing the value zero. If zero, then the data is all non-zero or fill. This is used with ANNOTATION_INVALID_COUNT in the where function.


ANNOTATION_BOUNDS

the bounding cube of the dataset, see SemanticOps.getBounds.


ANNOTATION_CADENCE

the cadence for the dataset.


ANNOTATION_QUBE

qube for the dataset.


getAnnotation

getAnnotation( QDataSet ds, String annotation ) → Object

return either null or the value for the annotation. Note some Java compilers (Java6?) will not allow code such as: 0==DataSetAnnotations.getInstance().getAnnotation(...) so instead use Integer.valueOf(0)==DataSetAnnotations.getInstance().getAnnotation(...)

Parameters

ds - the dataset.
annotation - the annotation name, such as ANNOTATION_INVALID_COUNT.

Returns:

null or the annotation value.

[search for examples] [view on GitHub] [view on old javadoc] [view source]


getInstance

getInstance( ) → org.das2.qds.DataSetAnnotations

access the single instance

Returns:

the single instance

[search for examples] [view on GitHub] [view on old javadoc] [view source]


peek

peek( ) → void

print the map of annotations to stderr.

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]


putAnnotation

putAnnotation( QDataSet ds, String annotation, Object value ) → void

add the annotation.

Parameters

ds - the dataset to annotate
annotation - the annotation name, such as ANNOTATION_INVALID_COUNT.
value - the value.

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]


reset

reset( ) → void

reset the internal state.

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]