Package ucar.unidata.data
Class DirectDataChoice
java.lang.Object
ucar.unidata.data.DataChoice
ucar.unidata.data.DirectDataChoice
- Direct Known Subclasses:
CompositeDataChoice
,KmlInfo
A subclass of DataChoice for supporting a leaf choice. This choice
maps directly to data.
- Version:
- $Revision: 1.56 $
- Author:
- IDV Development Team
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DataSource
The data sourcestatic final String
This is the XmlEncoder encoding property we use to determine if the datasource should be written outFields inherited from class ucar.unidata.data.DataChoice
description, id, name, NULL_DATASELECTION, NULL_PROPERTIES, NULL_REQUESTPROPERTIES, parent, PROP_ICON, PROP_REQUESTER, properties
-
Constructor Summary
ConstructorsConstructorDescriptionDefault bean constructor; does nothing.DirectDataChoice
(DataSource dataSource, Object id, String name, String description, List categories) Create a new DirectDataChoice.DirectDataChoice
(DataSource dataSource, Object id, String name, String description, List categories, Hashtable properties) Create a new DirectDataChoice.DirectDataChoice
(DataSource dataSource, Object id, String name, String description, List categories, DataSelection dataSelection) Create a new DirectDataChoice.DirectDataChoice
(DataSource dataSource, Object id, String name, String description, List categories, DataSelection dataSelection, Hashtable properties) Create a new DirectDataChoice.DirectDataChoice
(DirectDataChoice other) Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addDataChangeListener
(DataChangeListener listener) Add the data change listenerboolean
basicallyEquals
(DataChoice that) This just checks for basic equality.cloneMe()
Method for cloning.boolean
Check for equality.Get all the times associated with this choice.getAllLevels
(DataSelection dataSelection) Get all the levels associated with this choiceprotected Data
getData
(DataCategory category, DataSelection dataSelection, Hashtable requestProperties) Get the data that this choice represents.Get the associatedDataSource
.void
getDataSources
(List dataSources) Add to the given list all the data sourcesvoid
getFinalDataChoices
(List finalDataChoices) Add to the given list all final data choices (i.e., the leafs of the datachoice tree)Get the full description for this DataChoice.Get all the selected times associated with this choice.int
hashCode()
Return the hashcode for this DirectDataChoicevoid
initAfterUnPersistence
(Hashtable properties) This gets called after the data choice has been unpersistedvoid
removeDataChangeListener
(DataChangeListener listener) Remove the data change listenervoid
Set the associatedDataSource
.Methods inherited from class ucar.unidata.data.DataChoice
addCategory, addCurrentName, addParamNameToCategories, cloneDataChoices, createClone, getAllLevels, getCategories, getCurrentNames, getData, getData, getDataCategories, getDataCategories, getDataSelection, getDescription, getDisplayCategory, getFixedRequestProperties, getForUser, getId, getIndexedName, getName, getParent, getProperties, getProperty, getProperty, getProperty, getStringId, isEndUserFormula, mergeRequestProperties, setCategories, setDataCategories, setDataSelection, setDescription, setFixedRequestProperties, setId, setLevelSelection, setName, setObjectProperty, setParent, setProperties, setProperty, setProperty, setTimeSelection, toString
-
Field Details
-
PROP_WRITEDATASOURCE
This is the XmlEncoder encoding property we use to determine if the datasource should be written out- See Also:
-
dataSource
The data source
-
-
Constructor Details
-
DirectDataChoice
public DirectDataChoice()Default bean constructor; does nothing. -
DirectDataChoice
public DirectDataChoice(DataSource dataSource, Object id, String name, String description, List categories, Hashtable properties) Create a new DirectDataChoice.- Parameters:
dataSource
- The source of the dataid
- The identifying object.name
- The short name of this choice.description
- The long description of this choice.categories
- List ofDataCategory
s.properties
- The properties for this data choice (may be null).
-
DirectDataChoice
public DirectDataChoice(DataSource dataSource, Object id, String name, String description, List categories) Create a new DirectDataChoice.- Parameters:
dataSource
- The source of the dataid
- The identifying object.name
- The short name of this choice.description
- The long description of this choice.categories
- List ofDataCategory
s.
-
DirectDataChoice
public DirectDataChoice(DataSource dataSource, Object id, String name, String description, List categories, DataSelection dataSelection) Create a new DirectDataChoice.- Parameters:
dataSource
- The source of the dataid
- The identifying object.name
- The short name of this choice.description
- The long description of this choice.categories
- List ofDataCategory
s.dataSelection
- The subsetting criteria
-
DirectDataChoice
public DirectDataChoice(DataSource dataSource, Object id, String name, String description, List categories, DataSelection dataSelection, Hashtable properties) Create a new DirectDataChoice.- Parameters:
dataSource
- The source of the dataid
- The identifying object.name
- The short name of this choice.description
- The long description of this choice.categories
- List ofDataCategory
s.dataSelection
- The subsetting criteriaproperties
- The properties for this data choice (may be null).
-
DirectDataChoice
Copy constructor.- Parameters:
other
- other DirectDataChoice to get state from
-
-
Method Details
-
cloneMe
Method for cloning. Calls copy constructor.- Specified by:
cloneMe
in classDataChoice
- Returns:
- copy of this
-
getFinalDataChoices
Add to the given list all final data choices (i.e., the leafs of the datachoice tree)- Overrides:
getFinalDataChoices
in classDataChoice
- Parameters:
finalDataChoices
- The list to add to
-
getFullDescription
Get the full description for this DataChoice. Overrides the superclass method.- Overrides:
getFullDescription
in classDataChoice
- Returns:
- full description
-
getDataSources
Add to the given list all the data sources- Overrides:
getDataSources
in classDataChoice
- Parameters:
dataSources
- List to put data sources into
-
getAllLevels
Get all the levels associated with this choice- Overrides:
getAllLevels
in classDataChoice
- Parameters:
dataSelection
- data selection- Returns:
- List of levels
-
getAllDateTimes
Get all the times associated with this choice.- Overrides:
getAllDateTimes
in classDataChoice
- Returns:
- all times from the superclass or all times from the datasource
-
getSelectedDateTimes
Get all the selected times associated with this choice.- Overrides:
getSelectedDateTimes
in classDataChoice
- Returns:
- the selected times
-
initAfterUnPersistence
This gets called after the data choice has been unpersisted- Overrides:
initAfterUnPersistence
in classDataChoice
- Parameters:
properties
- Properties
-
getDataSource
Get the associatedDataSource
. Mostly used by XML persistence.- Returns:
- the DataSource.
-
setDataSource
Set the associatedDataSource
. Mostly used by XML persistence.- Parameters:
s
- the DataSource.
-
getData
protected Data getData(DataCategory category, DataSelection dataSelection, Hashtable requestProperties) throws VisADException, RemoteException, DataCancelException Get the data that this choice represents.- Specified by:
getData
in classDataChoice
- Parameters:
category
- TheDataCategory
used to subset this call (usually not used but placed in here just in case it is needed.)dataSelection
- Allows one to subset the data request (e.g., asking for a smaller set of times, etc.)requestProperties
- Extra selection properties- Returns:
- The data.
- Throws:
DataCancelException
- if the request to get data is canceledRemoteException
- problem accessing remote dataVisADException
- problem creating the Data object
-
hashCode
public int hashCode()Return the hashcode for this DirectDataChoice- Overrides:
hashCode
in classDataChoice
- Returns:
- the hashcode
-
equals
Check for equality.- Overrides:
equals
in classDataChoice
- Parameters:
o
- Object to check.- Returns:
- true if
o
is equivalent
-
basicallyEquals
This just checks for basic equality. Things like id, datasource, etc.- Overrides:
basicallyEquals
in classDataChoice
- Parameters:
that
- The object ot check for equality- Returns:
- Is basically equals
-
addDataChangeListener
Add the data change listener- Specified by:
addDataChangeListener
in classDataChoice
- Parameters:
listener
- listener to add
-
removeDataChangeListener
Remove the data change listener- Specified by:
removeDataChangeListener
in classDataChoice
- Parameters:
listener
- listener to remove
-