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 TypeClassDescriptionclassClass DatasetURIInfo _more_classClass to hold an InvDataset and a DateclassClass 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, timeUnitFields inherited from class ucar.nc2.dt.TypedDatasetImpl
boundingBox, dataVariables, desc, endDate, location, netcdfDataset, parseInfo, startDate, title - 
Method Summary
Modifier and TypeMethodDescriptionbooleancheckStationProduct(String sName, Product product) check the exist of a product in this dataset collectionbooleancheckStationProduct(Product product) check the exist of a product in this dataset collectionstatic TDSRadarDatasetCollectionfactory(String desc, String dsc_location, StringBuffer errlog) tds radar dataset collection factorystatic TDSRadarDatasetCollectionfactory(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.DataIteratorgetDataIterator(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.RadialDatasetSweepgetRadarDataset(String stnName, String productID, Date absTime) Getting dataset for a single radar station.ucar.nc2.dt.RadialDatasetSweepgetRadarDataset(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.LatLonRectget bounding box of dataset collectionucar.unidata.geoloc.StationgetRadarStation(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 collectionintgetStationProductCount(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 voidTest the programprotected ucar.nc2.units.DateTypemakeDateType(String text, String format, String type) protected thredds.catalog.ThreddsMetadata.VocabreadControlledVocabulary(org.jdom2.Element elem) protected ucar.nc2.units.DateTypereadDate(org.jdom2.Element elem) protected doublereadDouble(org.jdom2.Element elem) protected ucar.nc2.units.TimeDurationreadDuration(org.jdom2.Element elem) org.jdom2.ElementreadElements(org.jdom2.Element elem, String eleName) get named element from parent elementprotected thredds.catalog.ThreddsMetadata.GeospatialCoveragereadGeospatialCoverage(org.jdom2.Element gcElem) protected thredds.catalog.ThreddsMetadata.RangereadGeospatialRange(org.jdom2.Element spElem, String defUnits) readRadarStations(String stsXML_location) retrieve all radar stations in this dataset collectionucar.unidata.geoloc.LatLonRectreadSelectRegion(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 elementprotected ucar.nc2.units.DateRangereadTimeCoverage(org.jdom2.Element tElem, org.jdom2.Namespace ns) static longroundTo(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, getStationMethods 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
 
 - 
readGeospatialCoverage
protected thredds.catalog.ThreddsMetadata.GeospatialCoverage readGeospatialCoverage(org.jdom2.Element gcElem)  - 
readGeospatialRange
protected thredds.catalog.ThreddsMetadata.Range readGeospatialRange(org.jdom2.Element spElem, String defUnits)  - 
readDouble
protected double readDouble(org.jdom2.Element elem)  - 
readControlledVocabulary
protected thredds.catalog.ThreddsMetadata.Vocab readControlledVocabulary(org.jdom2.Element elem)  - 
readTimeCoverage
protected ucar.nc2.units.DateRange readTimeCoverage(org.jdom2.Element tElem, org.jdom2.Namespace ns)  - 
readDate
protected ucar.nc2.units.DateType readDate(org.jdom2.Element elem)  - 
makeDateType
 - 
readDuration
protected ucar.nc2.units.TimeDuration readDuration(org.jdom2.Element elem)  - 
setTimeUnits
protected void setTimeUnits()_more_ - 
setStartDate
protected void setStartDate()_more_- Specified by:
 setStartDatein classucar.nc2.dt.TypedDatasetImpl
 - 
setEndDate
protected void setEndDate()_more_- Specified by:
 setEndDatein classucar.nc2.dt.TypedDatasetImpl
 - 
setBoundingBox
protected void setBoundingBox()_more_- Specified by:
 setBoundingBoxin classucar.nc2.dt.TypedDatasetImpl
 - 
getTitle
get title of dataset collection- Specified by:
 getTitlein interfaceucar.nc2.dt.TypedDataset- Overrides:
 getTitlein classucar.nc2.dt.TypedDatasetImpl- Returns:
 - _more_
 
 - 
getLocation
get dataset collection URI- Overrides:
 getLocationin classucar.nc2.dt.TypedDatasetImpl- Returns:
 - _more_
 
 - 
getDescription
get dataset collection description- Specified by:
 getDescriptionin interfaceucar.nc2.dt.TypedDataset- Overrides:
 getDescriptionin 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:
 checkStationProductin interfaceStationRadarCollection- Overrides:
 checkStationProductin 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:
 getStationsin interfaceStationRadarCollection- Overrides:
 getStationsin 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:
 getStationsin 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:
 getStationsin 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:
 getStationsin interfaceStationRadarCollection- Overrides:
 getStationsin 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_
 
 -