org.das2.dataset
Class ConstantDataSetDescriptor
java.lang.Object
org.das2.dataset.DataSetDescriptor
org.das2.dataset.ConstantDataSetDescriptor
- All Implemented Interfaces:
- Displayable
public class ConstantDataSetDescriptor
- extends DataSetDescriptor
This class wraps a DataSet to use where DataSetDescriptors are required. This
trivially returns the wrapped DataSet regardless of the getDataSet parameters.
Originally this class was used with Renderers, which needed a DataSetDescriptor
for their operation. Now that they interact only with DataSets, and this
class should not be used with them, use Renderer.setDataSet instead.
Method Summary |
DataSet |
getDataSet(Datum start,
Datum end,
Datum resolution,
ProgressMonitor monitor)
Retrieve the dataset for this interval and resolution. |
DataSet |
getDataSetImpl(Datum start,
Datum end,
Datum resolution,
ProgressMonitor monitor)
getDataSetImpl implements the getDataSet for this DataSetDescriptor implementation. |
Units |
getXUnits()
|
void |
requestDataSet(Datum start,
Datum end,
Datum resolution,
ProgressMonitor monitor,
java.lang.Object lockObject)
Requests that a dataSet be loaded, and that the dataSet be returned via a DataSetUpdate event. |
Methods inherited from class org.das2.dataset.DataSetDescriptor |
addDataSetUpdateListener, create, fireDataSetUpdateEvent, getDataSetCache, getDataSetID, getListIcon, getListLabel, getProperty, removeDataSetUpdateListener, requestDataSet, reset, setDefaultCaching, setProperties |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConstantDataSetDescriptor
public ConstantDataSetDescriptor(DataSet ds)
- Creates a new instance of ConstantDataSetDescriptor
getDataSetImpl
public DataSet getDataSetImpl(Datum start,
Datum end,
Datum resolution,
ProgressMonitor monitor)
throws DasException
- Description copied from class:
DataSetDescriptor
- getDataSetImpl implements the getDataSet for this DataSetDescriptor implementation. The
getDataSet call of the abstract DataSetDescriptor uses this routine to satisfy requests and
fill its cache. This caching may be disabled via setDefaultCaching. To satisfy the request,
a DataSet should be returned with an x tag range that contains start and end, with a
resolution finer than that requested.
- Specified by:
getDataSetImpl
in class DataSetDescriptor
- Parameters:
start
- beginning of range for the request.end
- end of the range for the request.resolution
- the resolution requirement for the reqeust. null
may be used to request the finest resolution available or intrinic resolution.
- Throws:
DasException
getDataSet
public DataSet getDataSet(Datum start,
Datum end,
Datum resolution,
ProgressMonitor monitor)
throws DasException
- Description copied from class:
DataSetDescriptor
- Retrieve the dataset for this interval and resolution. The contract for this function is that
identical start,end,resolution parameters will yield an identical dataSet, except for when an
DataSetUpdate has been fired in the meantime.
null for the data resolution indicates that the data should be returned at its "intrinsic resolution"
if such a resolution exists.
- Overrides:
getDataSet
in class DataSetDescriptor
- Throws:
DasException
getXUnits
public Units getXUnits()
- Specified by:
getXUnits
in class DataSetDescriptor
- Returns:
- the x units of the DataSetDescriptor that parameterize the data. This is used to identify dataSet requests.
requestDataSet
public void requestDataSet(Datum start,
Datum end,
Datum resolution,
ProgressMonitor monitor,
java.lang.Object lockObject)
- Description copied from class:
DataSetDescriptor
- Requests that a dataSet be loaded, and that the dataSet be returned via a DataSetUpdate event.
The @param lockObject is an object that is dependent on the load, for example, the DasCanvas,
and will be passed in to the request processor. If the dataSet is available in interactive time,
then the dataSetUpdate may be fired on the same thread as the request is made.
- Overrides:
requestDataSet
in class DataSetDescriptor