public abstract class DataSetDescriptor extends java.lang.Object implements Displayable
DataSetDescriptors are identified with a URL-like string:
http://www-pw.physics.uiowa.edu/das/das2Server?das2_1/cluster/wbd/r_wbd_dsn_cfd&spacecraft%3Dc1%26antenna%3DEy
The protocol of the string indicates how the DataSetDescriptor is to be constructed, and presently there are:
http a das2Server provides the specification of the datasetdescriptor. class refers to a loadable java class that is an instanceof DataSetDescriptor and has the method newDataSetDescriptor( Map params ) throws DasException
Modifier and Type | Field and Description |
---|---|
protected java.util.Map |
properties |
Modifier | Constructor and Description |
---|---|
protected |
DataSetDescriptor() |
protected |
DataSetDescriptor(java.lang.String dataSetID) |
Modifier and Type | Method and Description |
---|---|
void |
addDataSetUpdateListener(DataSetUpdateListener listener) |
static DataSetDescriptor |
create(java.lang.String dataSetID)
creates a DataSetDescriptor for the given identification string.
|
void |
drawListIcon(java.awt.Graphics2D g,
int x,
int y)
implement this to provide nice drawing of icon on printing graphics context.
|
protected void |
fireDataSetUpdateEvent(DataSetUpdateEvent event) |
DataSet |
getDataSet(Datum start,
Datum end,
Datum resolution,
ProgressMonitor monitor)
Retrieve the dataset for this interval and resolution.
|
DataSetCache |
getDataSetCache() |
java.lang.String |
getDataSetID() |
protected abstract DataSet |
getDataSetImpl(Datum start,
Datum end,
Datum resolution,
ProgressMonitor monitor)
getDataSetImpl implements the getDataSet for this DataSetDescriptor implementation.
|
javax.swing.Icon |
getListIcon()
An icon can be provided that will be shown in a list
along with the textual description of the element.
|
java.lang.String |
getListLabel()
return a
String that will help the user
identify this item when choosing from a list. |
java.lang.Object |
getProperty(java.lang.String name)
Returns the value of the property with the specified name
|
abstract Units |
getXUnits() |
void |
removeDataSetUpdateListener(DataSetUpdateListener listener) |
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.
|
void |
requestDataSet(Datum start,
Datum end,
Datum resolution,
ProgressMonitor monitor,
java.lang.Object lockObject,
DataSetUpdateListener listener)
Request the dataset, and the dataset is returned only to the listener.
|
void |
reset()
clear any state that's developed, in particular any data caches.
|
void |
setDefaultCaching(boolean value)
defaultCaching means that the abstract DataSetDescriptor is allowed to handle
repeat getDataSet calls by returning a cached dataset.
|
protected void |
setProperties(java.util.Map properties) |
protected DataSetDescriptor(java.lang.String dataSetID)
protected DataSetDescriptor()
protected abstract DataSet getDataSetImpl(Datum start, Datum end, Datum resolution, ProgressMonitor monitor) throws DasException
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.DasException
public abstract Units getXUnits()
public void requestDataSet(Datum start, Datum end, Datum resolution, ProgressMonitor monitor, java.lang.Object lockObject)
public void requestDataSet(Datum start, Datum end, Datum resolution, ProgressMonitor monitor, java.lang.Object lockObject, DataSetUpdateListener listener)
lockObject
- object that is waiting for the result of this load, used to block other tasks which use that object.public DataSet getDataSet(Datum start, Datum end, Datum resolution, ProgressMonitor monitor) throws DasException
DasException
public void reset()
public void setDefaultCaching(boolean value)
public void addDataSetUpdateListener(DataSetUpdateListener listener)
public void removeDataSetUpdateListener(DataSetUpdateListener listener)
protected void fireDataSetUpdateEvent(DataSetUpdateEvent event)
public java.lang.String getDataSetID()
public static DataSetDescriptor create(java.lang.String dataSetID) throws DasException
http://www-pw.physics.uiowa.edu/das/das2Server?das2_1/cluster/wbd/r_wbd_dsn_cfd&spacecraft%3Dc1%26antenna%3DEy
The protocol of the string indicates how the DataSetDescriptor is to be constructed, and presently
there are:
http a das2Server provides the specification of the DataSetDescriptor, and a StreamDataSetDescriptor is created. class refers to a loadable java class that is an instanceof DataSetDescriptor and has the method newDataSetDescriptor( Map params )Note that DataSetDescriptors are stateless, the same DataSetDescriptor object may be returned to multiple clients.
dataSetID
- the URL-like identifier.DasException
protected void setProperties(java.util.Map properties)
public java.lang.Object getProperty(java.lang.String name)
name
- The name of the property requestedpublic javax.swing.Icon getListIcon()
Displayable
null
if there
is no icon available, or a roughly 16x16 pixel icon.getListIcon
in interface Displayable
public void drawListIcon(java.awt.Graphics2D g, int x, int y)
Displayable
drawListIcon
in interface Displayable
g
- the graphics context.x
- the x position, typically 0.y
- the y position, typically 0.public java.lang.String getListLabel()
Displayable
String
that will help the user
identify this item when choosing from a list.getListLabel
in interface Displayable
public DataSetCache getDataSetCache()