ucar.unidata.data.sounding
Class SoundingAdapterImpl

java.lang.Object
  extended by ucar.unidata.beans.InvisiblePropertiedBean
      extended by ucar.unidata.data.sounding.SoundingAdapterImpl
All Implemented Interfaces:
Serializable, PropertiedBean
Direct Known Subclasses:
AddeSoundingAdapter, CMASoundingAdapter, NetcdfSoundingAdapter

public abstract class SoundingAdapterImpl
extends InvisiblePropertiedBean

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
protected  boolean debug
          Debug flag
protected  Defaults defaults
          Defaults for parameters
protected  boolean haveInitialized
          Initialization flag
protected  List soundings
          List of soundings
protected  List stations
          List of stations
protected  List times
          List of times
 
Constructor Summary
SoundingAdapterImpl(String name)
          Construct an empty AddeSoundingAdapter
 
Method Summary
protected  void checkInit()
          Check to see if we have been initialized.
protected  void dbPrint(String s)
          If we are in debug mode then print the string
protected  String getDflt(String prefix, String name, String dflt)
          Get a property value from the Defaults
 SoundingOb getSoundingOb(SoundingStation station)
          Retrieve the first sounding observation found for the given station.
 SoundingOb[] getSoundingObs()
          Retrieve all the sounding observations in the dataset
 DateTime[] getSoundingTimes()
          Retrieve an array of the sounding times available in the dataset.
 List getSoundingTimes(SoundingStation station)
          Retrieves a list of the times in the dataset for a given station.
 List getStations()
          Retrieves a list of the stations in the dataset.
 List getStations(DateTime time)
          Retrieves a list of the stations in the dataset for a given time.
protected  void init()
          Initialize the adapter.
abstract  SoundingOb initSoundingOb(SoundingOb so)
          Initialize a sounding ob
 
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, toString, wait, wait, wait
 

Field Detail

haveInitialized

protected boolean haveInitialized
Initialization flag


debug

protected boolean debug
Debug flag


defaults

protected Defaults defaults
Defaults for parameters


stations

protected List stations
List of stations


soundings

protected List soundings
List of soundings


times

protected List times
List of times

Constructor Detail

SoundingAdapterImpl

public SoundingAdapterImpl(String name)
Construct an empty AddeSoundingAdapter

Parameters:
name - name for this adapter
Method Detail

init

protected void init()
             throws Exception
Initialize the adapter. Set the initialization flag to true. Subclasses should call super.init() after doing what they need to do.

Throws:
Exception - problem initializing

checkInit

protected void checkInit()
Check to see if we have been initialized.


getDflt

protected String getDflt(String prefix,
                         String name,
                         String dflt)
Get a property value from the Defaults

Parameters:
prefix - prefix for property
name - name of property
dflt - default value
Returns:
value for prefix.name or dflt

dbPrint

protected void dbPrint(String s)
If we are in debug mode then print the string

Parameters:
s - string to print

getStations

public List getStations()
Retrieves a list of the stations in the dataset.

Returns:
list of sounding stations or empty list if none found

getStations

public List getStations(DateTime time)
Retrieves a list of the stations in the dataset for a given time.

Parameters:
time - time of observation
Returns:
list of sounding stations or null if none found

initSoundingOb

public abstract SoundingOb initSoundingOb(SoundingOb so)
Initialize a sounding ob

Parameters:
so - ob to initialize
Returns:
initialized observation

getSoundingOb

public SoundingOb getSoundingOb(SoundingStation station)
Retrieve the first sounding observation found for the given station.

Parameters:
station - station to look for
Returns:
first sounding observation for the given station or null if no sounding is available for this station

getSoundingObs

public SoundingOb[] getSoundingObs()
Retrieve all the sounding observations in the dataset

Returns:
all the sounding observations in the dataset or null

getSoundingTimes

public DateTime[] getSoundingTimes()
Retrieve an array of the sounding times available in the dataset.

Returns:
list of timestamps

getSoundingTimes

public List getSoundingTimes(SoundingStation station)
Retrieves a list of the times in the dataset for a given station.

Parameters:
station - station of observation
Returns:
list of times or empty list if none found