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, CFstationObsDataset, DqcStationObsDataset, MadisStationObsDataset, NdbcDataset, OldUnidataStationObsDataset, SequenceObsDataset, UnidataStationObsDataset, UnidataStationObsDataset2, UnidataStationObsMultidimDataset

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)

    Author:
    caron

    Field Summary
    protected  StationDatasetHelper stationHelper
               
    protected  List<Station> stations
               
     
    Fields inherited from class ucar.nc2.dt.point.PointObsDatasetImpl
    formatter, timeUnit
     
    Fields inherited from class ucar.nc2.dt.TypedDatasetImpl
    boundingBox, dataVariables, desc, endDate, location, ncfile, parseInfo, startDate, title
     
    Constructor Summary
    StationObsDatasetImpl()
               
    StationObsDatasetImpl(NetcdfDataset ncfile)
               
    StationObsDatasetImpl(String title, String description, String location)
               
     
    Method Summary
     List getData(LatLonRect boundingBox, CancelTask cancel)
              Get all data within the specified bounding box, allow user to cancel.
     List getData(LatLonRect boundingBox, Date start, Date end, CancelTask cancel)
              Get all data within the specified bounding box and date range, allow user to cancel.
     List getData(List<Station> stations)
              Get all data for a list of Stations.
     List getData(List<Station> stations, CancelTask cancel)
              Get all data for a list of Stations, allow user to cancel.
     List getData(List<Station> stations, Date start, Date end)
              Get data for a list of Stations within the specified date range.
     List getData(List<Station> stations, Date start, Date end, CancelTask cancel)
              Get data for a list of Stations within the specified date range, allow user to cancel.
     List getData(Station s)
              Get all data for this Station.
     List getData(Station s, Date start, Date end)
              Get data for this Station within the specified date range.
     List getData(Station s, Date start, Date end, CancelTask cancel)
              Get data for this Station within the specified date range, allow user to cancel.
     Class getDataClass()
              The getData() methods return objects of this Class
     DataIterator getDataIterator(Station s)
              Get all data for this Station.
     DataIterator getDataIterator(Station s, Date start, Date end)
              Get data for this Station within the specified date range.
     String getDetailInfo()
               
     FeatureType getScientificDataType()
               
     Station getStation(String id)
              Find a Station by name
     int getStationDataCount(Station s)
              How many Data objects are available for this Station?
     List<Station> getStations()
              Get all the Stations in the collection.
     List<Station> getStations(CancelTask cancel)
              Get all the Stations in the collection, allow user to cancel.
     List<Station> getStations(LatLonRect boundingBox)
              Get all the Stations within a bounding box.
     List<Station> getStations(LatLonRect boundingBox, CancelTask cancel)
              Get all the Stations within a bounding box, allow user to cancel.
     void sortByTime(List<StationObsDatatype> 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, getLocation, 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.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 List<Station> stations
    Constructor Detail

    StationObsDatasetImpl

    public StationObsDatasetImpl()

    StationObsDatasetImpl

    public StationObsDatasetImpl(String title,
                                 String description,
                                 String location)

    StationObsDatasetImpl

    public StationObsDatasetImpl(NetcdfDataset ncfile)
    Method Detail

    getDetailInfo

    public String getDetailInfo()
    Specified by:
    getDetailInfo in interface TypedDataset
    Overrides:
    getDetailInfo in class PointObsDatasetImpl
    Returns:
    debug / underlying implementation details

    getScientificDataType

    public FeatureType getScientificDataType()
    Overrides:
    getScientificDataType in class PointObsDatasetImpl

    getDataClass

    public 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
    Returns:
    Class of the data

    getStations

    public List<Station> getStations()
                              throws IOException
    Description copied from interface: StationCollection
    Get all the Stations in the collection.

    Specified by:
    getStations in interface StationCollection
    Returns:
    List of Station
    Throws:
    IOException - on io error

    getStations

    public List<Station> getStations(CancelTask cancel)
                              throws 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:
    IOException - on io error

    getStations

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

    Specified by:
    getStations in interface StationCollection
    Parameters:
    boundingBox - restrict data to this bounding nox
    Returns:
    List of Station
    Throws:
    IOException - on io error

    getStations

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

    Specified by:
    getStations in interface StationCollection
    Parameters:
    boundingBox - restrict data to this bounding nox
    cancel - allow user to cancel. Implementors should return ASAP.
    Returns:
    List of Station
    Throws:
    IOException - on io error

    getStation

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

    Specified by:
    getStation in interface StationCollection
    Parameters:
    id - find this name
    Returns:
    Station, or null

    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 List getData(Station s)
                 throws IOException
    Description copied from interface: StationCollection
    Get all data for this Station.

    Specified by:
    getData in interface StationCollection
    Parameters:
    s - for this Station
    Returns:
    List of getDataClass()
    Throws:
    IOException - on io error

    getData

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

    Specified by:
    getData in interface StationCollection
    Parameters:
    s - for this Station
    start - restrict data to after this time
    end - restrict data to before this time
    Returns:
    List of getDataClass()
    Throws:
    IOException - on io error

    getData

    public List getData(Station s,
                        Date start,
                        Date end,
                        CancelTask cancel)
                 throws 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
    Parameters:
    s - for this Station
    start - restrict data to after this time
    end - restrict data to before this time
    cancel - allow user to cancel. Implementors should return ASAP.
    Returns:
    List of getDataClass()
    Throws:
    IOException - on io error

    getData

    public List getData(List<Station> stations)
                 throws IOException
    Description copied from interface: StationCollection
    Get all data for a list of Stations.

    Specified by:
    getData in interface StationCollection
    Parameters:
    stations - for these Stations
    Returns:
    List of getDataClass()
    Throws:
    IOException - on io error
    See Also:
    as a (possibly) more efficient alternative

    getData

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

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

    getData

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

    Specified by:
    getData in interface StationCollection
    Parameters:
    stations - for these Stations
    start - restrict data to after this time
    end - restrict data to before this time
    Returns:
    List of getDataClass()
    Throws:
    IOException - on io error
    See Also:
    as a (possibly) more efficient alternative

    getData

    public List getData(List<Station> stations,
                        Date start,
                        Date end,
                        CancelTask cancel)
                 throws 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
    Parameters:
    stations - for these Stations
    start - restrict data to after this time
    end - restrict data to before this time
    cancel - allow user to cancel. Implementors should return ASAP.
    Returns:
    List of getDataClass()
    Throws:
    IOException - on io error
    See Also:
    as a (possibly) more efficient alternative

    getData

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

    Specified by:
    getData in interface PointCollection
    Parameters:
    boundingBox - restrict data to this bounding nox
    cancel - allow user to cancel. Implementors should return ASAP.
    Returns:
    List of type getDataClass()
    Throws:
    IOException - on io error
    See Also:
    as a (possibly) more efficient alternative

    getData

    public List getData(LatLonRect boundingBox,
                        Date start,
                        Date end,
                        CancelTask cancel)
                 throws 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
    Parameters:
    boundingBox - restrict data to this bounding nox
    start - restrict data to after this time
    end - restrict data to before this time
    cancel - allow user to cancel. Implementors should return ASAP.
    Returns:
    List of type getDataClass()
    Throws:
    IOException - on io error
    See Also:
    as a (possibly) more efficient alternative

    sortByTime

    public void sortByTime(List<StationObsDatatype> stationObs)

    getDataIterator

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

    Specified by:
    getDataIterator in interface StationCollection
    Parameters:
    s - for this Station
    Returns:
    iterator over type getDataClass()

    getDataIterator

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

    Specified by:
    getDataIterator in interface StationCollection
    Parameters:
    s - for this Station
    start - restrict data to after this time
    end - restrict data to before this time
    Returns:
    Iterator over type getDataClass()


    Copyright © 1999-2011 UCAR/Unidata. All Rights Reserved.