ucar.unidata.data.sounding
Class AddeSoundingAdapter

java.lang.Object
  extended by ucar.unidata.beans.InvisiblePropertiedBean
      extended by ucar.unidata.data.sounding.SoundingAdapterImpl
          extended by ucar.unidata.data.sounding.AddeSoundingAdapter
All Implemented Interfaces:
Serializable, PropertiedBean, SoundingAdapter

public class AddeSoundingAdapter
extends SoundingAdapterImpl
implements SoundingAdapter

Class for retrieving upper air data from an ADDE remote server. Creates a SoundingOb for each of the stations on the remote server for the latest available data.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class ucar.unidata.data.sounding.SoundingAdapterImpl
debug, defaults, haveInitialized, soundings, stations, times
 
Constructor Summary
AddeSoundingAdapter()
          Construct an empty AddeSoundingAdapter
AddeSoundingAdapter(String server)
          Retreive upper air data from a remote ADDE server using only mandatory data.
AddeSoundingAdapter(String server, String dataset)
          Retreive upper air data from a remote ADDE server using only mandatory data.
AddeSoundingAdapter(String server, String mandDataset, String sigDataset)
          Retreive upper air data from a remote ADDE server using only mandatory data.
AddeSoundingAdapter(String server, String mandDataset, String sigDataset, boolean mainHours)
          Retreive upper air data from a remote ADDE server using only mandatory data.
 
Method Summary
 String getMandatoryURL(SoundingOb sound)
          Make the mandatory levels URL for the given sounding
 String getMandDataset()
          Set the mandatory data set name
 String getSigDataset()
          Get the significant data set name
 String getSigURL(SoundingOb sound)
          Make the url for the significant levels for the sounding
 String getSource()
          Get the source of the data (server)
protected  void init()
          Initialize the class.
 SoundingOb initSoundingOb(SoundingOb sound)
          Check to see if the RAOB has any data
static void main(String[] args)
          test by running java ucar.unidata.data.sounding.AddeSoundingAdapter
 void setMandDataset(String value)
          Set the mandatory data set name
 void setSigDataset(String value)
          Set the significant data set name
 void setSource(String server)
          Set the ADDE server name
 String toString()
          The string representation
 void update()
          Update this adapter for new data
 
Methods inherited from class ucar.unidata.data.sounding.SoundingAdapterImpl
checkInit, dbPrint, getDflt, getSoundingOb, getSoundingObs, getSoundingTimes, getSoundingTimes, getStations, getStations
 
Methods inherited from class ucar.unidata.beans.InvisiblePropertiedBean
addProperty, addPropertyChangeListener, addPropertyChangeListener, disablePropertyChangeEvents, enablePropertyChangeEvents, getTitle, removePropertyChangeListener, removePropertyChangeListener, setTitle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface ucar.unidata.data.sounding.SoundingAdapter
getSoundingObs, getSoundingTimes, getSoundingTimes, getStations, getStations
 

Constructor Detail

AddeSoundingAdapter

public AddeSoundingAdapter()
Construct an empty AddeSoundingAdapter


AddeSoundingAdapter

public AddeSoundingAdapter(String server)
                    throws Exception
Retreive upper air data from a remote ADDE server using only mandatory data.

Parameters:
server - name or IP address of remote server
Throws:
Exception - (AddeException) if there is no data available or there is trouble connecting to the remote server

AddeSoundingAdapter

public AddeSoundingAdapter(String server,
                           String dataset)
                    throws Exception
Retreive upper air data from a remote ADDE server using only mandatory data.

Parameters:
server - name or IP address of remote server
dataset - name of ADDE dataset (group/descriptor)
Throws:
Exception - (AddeException) if there is no data available or there is trouble connecting to the remote server

AddeSoundingAdapter

public AddeSoundingAdapter(String server,
                           String mandDataset,
                           String sigDataset)
                    throws Exception
Retreive upper air data from a remote ADDE server using only mandatory data.

Parameters:
server - name or IP address of remote server
mandDataset - name of mandatory level upper air ADDE dataset (group/descriptor)
sigDataset - name of significant level upper air ADDE dataset (group/descriptor)
Throws:
Exception - (AddeException) if there is no data available or there is trouble connecting to the remote server

AddeSoundingAdapter

public AddeSoundingAdapter(String server,
                           String mandDataset,
                           String sigDataset,
                           boolean mainHours)
                    throws Exception
Retreive upper air data from a remote ADDE server using only mandatory data.

Parameters:
server - name or IP address of remote server
mandDataset - name of mandatory level upper air ADDE dataset (group/descriptor)
sigDataset - name of significant level upper air ADDE dataset (group/descriptor)
mainHours - only get data for main (00 & 12Z) hours
Throws:
Exception - (AddeException) if there is no data available or there is trouble connecting to the remote server
Method Detail

init

protected void init()
             throws Exception
Initialize the class. Populate the variable list and get the server and dataset information.

Overrides:
init in class SoundingAdapterImpl
Throws:
Exception - problem occurred

update

public void update()
Update this adapter for new data

Specified by:
update in interface SoundingAdapter

setSource

public void setSource(String server)
Set the ADDE server name

Specified by:
setSource in interface SoundingAdapter
Parameters:
server - server name or IP address

getSource

public String getSource()
Get the source of the data (server)

Specified by:
getSource in interface SoundingAdapter
Returns:
server name or IP address

setMandDataset

public void setMandDataset(String value)
Set the mandatory data set name

Parameters:
value - mandatory data set name

getMandDataset

public String getMandDataset()
Set the mandatory data set name

Returns:
the mandatory data set name

setSigDataset

public void setSigDataset(String value)
Set the significant data set name

Parameters:
value - the significant data set name

getSigDataset

public String getSigDataset()
Get the significant data set name

Returns:
the significant data set name

initSoundingOb

public SoundingOb initSoundingOb(SoundingOb sound)
Check to see if the RAOB has any data

Specified by:
initSoundingOb in interface SoundingAdapter
Specified by:
initSoundingOb in class SoundingAdapterImpl
Parameters:
sound - sounding to check
Returns:
a sounding with data

getMandatoryURL

public String getMandatoryURL(SoundingOb sound)
Make the mandatory levels URL for the given sounding

Parameters:
sound - sounding
Returns:
mandatory url

getSigURL

public String getSigURL(SoundingOb sound)
Make the url for the significant levels for the sounding

Parameters:
sound - the sounding
Returns:
sig url

main

public static void main(String[] args)
test by running java ucar.unidata.data.sounding.AddeSoundingAdapter

Parameters:
args - array of arguments. Takes up to 3 arguments as "server mandatory dataset significant dataset" Use "x" for any of these arguments to use the default.

toString

public String toString()
The string representation

Overrides:
toString in class Object
Returns:
The string