|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.unidata.data.DataChoice
public abstract class DataChoice
An abstract base class that represents some selection of data. A DataChoice
is created with an identifying Object (e.g., a date/time, a field name, etc.)
a String name, a String description and a set of DataCategorys that
represent the flavor or flavors of data provided by this DataChoice.
| Field Summary | |
|---|---|
protected String |
description
Long descriptive name (e.g, "isobaric temperature", "u component of wind", etc.) |
protected Object |
id
The identifying object. |
protected String |
name
Short descriptive name (e.g., T, U, etc.). |
static DataSelection |
NULL_DATASELECTION
A null DataSelection |
static Hashtable |
NULL_PROPERTIES
A null properties intrinsic |
static Hashtable |
NULL_REQUESTPROPERTIES
The null request properties intrinsic |
protected DataChoice |
parent
DataChoice-s can follow a composite pattern. |
static String |
PROP_ICON
The icon property |
static String |
PROP_REQUESTER
The requester property |
protected Hashtable |
properties
A general properties table. |
| Constructor Summary | |
|---|---|
DataChoice()
The bean constructor. |
|
DataChoice(DataChoice other)
Create a new DataChoice, using the state of the given DataChoice to initialize the new object. |
|
DataChoice(Object id,
String description)
Create a new DataChoice. |
|
DataChoice(Object id,
String description,
DataCategory category)
Create a new DataChoice. |
|
DataChoice(Object id,
String description,
List categories)
Create a new DataChoice. |
|
DataChoice(Object id,
String name,
String description,
List categories)
Create a new DataChoice. |
|
DataChoice(Object id,
String name,
String description,
List categories,
Hashtable properties)
Create a new DataChoice. |
|
| Method Summary | |
|---|---|
void |
addCategory(DataCategory newCategory)
Add the given DataCategory into the list of data categories. |
static void |
addCurrentName(Object name)
This adds into a globallist the given param name |
abstract void |
addDataChangeListener(DataChangeListener listener)
Add the DataChangeListener. |
protected void |
addParamNameToCategories()
Add the DataCategory "param:" and "param: |
boolean |
basicallyEquals(DataChoice that)
This just checks for basic equality. |
static List |
cloneDataChoices(List listOfChoices)
Utility method to clone and return a list of DataChoice-s. |
abstract DataChoice |
cloneMe()
Create a new instance of this DataChoice. |
DataChoice |
createClone()
Create a new instance of this DataChoice. |
boolean |
equals(Object other)
Check for equality of this object to another |
List |
getAllDateTimes()
Get all the times associated with this choice |
List |
getAllLevels()
Get all the levels associated with this choice |
List |
getAllLevels(DataSelection dataSelection)
Get all the levels associated with this choice |
List |
getCategories()
Get the list of DataCategorys that this DataChoice represents. |
static List |
getCurrentNames()
Get the list of all data choice names there ever was during the run |
protected abstract Data |
getData(DataCategory category,
DataSelection dataSelection,
Hashtable requestProperties)
Return the Data object that this DataChoice represents. |
Data |
getData(DataSelection incomingDataSelection)
Return the Data object that this DataChoice represents. |
Data |
getData(DataSelection incomingDataSelection,
Hashtable requestProperties)
Return the Data object that this DataChoice represents. |
List |
getDataCategories()
Deprecated. |
List |
getDataCategories(boolean excludeDisplayCategories)
Get the list of DataCategory-s but exclude any that are used for display if excludeDisplayCategories is true |
DataSelection |
getDataSelection()
Get the data selection for this choice |
void |
getDataSources(List dataSources)
Add to the given list all the data sources |
String |
getDescription()
Return the human readable description. |
DataCategory |
getDisplayCategory()
Return the DataCategory that is meant to be used for displaying
this DataChoice within a UI. |
void |
getFinalDataChoices(List dataChoices)
Add to the given list all final data choices (i.e., the leafs of the datachoice tree) |
Hashtable |
getFixedRequestProperties()
Get the FixedRequestProperties property. |
boolean |
getForUser()
A DataChoice can be not intended to be shown to the user within a UI. |
String |
getFullDescription()
This method is used to get a lengthy description of this DataChoice. |
Object |
getId()
Return the identifying object. |
String |
getIndexedName(int index)
Return the indexed name, the default is to simply return the name. |
String |
getName()
Return the name of this DataChoice. |
DataChoice |
getParent()
Return the parent of this DataChoice (may be, and usually is, null). |
Hashtable |
getProperties()
Getter method for the properties hashtable. |
Object |
getProperty(String name)
Return the property, if not found return the null. |
boolean |
getProperty(String name,
boolean dflt)
Return the boolean property, if not found return the dflt. |
String |
getProperty(String name,
String dflt)
Return the String property, if not found return the dflt. |
List |
getSelectedDateTimes()
Get the List of selected times (sub selection of all times). |
String |
getStringId()
Return the toString() value of the id. |
int |
hashCode()
Override the hashCodes method. |
void |
initAfterUnPersistence(Hashtable properties)
This gets called after the data choice has been unpersisted |
boolean |
isEndUserFormula()
Top-level method to determine if this object is an end-user formula. |
static Hashtable |
mergeRequestProperties(Hashtable incoming,
Hashtable fixedRequestProperties)
Merge the given incoming request properties with the ones held by this data choice. |
abstract void |
removeDataChangeListener(DataChangeListener listener)
Remove the DataChangeListener. |
void |
setCategories(List categories)
Set the list of DataCategorys that this DataChoice represents. |
void |
setDataCategories(List categories)
Deprecated. Does nothing now. |
void |
setDataSelection(DataSelection dataSelection)
Set the data time selection for this choice |
void |
setDescription(String desc)
Set the human readable description. |
void |
setFixedRequestProperties(Hashtable value)
Set the FixedRequestProperties property. |
void |
setId(Object theId)
DataChoices typically have some identifying Object associated with them (e.g., a time, a field name, etc.) |
void |
setLevelSelection(Real level)
Set the level |
void |
setName(String newName)
Set the name of this DataChoice. |
void |
setObjectProperty(String name,
Object propertyValue)
Set the String property. |
void |
setParent(DataChoice parent)
Set the parent of this DataChoice. |
void |
setProperties(Hashtable newProperties)
Setter method for the properties hashtable. |
void |
setProperty(String name,
boolean propertyValue)
Set the boolean property. |
void |
setProperty(String name,
String propertyValue)
Set the property. |
void |
setTimeSelection(List times)
Set the time selection for this choice |
String |
toString()
Return the description. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final DataSelection NULL_DATASELECTION
null DataSelection
public static final Hashtable NULL_PROPERTIES
null properties intrinsic
public static final String PROP_REQUESTER
public static final String PROP_ICON
public static final Hashtable NULL_REQUESTPROPERTIES
null request properties intrinsic
protected Hashtable properties
protected DataChoice parent
protected Object id
protected String name
protected String description
| Constructor Detail |
|---|
public DataChoice()
public DataChoice(DataChoice other)
other - The other data choice.
public DataChoice(Object id,
String name,
String description,
List categories)
id - The identifying object.name - The short name of this choice.description - The long description of this choice.categories - List of DataCategorys.
public DataChoice(Object id,
String name,
String description,
List categories,
Hashtable properties)
id - The identifying object.name - The short name of this choice.description - The long description of this choice.categories - List of DataCategorys.properties - The properties for this data choice (may be null).
public DataChoice(Object id,
String description)
id - The identifying object.description - The long description of this choice.
public DataChoice(Object id,
String description,
List categories)
id - The identifying object.description - The long description of this choice.categories - List of DataCategorys.
public DataChoice(Object id,
String description,
DataCategory category)
id - The identifying object.description - The long description of this choice.category - The DataCategory.| Method Detail |
|---|
public static void addCurrentName(Object name)
name - param name to addpublic static List getCurrentNames()
public void initAfterUnPersistence(Hashtable properties)
properties - Propertiespublic void getFinalDataChoices(List dataChoices)
dataChoices - List to put data choices intopublic void getDataSources(List dataSources)
dataSources - List to put data sources intoprotected void addParamNameToCategories()
public void setDataSelection(DataSelection dataSelection)
dataSelection - The data Selectionpublic DataSelection getDataSelection()
public void setTimeSelection(List times)
times - List of timespublic void setLevelSelection(Real level)
level - The levelpublic List getAllLevels()
public List getAllLevels(DataSelection dataSelection)
dataSelection - data selection
public List getAllDateTimes()
public List getSelectedDateTimes()
public static List cloneDataChoices(List listOfChoices)
listOfChoices - The source list of choices.
public final DataChoice createClone()
public abstract DataChoice cloneMe()
public DataChoice getParent()
public void setParent(DataChoice parent)
parent - The new parent of this data choice.public boolean getForUser()
public DataCategory getDisplayCategory()
DataCategory that is meant to be used for displaying
this DataChoice within a UI. For now just return the first category
this is "forDisplay".
public void addCategory(DataCategory newCategory)
DataCategory into the list of data categories.
newCategory - The new DataCategorypublic List getCategories()
DataCategorys that this DataChoice represents.
public List getDataCategories()
public List getDataCategories(boolean excludeDisplayCategories)
excludeDisplayCategories - if true then only return the data categories that are not
display categories
public void setDataCategories(List categories)
categories - The list of data categories.public void setCategories(List categories)
DataCategorys that this DataChoice represents.
categories - The list of data categories.
public final Data getData(DataSelection incomingDataSelection)
throws VisADException,
RemoteException,
DataCancelException
Data object that this DataChoice represents.
Merge this object's DataSelection with the argument
DataSelection (which has higher priority).
incomingDataSelection - Allows one to subset the request.
DataCancelException - if the request to get data is canceled
RemoteException - problem accessing remote data
VisADException - problem creating the Data object
public final Data getData(DataSelection incomingDataSelection,
Hashtable requestProperties)
throws VisADException,
RemoteException,
DataCancelException
Data object that this DataChoice represents.
Merge this object's DataSelection with the argument
DataSelection (which has higher priority).
incomingDataSelection - Allows one to subset the request.requestProperties - The object requesting this data.
DataCancelException - if the request to get data is canceled
RemoteException - problem accessing remote data
VisADException - problem creating the Data object
protected abstract Data getData(DataCategory category,
DataSelection dataSelection,
Hashtable requestProperties)
throws VisADException,
RemoteException,
DataCancelException
Data object that this DataChoice represents.
category - The DataCategory 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
DataCancelException - if the request to get data is canceled
RemoteException - problem accessing remote data
VisADException - problem creating the Data object
public static Hashtable mergeRequestProperties(Hashtable incoming,
Hashtable fixedRequestProperties)
incoming - Incoming choicesfixedRequestProperties - The lower priority hashtable
public int hashCode()
hashCode in class Objectpublic boolean equals(Object other)
equals in class Objectother - Object to check equality.
public boolean basicallyEquals(DataChoice that)
that - The object ot check for equality
public String getStringId()
public String getIndexedName(int index)
DerivedDataChoice uses this to return
the name of the index'th operand.
index - The (0 based) index.
public String getName()
public void setName(String newName)
newName - The new name.public String getDescription()
public void setDescription(String desc)
desc - The new description.public String getFullDescription()
public void setId(Object theId)
theId - The identifying Object.public Object getId()
public String toString()
toString in class Object
public void setProperty(String name,
boolean propertyValue)
name - Property name.propertyValue - boolean property value
public void setObjectProperty(String name,
Object propertyValue)
name - Property name.propertyValue - String property value
public void setProperty(String name,
String propertyValue)
name - Property name.propertyValue - String property value
public boolean getProperty(String name,
boolean dflt)
name - Property name.dflt - The default value.
public String getProperty(String name,
String dflt)
name - Property name.dflt - The default value.
public Object getProperty(String name)
name - Property name.
public Hashtable getProperties()
public void setProperties(Hashtable newProperties)
newProperties - The new Properties table.public abstract void addDataChangeListener(DataChangeListener listener)
DataChangeListener. This is the object that is notify
when the data that this DataChoice represents has changed. This is an
abstract method, the derived classes override it. e.g., the
DerivedDataChoice tells simply passes the listener on to
its set of children DataChoices.
listener - The DataChangeListener to add.public abstract void removeDataChangeListener(DataChangeListener listener)
DataChangeListener.
listener - The DataChangeListener to remove.public boolean isEndUserFormula()
DerivedDataChoice created through the formulas
framework.public void setFixedRequestProperties(Hashtable value)
value - The new value for FixedRequestPropertiespublic Hashtable getFixedRequestProperties()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||