ucar.nc2.dt.point
Class StationObsDatasetImpl

java.lang.Object
  extended by ucar.nc2.dt.TypedDatasetImpl
      extended by ucar.nc2.dt.point.PointObsDatasetImpl
          extended by ucar.nc2.dt.point.StationObsDatasetImpl
All Implemented Interfaces:
PointCollection, PointObsDataset, StationCollection, StationObsDataset, TypedDataset
Direct Known Subclasses:
AddeStationObsDataset, DqcStationObsDataset, MadisStationObsDataset, NdbcDataset, OldUnidataStationObsDataset, SequenceObsDataset, UnidataStationObsDataset, UnidataStationObsDataset2

public abstract class StationObsDatasetImpl
extends PointObsDatasetImpl
implements StationObsDataset

Superclass for implementations of StationObsDataset. Subclass needs to:

  • fill the station array
  • implement getData( Station s, CancelTask)

    Version:
    $Revision:51 $ $Date:2006-07-12 17:13:13Z $
    Author:
    caron

    Field Summary
    protected  StationDatasetHelper stationHelper
               
    protected  java.util.ArrayList stations
               
     
    Fields inherited from class ucar.nc2.dt.point.PointObsDatasetImpl
    formatter, meterUnit, timeUnit
     
    Fields inherited from class ucar.nc2.dt.TypedDatasetImpl
    boundingBox, dataVariables, desc, endDate, location, ncfile, parseInfo, startDate, title
     
    Constructor Summary
    StationObsDatasetImpl()
               
    StationObsDatasetImpl(NetcdfFile ncfile)
               
    StationObsDatasetImpl(java.lang.String title, java.lang.String description, java.lang.String location)
               
     
    Method Summary
     java.util.List getData(LatLonRect boundingBox, CancelTask cancel)
              Get all data within the specified bounding box, allow user to cancel.
     java.util.List getData(LatLonRect boundingBox, java.util.Date start, java.util.Date end, CancelTask cancel)
              Get all data within the specified bounding box and date range, allow user to cancel.
     java.util.List getData(java.util.List stations)
              Get all data for a list of Stations.
     java.util.List getData(java.util.List stations, CancelTask cancel)
              Get all data for a list of Stations, allow user to cancel.
     java.util.List getData(java.util.List stations, java.util.Date start, java.util.Date end)
              Get data for a list of Stations within the specified date range.
     java.util.List getData(java.util.List stations, java.util.Date start, java.util.Date end, CancelTask cancel)
              Get data for a list of Stations within the specified date range, allow user to cancel.
     java.util.List getData(Station s)
              Get all data for this Station.
     java.util.List getData(Station s, java.util.Date start, java.util.Date end)
              Get data for this Station within the specified date range.
     java.util.List getData(Station s, java.util.Date start, java.util.Date end, CancelTask cancel)
              Get data for this Station within the specified date range, allow user to cancel.
     java.lang.Class getDataClass()
              The getData() methods return objects of this Class
     DataIterator getDataIterator(Station s)
              Get all data for this Station.
     DataIterator getDataIterator(Station s, java.util.Date start, java.util.Date end)
              Get data for this Station within the specified date range.
     java.lang.String getDetailInfo()
              Show debug / underlying implementation details
     DataType getScientificDataType()
               
     Station getStation(java.lang.String id)
              Find a Station by name
     int getStationDataCount(Station s)
              How many Data objects are available for this Station?
     java.util.List getStations()
              Get all the Stations in the collection.
     java.util.List getStations(CancelTask cancel)
              Get all the Stations in the collection, allow user to cancel.
     java.util.List getStations(LatLonRect boundingBox)
              Get all the Stations within a bounding box.
     java.util.List getStations(LatLonRect boundingBox, CancelTask cancel)
              Get all the Stations within a bounding box, allow user to cancel.
     void sortByTime(java.util.List stationObs)
               
     
    Methods inherited from class ucar.nc2.dt.point.PointObsDatasetImpl
    getData, getData, getData, getMetersConversionFactor, getTime, getTimeUnits, setTimeUnits
     
    Methods inherited from class ucar.nc2.dt.TypedDatasetImpl
    close, findGlobalAttributeIgnoreCase, getBoundingBox, getDataVariable, getDataVariables, getDescription, getEndDate, getGlobalAttributes, getLocationURI, getNetcdfFile, getStartDate, getTitle, removeDataVariable, setBoundingBox, setDescription, setEndDate, setLocationURI, setStartDate, setTitle
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     
    Methods inherited from interface ucar.nc2.dt.TypedDataset
    close, findGlobalAttributeIgnoreCase, getBoundingBox, getDataVariable, getDataVariables, getDescription, getEndDate, getGlobalAttributes, getLocationURI, getNetcdfFile, getStartDate, getTitle
     
    Methods inherited from interface ucar.nc2.dt.PointCollection
    getData, getData, getData, getData, getDataCount, getDataIterator, getTimeUnits
     
    Methods inherited from interface ucar.nc2.dt.StationCollection
    getData
     
    Methods inherited from interface ucar.nc2.dt.PointCollection
    getData, getData, getData, getData, getDataCount, getDataIterator, getTimeUnits
     

    Field Detail

    stationHelper

    protected StationDatasetHelper stationHelper

    stations

    protected java.util.ArrayList stations
    Constructor Detail

    StationObsDatasetImpl

    public StationObsDatasetImpl()

    StationObsDatasetImpl

    public StationObsDatasetImpl(java.lang.String title,
                                 java.lang.String description,
                                 java.lang.String location)

    StationObsDatasetImpl

    public StationObsDatasetImpl(NetcdfFile ncfile)
    Method Detail

    getDetailInfo

    public java.lang.String getDetailInfo()
    Description copied from interface: TypedDataset
    Show debug / underlying implementation details

    Specified by:
    getDetailInfo in interface TypedDataset
    Overrides:
    getDetailInfo in class PointObsDatasetImpl

    getScientificDataType

    public DataType getScientificDataType()
    Overrides:
    getScientificDataType in class PointObsDatasetImpl

    getDataClass

    public java.lang.Class getDataClass()
    Description copied from interface: PointCollection
    The getData() methods return objects of this Class

    Specified by:
    getDataClass in interface PointCollection
    Overrides:
    getDataClass in class PointObsDatasetImpl

    getStations

    public java.util.List getStations()
                               throws java.io.IOException
    Description copied from interface: StationCollection
    Get all the Stations in the collection.

    Specified by:
    getStations in interface StationCollection
    Returns:
    List of Station
    Throws:
    java.io.IOException

    getStations

    public java.util.List getStations(CancelTask cancel)
                               throws java.io.IOException
    Description copied from interface: StationCollection
    Get all the Stations in the collection, allow user to cancel.

    Specified by:
    getStations in interface StationCollection
    Parameters:
    cancel - allow user to cancel. Implementors should return ASAP.
    Returns:
    List of Station
    Throws:
    java.io.IOException

    getStations

    public java.util.List getStations(LatLonRect boundingBox)
                               throws java.io.IOException
    Description copied from interface: StationCollection
    Get all the Stations within a bounding box.

    Specified by:
    getStations in interface StationCollection
    Returns:
    List of Station
    Throws:
    java.io.IOException

    getStations

    public java.util.List getStations(LatLonRect boundingBox,
                                      CancelTask cancel)
                               throws java.io.IOException
    Description copied from interface: StationCollection
    Get all the Stations within a bounding box, allow user to cancel.

    Specified by:
    getStations in interface StationCollection
    cancel - allow user to cancel. Implementors should return ASAP.
    Returns:
    List of Station
    Throws:
    java.io.IOException

    getStation

    public Station getStation(java.lang.String id)
    Description copied from interface: StationCollection
    Find a Station by name

    Specified by:
    getStation in interface StationCollection

    getStationDataCount

    public int getStationDataCount(Station s)
    Description copied from interface: StationCollection
    How many Data objects are available for this Station?

    Specified by:
    getStationDataCount in interface StationCollection
    Parameters:
    s - station
    Returns:
    count or -1 if unknown.

    getData

    public java.util.List getData(Station s)
                           throws java.io.IOException
    Description copied from interface: StationCollection
    Get all data for this Station.

    Specified by:
    getData in interface StationCollection
    Returns:
    List of getDataClass()
    Throws:
    java.io.IOException

    getData

    public java.util.List getData(Station s,
                                  java.util.Date start,
                                  java.util.Date end)
                           throws java.io.IOException
    Description copied from interface: StationCollection
    Get data for this Station within the specified date range.

    Specified by:
    getData in interface StationCollection
    Returns:
    List of getDataClass()
    Throws:
    java.io.IOException

    getData

    public java.util.List getData(Station s,
                                  java.util.Date start,
                                  java.util.Date end,
                                  CancelTask cancel)
                           throws java.io.IOException
    Description copied from interface: StationCollection
    Get data for this Station within the specified date range, allow user to cancel.

    Specified by:
    getData in interface StationCollection
    cancel - allow user to cancel. Implementors should return ASAP.
    Returns:
    List of getDataClass()
    Throws:
    java.io.IOException

    getData

    public java.util.List getData(java.util.List stations)
                           throws java.io.IOException
    Description copied from interface: StationCollection
    Get all data for a list of Stations.

    Specified by:
    getData in interface StationCollection
    Returns:
    List of getDataClass()
    Throws:
    java.io.IOException
    See Also:
    as a (possibly) more efficient alternative

    getData

    public java.util.List getData(java.util.List stations,
                                  CancelTask cancel)
                           throws java.io.IOException
    Description copied from interface: StationCollection
    Get all data for a list of Stations, allow user to cancel.

    Specified by:
    getData in interface StationCollection
    cancel - allow user to cancel. Implementors should return ASAP.
    Returns:
    List of getDataClass()
    Throws:
    java.io.IOException
    See Also:
    as a (possibly) more efficient alternative

    getData

    public java.util.List getData(java.util.List stations,
                                  java.util.Date start,
                                  java.util.Date end)
                           throws java.io.IOException
    Description copied from interface: StationCollection
    Get data for a list of Stations within the specified date range.

    Specified by:
    getData in interface StationCollection
    Returns:
    List of getDataClass()
    Throws:
    java.io.IOException
    See Also:
    as a (possibly) more efficient alternative

    getData

    public java.util.List getData(java.util.List stations,
                                  java.util.Date start,
                                  java.util.Date end,
                                  CancelTask cancel)
                           throws java.io.IOException
    Description copied from interface: StationCollection
    Get data for a list of Stations within the specified date range, allow user to cancel.

    Specified by:
    getData in interface StationCollection
    cancel - allow user to cancel. Implementors should return ASAP.
    Returns:
    List of getDataClass()
    Throws:
    java.io.IOException
    See Also:
    as a (possibly) more efficient alternative

    getData

    public java.util.List getData(LatLonRect boundingBox,
                                  CancelTask cancel)
                           throws java.io.IOException
    Description copied from interface: PointCollection
    Get all data within the specified bounding box, allow user to cancel.

    Specified by:
    getData in interface PointCollection
    cancel - allow user to cancel. Implementors should return ASAP.
    Returns:
    List of type getDataClass()
    Throws:
    java.io.IOException
    See Also:
    as a (possibly) more efficient alternative

    getData

    public java.util.List getData(LatLonRect boundingBox,
                                  java.util.Date start,
                                  java.util.Date end,
                                  CancelTask cancel)
                           throws java.io.IOException
    Description copied from interface: PointCollection
    Get all data within the specified bounding box and date range, allow user to cancel.

    Specified by:
    getData in interface PointCollection
    cancel - allow user to cancel. Implementors should return ASAP.
    Returns:
    List of type getDataClass()
    Throws:
    java.io.IOException
    See Also:
    as a (possibly) more efficient alternative

    sortByTime

    public void sortByTime(java.util.List stationObs)

    getDataIterator

    public DataIterator getDataIterator(Station s)
    Description copied from interface: StationCollection
    Get all data for this Station.

    Specified by:
    getDataIterator in interface StationCollection
    Returns:
    iterator over type getDataClass()

    getDataIterator

    public DataIterator getDataIterator(Station s,
                                        java.util.Date start,
                                        java.util.Date end)
    Get data for this Station within the specified date range.

    Specified by:
    getDataIterator in interface StationCollection
    Returns:
    Iterator over type getDataClass()