ucar.unidata.data
Class UrlDataChoice

java.lang.Object
  extended by ucar.unidata.data.DataChoice
      extended by ucar.unidata.data.UrlDataChoice

public class UrlDataChoice
extends DataChoice

A DataChoice for a URL

Version:
$Revision: 1.15 $
Author:
IDV development team

Field Summary
 
Fields inherited from class ucar.unidata.data.DataChoice
description, id, name, NULL_DATASELECTION, NULL_PROPERTIES, NULL_REQUESTPROPERTIES, parent, PROP_ICON, PROP_REQUESTER, properties
 
Constructor Summary
UrlDataChoice()
          Default Constructor; does nothing
UrlDataChoice(String url)
          Create a UrlDataChoice from the URL
UrlDataChoice(String url, String desc)
          Create a UrlDataChoice.
UrlDataChoice(UrlDataChoice other)
          Create a UrlDataChoice from another.
 
Method Summary
 void addDataChangeListener(DataChangeListener listener)
          Add the data change listener.
 DataChoice cloneMe()
          Override superclass method for creating a clone.
 boolean equals(Object o)
          See if the object in question is equal to this UrlDataChoice.
protected  Data getData(DataCategory category, DataSelection dataSelection, Hashtable requestProperties)
          Implementation of the getData method.
 String getUrl()
          Get the URL for this choice.
 int hashCode()
          Return the hash code for this UrlDataChoice.
 void removeDataChangeListener(DataChangeListener listener)
          Remove the data change listener.
 void setUrl(String value)
          Set the URL for this choice.
 
Methods inherited from class ucar.unidata.data.DataChoice
addCategory, addCurrentName, addParamNameToCategories, basicallyEquals, cloneDataChoices, createClone, getAllDateTimes, getAllLevels, getAllLevels, getCategories, getCurrentNames, getData, getData, getDataCategories, getDataCategories, getDataSelection, getDataSources, getDescription, getDisplayCategory, getFinalDataChoices, getFixedRequestProperties, getForUser, getFullDescription, getId, getIndexedName, getName, getParent, getProperties, getProperty, getProperty, getProperty, getSelectedDateTimes, getStringId, initAfterUnPersistence, isEndUserFormula, mergeRequestProperties, setCategories, setDataCategories, setDataSelection, setDescription, setFixedRequestProperties, setId, setLevelSelection, setName, setObjectProperty, setParent, setProperties, setProperty, setProperty, setTimeSelection, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UrlDataChoice

public UrlDataChoice()
Default Constructor; does nothing


UrlDataChoice

public UrlDataChoice(String url)
Create a UrlDataChoice from the URL

Parameters:
url - URL for this choice

UrlDataChoice

public UrlDataChoice(String url,
                     String desc)
Create a UrlDataChoice.

Parameters:
url - URL (choice ID)
desc - DataChoice description

UrlDataChoice

public UrlDataChoice(UrlDataChoice other)
Create a UrlDataChoice from another.

Parameters:
other - other UrlDataChoice
Method Detail

cloneMe

public DataChoice cloneMe()
Override superclass method for creating a clone.

Specified by:
cloneMe in class DataChoice
Returns:
cloned choice

setUrl

public void setUrl(String value)
Set the URL for this choice. Used by XML encoding

Parameters:
value - URL for choice

getUrl

public String getUrl()
Get the URL for this choice. Used by XML encoding

Returns:
URL for choice

getData

protected Data getData(DataCategory category,
                       DataSelection dataSelection,
                       Hashtable requestProperties)
                throws VisADException,
                       RemoteException,
                       DataCancelException
Implementation of the getData method.

Specified by:
getData in class DataChoice
Parameters:
category - the data category
dataSelection - the selection properties
requestProperties - special request properties
Returns:
the data based on the input parameters
Throws:
DataCancelException - if the request was canceled
RemoteException - Java RMI problem
VisADException - problem creating the Data object

hashCode

public int hashCode()
Return the hash code for this UrlDataChoice.

Overrides:
hashCode in class DataChoice
Returns:
the hash code for this UrlDataChoice

equals

public boolean equals(Object o)
See if the object in question is equal to this UrlDataChoice.

Overrides:
equals in class DataChoice
Parameters:
o - Object in question
Returns:
true if they are equal

addDataChangeListener

public void addDataChangeListener(DataChangeListener listener)
Add the data change listener. Does nothing.

Specified by:
addDataChangeListener in class DataChoice
Parameters:
listener - listener to add

removeDataChangeListener

public void removeDataChangeListener(DataChangeListener listener)
Remove the data change listener. Does nothing.

Specified by:
removeDataChangeListener in class DataChoice
Parameters:
listener - listener to remove