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 DataSourceThe data sourcestatic final StringThis 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 TypeMethodDescriptionvoidaddDataChangeListener(DataChangeListener listener) Add the data change listenerbooleanbasicallyEquals(DataChoice that) This just checks for basic equality.cloneMe()Method for cloning.booleanCheck for equality.Get all the times associated with this choice.getAllLevels(DataSelection dataSelection) Get all the levels associated with this choiceprotected DatagetData(DataCategory category, DataSelection dataSelection, Hashtable requestProperties) Get the data that this choice represents.Get the associatedDataSource.voidgetDataSources(List dataSources) Add to the given list all the data sourcesvoidgetFinalDataChoices(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.inthashCode()Return the hashcode for this DirectDataChoicevoidinitAfterUnPersistence(Hashtable properties) This gets called after the data choice has been unpersistedvoidremoveDataChangeListener(DataChangeListener listener) Remove the data change listenervoidSet 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 ofDataCategorys.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 ofDataCategorys.
-
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 ofDataCategorys.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 ofDataCategorys.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:
cloneMein classDataChoice- Returns:
- copy of this
-
getFinalDataChoices
Add to the given list all final data choices (i.e., the leafs of the datachoice tree)- Overrides:
getFinalDataChoicesin classDataChoice- Parameters:
finalDataChoices- The list to add to
-
getFullDescription
Get the full description for this DataChoice. Overrides the superclass method.- Overrides:
getFullDescriptionin classDataChoice- Returns:
- full description
-
getDataSources
Add to the given list all the data sources- Overrides:
getDataSourcesin classDataChoice- Parameters:
dataSources- List to put data sources into
-
getAllLevels
Get all the levels associated with this choice- Overrides:
getAllLevelsin classDataChoice- Parameters:
dataSelection- data selection- Returns:
- List of levels
-
getAllDateTimes
Get all the times associated with this choice.- Overrides:
getAllDateTimesin classDataChoice- Returns:
- all times from the superclass or all times from the datasource
-
getSelectedDateTimes
Get all the selected times associated with this choice.- Overrides:
getSelectedDateTimesin classDataChoice- Returns:
- the selected times
-
initAfterUnPersistence
This gets called after the data choice has been unpersisted- Overrides:
initAfterUnPersistencein 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:
getDatain classDataChoice- Parameters:
category- TheDataCategoryused 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:
hashCodein classDataChoice- Returns:
- the hashcode
-
equals
Check for equality.- Overrides:
equalsin classDataChoice- Parameters:
o- Object to check.- Returns:
- true if
ois equivalent
-
basicallyEquals
This just checks for basic equality. Things like id, datasource, etc.- Overrides:
basicallyEqualsin classDataChoice- Parameters:
that- The object ot check for equality- Returns:
- Is basically equals
-
addDataChangeListener
Add the data change listener- Specified by:
addDataChangeListenerin classDataChoice- Parameters:
listener- listener to add
-
removeDataChangeListener
Remove the data change listener- Specified by:
removeDataChangeListenerin classDataChoice- Parameters:
listener- listener to remove
-