Package ucar.unidata.data.radar
Class TDSRadarDatasetCollection
java.lang.Object
ucar.nc2.dt.TypedDatasetImpl
ucar.unidata.data.radar.StationRadarCollectionImpl
ucar.unidata.data.radar.TDSRadarDatasetCollection
- All Implemented Interfaces:
Closeable
,AutoCloseable
,ucar.nc2.dt.TypedDataset
,StationRadarCollection
Client side for getting data from the TDS radar server.
- Author:
- yuan
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass
Class DatasetURIInfo _more_class
Class to hold an InvDataset and a Dateclass
Class to hold some information about TDS Radar Datasets -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final org.jdom2.Namespace
_more_map of station name to stationFields inherited from class ucar.unidata.data.radar.StationRadarCollectionImpl
absTimesList, relTimesList, stations, timeUnit
Fields inherited from class ucar.nc2.dt.TypedDatasetImpl
boundingBox, dataVariables, desc, endDate, location, netcdfDataset, parseInfo, startDate, title
-
Method Summary
Modifier and TypeMethodDescriptionboolean
checkStationProduct
(String sName, Product product) check the exist of a product in this dataset collectionboolean
checkStationProduct
(Product product) check the exist of a product in this dataset collectionstatic TDSRadarDatasetCollection
factory
(String desc, String dsc_location, StringBuffer errlog) tds radar dataset collection factorystatic TDSRadarDatasetCollection
factory
(thredds.catalog.InvDataset ds, String dsc_location, StringBuffer errlog) tds radar dataset collection factorygetData
(String sName, DateSelection dateInfo) Getting data for a single radar station, with time range.getData
(String sName, DateSelection dateSelect, ucar.nc2.util.CancelTask cancel) Getting data for a single radar station, with time range.ucar.nc2.dt.DataIterator
getDataIterator
(int bufferSize) Getting data Iterator for a single radar station.getDataURIs
(String sName, DateSelection dateInfo) Getting data URIs for a single radar station, with time range.getDataURIs
(String sName, DateSelection dateSelect, ucar.nc2.util.CancelTask cancel) getting data uri listget dataset collection descriptionget dataset collection URIucar.nc2.dt.RadialDatasetSweep
getRadarDataset
(String stnName, String productID, Date absTime) Getting dataset for a single radar station.ucar.nc2.dt.RadialDatasetSweep
getRadarDataset
(String stnName, Date absTime) Getting dataset for a single radar station.getRadarDatasetURI
(String stnName, String productID, Date absTime) _more_getRadarDatasetURI
(String stnName, Date absTime) Getting URI for a single radar station.get products of dataset collectionucar.unidata.geoloc.LatLonRect
get bounding box of dataset collectionucar.unidata.geoloc.Station
getRadarStation
(String sName) get one radar station.getRadarStationDatasets
(String stnName, Date start, Date end) Getting data Iterator for a single radar station.List
<ucar.unidata.geoloc.Station> get all radar station.getRadarStationTimes
(String stnName, String productID, Date start, Date end) Getting data URI list for a single radar station.getRadarStationTimes
(String stnName, Date start, Date end) Getting data URI list for a single radar station.getRadarStationURIs
(String stnName, Date start, Date end) Getting data for a single radar station.get start and end time of dataset collectionint
getStationProductCount
(String sName) get the number of productsList
<ucar.unidata.geoloc.Station> get all radar station.List
<ucar.unidata.geoloc.Station> getStations
(ucar.nc2.util.CancelTask cancel) get all radar station within box.List
<ucar.unidata.geoloc.Station> getStations
(ucar.unidata.geoloc.LatLonRect boundingBox) get all radar station within box.List
<ucar.unidata.geoloc.Station> getStations
(ucar.unidata.geoloc.LatLonRect boundingBox, ucar.nc2.util.CancelTask cancel) get all radar station within box.getTitle()
get title of dataset collectionstatic void
Test the programorg.jdom2.Element
readElements
(org.jdom2.Element elem, String eleName) get named element from parent elementreadRadarStations
(String stsXML_location) retrieve all radar stations in this dataset collectionucar.unidata.geoloc.LatLonRect
readSelectRegion
(org.jdom2.Element elem, org.jdom2.Namespace ns) get region from parent elementreadSelectTime
(org.jdom2.Element elem, org.jdom2.Namespace ns) get start and end elemnt form parent elementreadSelectVariable
(org.jdom2.Element elem, org.jdom2.Namespace ns) get variable list from parent elementstatic long
roundTo
(long roundTo, long seconds) Getting data for a single radar station, with time range and interval.protected void
_more_protected void
_more_protected void
_more_protected void
_more_Methods inherited from class ucar.unidata.data.radar.StationRadarCollectionImpl
getBoundingBox, getStation
Methods inherited from class ucar.nc2.dt.TypedDatasetImpl
close, findGlobalAttributeIgnoreCase, getDataVariable, getDataVariables, getDetailInfo, getEndDate, getGlobalAttributes, getLocationURI, getNetcdfFile, getStartDate, removeDataVariable, setDescription, setLocationURI, setTitle
-
Field Details
-
stationHMap
map of station name to station -
defNS
protected static final org.jdom2.Namespace defNS_more_
-
-
Method Details
-
factory
public static TDSRadarDatasetCollection factory(thredds.catalog.InvDataset ds, String dsc_location, StringBuffer errlog) throws IOException, URISyntaxException tds radar dataset collection factory- Parameters:
ds
- _more_dsc_location
- _more_errlog
- _more_- Returns:
- any foctory
- Throws:
IOException
- _more_URISyntaxException
- _more_
-
factory
public static TDSRadarDatasetCollection factory(String desc, String dsc_location, StringBuffer errlog) throws IOException tds radar dataset collection factory- Parameters:
desc
- _more_dsc_location
- _more_errlog
- _more_- Returns:
- dataset collection
- Throws:
IOException
- _more_
-
readRadarStations
public HashMap<String,ucar.unidata.geoloc.Station> readRadarStations(String stsXML_location) throws IOException retrieve all radar stations in this dataset collection- Parameters:
stsXML_location
- _more_- Returns:
- station hashmap
- Throws:
IOException
- _more_
-
readElements
get named element from parent element- Parameters:
elem
- _more_eleName
- _more_- Returns:
- _more_
-
readSelectRegion
public ucar.unidata.geoloc.LatLonRect readSelectRegion(org.jdom2.Element elem, org.jdom2.Namespace ns) get region from parent element- Parameters:
elem
- _more_ns
- _more_- Returns:
- _more_
-
readSelectTime
get start and end elemnt form parent element- Parameters:
elem
- _more_ns
- _more_- Returns:
- list of times
-
readSelectVariable
get variable list from parent element- Parameters:
elem
- _more_ns
- _more_- Returns:
- list of varibles
-
setTimeUnits
protected void setTimeUnits()_more_ -
setStartDate
protected void setStartDate()_more_- Specified by:
setStartDate
in classucar.nc2.dt.TypedDatasetImpl
-
setEndDate
protected void setEndDate()_more_- Specified by:
setEndDate
in classucar.nc2.dt.TypedDatasetImpl
-
setBoundingBox
protected void setBoundingBox()_more_- Specified by:
setBoundingBox
in classucar.nc2.dt.TypedDatasetImpl
-
getTitle
get title of dataset collection- Specified by:
getTitle
in interfaceucar.nc2.dt.TypedDataset
- Overrides:
getTitle
in classucar.nc2.dt.TypedDatasetImpl
- Returns:
- _more_
-
getLocation
get dataset collection URI- Overrides:
getLocation
in classucar.nc2.dt.TypedDatasetImpl
- Returns:
- _more_
-
getDescription
get dataset collection description- Specified by:
getDescription
in interfaceucar.nc2.dt.TypedDataset
- Overrides:
getDescription
in classucar.nc2.dt.TypedDatasetImpl
- Returns:
- _more_
-
getRadarsBoundingBox
public ucar.unidata.geoloc.LatLonRect getRadarsBoundingBox()get bounding box of dataset collection- Returns:
- _more_
-
getRadarTimeSpan
get start and end time of dataset collection- Returns:
- _more_
-
getRadarProducts
get products of dataset collection- Returns:
- _more_
-
checkStationProduct
check the exist of a product in this dataset collection- Specified by:
checkStationProduct
in interfaceStationRadarCollection
- Overrides:
checkStationProduct
in classStationRadarCollectionImpl
- Parameters:
sName
- _more_product
- _more_- Returns:
- _more_
-
checkStationProduct
check the exist of a product in this dataset collection- Parameters:
product
- _more_- Returns:
- _more_
-
getStationProductCount
get the number of products- Parameters:
sName
- _more_- Returns:
- _more_
-
getStations
get all radar station.- Specified by:
getStations
in interfaceStationRadarCollection
- Overrides:
getStations
in classStationRadarCollectionImpl
- Returns:
- List of type Station objects
- Throws:
IOException
- java io exception
-
getRadarStations
get all radar station.- Returns:
- List of type Station objects
-
getRadarStation
get one radar station.- Parameters:
sName
- _more_- Returns:
- Station object
-
getStations
public List<ucar.unidata.geoloc.Station> getStations(ucar.nc2.util.CancelTask cancel) throws IOException get all radar station within box.- Overrides:
getStations
in classStationRadarCollectionImpl
- Parameters:
cancel
- cancel task- Returns:
- List of type Station objects
- Throws:
IOException
- java io exception
-
getStations
public List<ucar.unidata.geoloc.Station> getStations(ucar.unidata.geoloc.LatLonRect boundingBox) throws IOException get all radar station within box.- Overrides:
getStations
in classStationRadarCollectionImpl
- Parameters:
boundingBox
- the bounding box- Returns:
- List of type Station objects
- Throws:
IOException
- java io exception
-
getStations
public List<ucar.unidata.geoloc.Station> getStations(ucar.unidata.geoloc.LatLonRect boundingBox, ucar.nc2.util.CancelTask cancel) throws IOException get all radar station within box.- Specified by:
getStations
in interfaceStationRadarCollection
- Overrides:
getStations
in classStationRadarCollectionImpl
- Parameters:
boundingBox
- the bounding boxcancel
- the cancel task- Returns:
- List Station objects
- Throws:
IOException
- java io exception
-
getRadarDataset
public ucar.nc2.dt.RadialDatasetSweep getRadarDataset(String stnName, Date absTime) throws IOException Getting dataset for a single radar station.- Parameters:
stnName
- radar station nameabsTime
- is absolute time- Returns:
- RadialDatasetSweep object
- Throws:
IOException
- java io exception
-
getRadarDataset
public ucar.nc2.dt.RadialDatasetSweep getRadarDataset(String stnName, String productID, Date absTime) throws IOException Getting dataset for a single radar station.- Parameters:
stnName
- radar station nameproductID
- _more_absTime
- is absolute time- Returns:
- RadialDatasetSweep object
- Throws:
IOException
- java io exception
-
getRadarDatasetURI
Getting URI for a single radar station.- Parameters:
stnName
- radar station nameabsTime
- is absolute time- Returns:
- URI
- Throws:
IOException
- java io exception
-
getRadarDatasetURI
_more_- Parameters:
stnName
- _more_productID
- _more_absTime
- _more_- Returns:
- _more_
- Throws:
IOException
- _more_
-
getRadarStationURIs
Getting data for a single radar station.- Parameters:
stnName
- radar station namestart
- of the timeend
- of the time- Returns:
- data URI list
- Throws:
IOException
- java io exception
-
getRadarStationDatasets
Getting data Iterator for a single radar station.- Parameters:
stnName
- radar station namestart
- of the timeend
- of the time- Returns:
- dataset list
- Throws:
IOException
- java io exception
-
getRadarStationTimes
Getting data URI list for a single radar station.- Parameters:
stnName
- radar station namestart
- of the timeend
- of the time- Returns:
- list of URIs
- Throws:
IOException
- java io exception
-
getRadarStationTimes
public List<Date> getRadarStationTimes(String stnName, String productID, Date start, Date end) throws IOException Getting data URI list for a single radar station.- Parameters:
stnName
- radar station nameproductID
- _more_start
- of the timeend
- of the time- Returns:
- list of URIs
- Throws:
IOException
- java io exception
-
getDataIterator
Getting data Iterator for a single radar station.- Parameters:
bufferSize
-- Returns:
- data iterator
- Throws:
IOException
- java io exception
-
getDataURIs
Getting data URIs for a single radar station, with time range.- Parameters:
sName
- radar station namedateInfo
- the date selection information- Returns:
- list of URIs
- Throws:
IOException
- _more_
-
getData
Getting data for a single radar station, with time range.- Parameters:
sName
- radar station namedateInfo
- the date time selection information- Returns:
- list of radialDatasetSweep
- Throws:
IOException
- _more_
-
getData
public List getData(String sName, DateSelection dateSelect, ucar.nc2.util.CancelTask cancel) throws IOException Getting data for a single radar station, with time range.- Parameters:
sName
- radar station namedateSelect
- the date time selection informationcancel
- _more_- Returns:
- list of radialDatasetSweep
- Throws:
IOException
- _more_
-
getDataURIs
public List<URI> getDataURIs(String sName, DateSelection dateSelect, ucar.nc2.util.CancelTask cancel) throws IOException getting data uri list- Parameters:
sName
- station namedateSelect
- the date selectioncancel
- the cancel task- Returns:
- the list of URIs
- Throws:
IOException
- problem reading URIs
-
roundTo
public static long roundTo(long roundTo, long seconds) Getting data for a single radar station, with time range and interval.- Parameters:
roundTo
-seconds
- to be round to- Returns:
- round to second
-
main
Test the program- Parameters:
args
- the args- Throws:
IOException
- _more_
-