ucar.nc2.thredds
Class DqcRadarDatasetCollection

java.lang.Object
  extended by ucar.nc2.dt.TypedDatasetImpl
      extended by ucar.nc2.dt.radial.StationRadarCollectionImpl
          extended by ucar.nc2.thredds.DqcRadarDatasetCollection
All Implemented Interfaces:
StationRadarCollection, TypedDataset

public class DqcRadarDatasetCollection
extends StationRadarCollectionImpl

Created by IntelliJ IDEA. User: yuanho Date: Feb 14, 2007 Time: 1:09:41 PM To change this template use File | Settings | File Templates.


Nested Class Summary
 class DqcRadarDatasetCollection.DqcRadarDatasetInfo
           
 
Field Summary
 
Fields inherited from class ucar.nc2.dt.radial.StationRadarCollectionImpl
absTimesList, relTimesList, stations, timeUnit
 
Fields inherited from class ucar.nc2.dt.TypedDatasetImpl
boundingBox, dataVariables, desc, endDate, location, ncfile, parseInfo, startDate, title
 
Method Summary
 boolean checkStationProduct(Product product)
          check if the product available for all stations.
 boolean checkStationProduct(java.lang.String sName, Product product)
          check if the product available for one station
static DqcRadarDatasetCollection factory(InvDataset ds, java.lang.String dqc_location, java.lang.StringBuffer errlog)
           
static DqcRadarDatasetCollection factory(java.lang.String desc, java.lang.String dqc_location, java.lang.StringBuffer errlog)
           
 java.util.ArrayList getData(java.lang.String sName, DateSelectionInfo dateInfo)
          Getting data for a single radar station, with time range.
 java.util.ArrayList getData(java.lang.String sName, DateSelectionInfo dateInfo, CancelTask cancel)
          Getting data for a single radar station, with time range.
 DataIterator getDataIterator(int bufferSize)
          Getting data Iterator for a single radar station.
 java.util.ArrayList getDataURIs(java.lang.String sName, DateSelectionInfo dateInfo)
          Getting data URIs for a single radar station, with time range.
 java.util.ArrayList getDataURIs(java.lang.String sName, DateSelectionInfo dateInfo, CancelTask cancel)
          Getting data for a single radar station, with time range and interval.
 java.lang.String getDescription()
          Text information about this dataset.
 java.lang.String getISOTime(java.util.Date d)
           
 java.lang.String getLocationURI()
          The URI location of the dataset
 RadialDatasetSweep getRadarDataset(java.lang.String stnName, java.util.Date absTime)
          Getting dataset for a single radar station.
 java.net.URI getRadarDatasetURI(java.lang.String stnName, java.util.Date absTime)
          Getting URI for a single radar station.
 java.util.List getRadarStations()
          get all radar station.
 java.util.ArrayList getRadarStationTimes(java.lang.String stnName, java.util.Date start, java.util.Date end)
          Getting data URI list for a single radar station.
 java.util.ArrayList getRadarStationURIs(java.lang.String stnName, java.util.Date start, java.util.Date end)
          Getting data Iterator for a single radar station.
 java.util.ArrayList getRadarStationURIs(java.lang.String stnName, java.lang.String rTime)
          Getting URI list for a single radar station.
 int getStationProductCount(java.lang.String sName)
          How many Data Products are available for this Station?
 java.util.List getStations()
          get all radar station.
 java.util.List getStations(CancelTask cancel)
          get all radar station within box.
 java.util.List getStations(LatLonRect boundingBox)
          get all radar station within box.
 java.util.List getStations(LatLonRect boundingBox, CancelTask cancel)
          get all radar station within box.
 java.util.ArrayList getTimeIntervalList(java.util.ArrayList timeList, int interval, int roundTo)
          Getting data URI for a single radar station, with time range and interval.
 java.lang.String getTitle()
          Title of the dataset.
static void main(java.lang.String[] args)
           
static long roundTo(long roundTo, long seconds)
          Getting data for a single radar station, with time range and interval.
protected  void setBoundingBox()
           
protected  void setEndDate()
           
protected  void setStartDate()
           
protected  void setTimeUnits()
           
 
Methods inherited from class ucar.nc2.dt.radial.StationRadarCollectionImpl
getBoundingBox, getStation
 
Methods inherited from class ucar.nc2.dt.TypedDatasetImpl
close, findGlobalAttributeIgnoreCase, getDataVariable, getDataVariables, getDetailInfo, getEndDate, getGlobalAttributes, getNetcdfFile, getStartDate, removeDataVariable, setDescription, setLocationURI, setTitle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

factory

public static DqcRadarDatasetCollection factory(InvDataset ds,
                                                java.lang.String dqc_location,
                                                java.lang.StringBuffer errlog)
                                         throws java.io.IOException
Throws:
java.io.IOException

factory

public static DqcRadarDatasetCollection factory(java.lang.String desc,
                                                java.lang.String dqc_location,
                                                java.lang.StringBuffer errlog)
                                         throws java.io.IOException
Throws:
java.io.IOException

setTimeUnits

protected void setTimeUnits()

setStartDate

protected void setStartDate()
Specified by:
setStartDate in class TypedDatasetImpl

setEndDate

protected void setEndDate()
Specified by:
setEndDate in class TypedDatasetImpl

setBoundingBox

protected void setBoundingBox()
Specified by:
setBoundingBox in class TypedDatasetImpl

getTitle

public java.lang.String getTitle()
Description copied from interface: TypedDataset
Title of the dataset.

Specified by:
getTitle in interface TypedDataset
Overrides:
getTitle in class TypedDatasetImpl

getLocationURI

public java.lang.String getLocationURI()
Description copied from interface: TypedDataset
The URI location of the dataset

Specified by:
getLocationURI in interface TypedDataset
Overrides:
getLocationURI in class TypedDatasetImpl

getDescription

public java.lang.String getDescription()
Description copied from interface: TypedDataset
Text information about this dataset.

Specified by:
getDescription in interface TypedDataset
Overrides:
getDescription in class TypedDatasetImpl

checkStationProduct

public boolean checkStationProduct(java.lang.String sName,
                                   Product product)
Description copied from interface: StationRadarCollection
check if the product available for one station

Returns:
true of false

checkStationProduct

public boolean checkStationProduct(Product product)
Description copied from interface: StationRadarCollection
check if the product available for all stations.

Returns:
true of false

getStationProductCount

public int getStationProductCount(java.lang.String sName)
Description copied from interface: StationRadarCollection
How many Data Products are available for this Station?

Parameters:
sName - station name
Returns:
count or -1 if unknown.

getStations

public java.util.List getStations()
                           throws java.io.IOException
get all radar station.

Specified by:
getStations in interface StationRadarCollection
Overrides:
getStations in class StationRadarCollectionImpl
Returns:
List of type DqcRadarStation objects
Throws:
java.io.IOException - java io exception

getRadarStations

public java.util.List getRadarStations()
get all radar station.

Returns:
List of type DqcRadarStation objects
Throws:
java.io.IOException - java io exception

getStations

public java.util.List getStations(CancelTask cancel)
                           throws java.io.IOException
get all radar station within box.

Overrides:
getStations in class StationRadarCollectionImpl
Parameters:
cancel - allow user to cancel. Implementors should return ASAP.
Returns:
List of type DqcRadarStation objects
Throws:
java.io.IOException - java io exception

getStations

public java.util.List getStations(LatLonRect boundingBox)
                           throws java.io.IOException
get all radar station within box.

Overrides:
getStations in class StationRadarCollectionImpl
Returns:
List of type DqcRadarStation objects
Throws:
java.io.IOException - java io exception

getStations

public java.util.List getStations(LatLonRect boundingBox,
                                  CancelTask cancel)
                           throws java.io.IOException
get all radar station within box.

Specified by:
getStations in interface StationRadarCollection
Overrides:
getStations in class StationRadarCollectionImpl
cancel - allow user to cancel. Implementors should return ASAP.
Returns:
List of type DqcRadarStation objects
Throws:
java.io.IOException - java io exception

getRadarDataset

public RadialDatasetSweep getRadarDataset(java.lang.String stnName,
                                          java.util.Date absTime)
                                   throws java.io.IOException
Getting dataset for a single radar station.

Parameters:
stnName - radar station name
absTime - is absolute time
Returns:
RadialDatasetSweep object
Throws:
java.io.IOException - java io exception

getRadarDatasetURI

public java.net.URI getRadarDatasetURI(java.lang.String stnName,
                                       java.util.Date absTime)
                                throws java.io.IOException
Getting URI for a single radar station.

Parameters:
stnName - radar station name
absTime - is absolute time
Returns:
URI
Throws:
java.io.IOException - java io exception

getRadarStationURIs

public java.util.ArrayList getRadarStationURIs(java.lang.String stnName,
                                               java.lang.String rTime)
                                        throws java.io.IOException
Getting URI list for a single radar station.

Parameters:
stnName - radar station name
rTime - is relative time, such as latest, 1hour
Returns:
list of URIs
Throws:
java.io.IOException - java io exception

getRadarStationURIs

public java.util.ArrayList getRadarStationURIs(java.lang.String stnName,
                                               java.util.Date start,
                                               java.util.Date end)
                                        throws java.io.IOException
Getting data Iterator for a single radar station.

Parameters:
stnName - radar station name
start - of the time
end - of the time
Returns:
data URI list
Throws:
java.io.IOException - java io exception

getRadarStationTimes

public java.util.ArrayList getRadarStationTimes(java.lang.String stnName,
                                                java.util.Date start,
                                                java.util.Date end)
                                         throws java.io.IOException
Getting data URI list for a single radar station.

Parameters:
stnName - radar station name
start - of the time
end - of the time
Returns:
list of URIs
Throws:
java.io.IOException - java io exception

getDataIterator

public DataIterator getDataIterator(int bufferSize)
                             throws java.io.IOException
Getting data Iterator for a single radar station.

Parameters:
bufferSize -
Returns:
data iterator
Throws:
java.io.IOException - java io exception

getDataURIs

public java.util.ArrayList getDataURIs(java.lang.String sName,
                                       DateSelectionInfo dateInfo)
                                throws java.io.IOException
Getting data URIs for a single radar station, with time range.

Parameters:
sName - radar station name
dateInfo - the date selection information
Returns:
list of URIs
Throws:
java.io.IOException

getData

public java.util.ArrayList getData(java.lang.String sName,
                                   DateSelectionInfo dateInfo)
                            throws java.io.IOException
Getting data for a single radar station, with time range.

Parameters:
sName - radar station name
dateInfo - the date time selection information
Returns:
list of radialDatasetSweep
Throws:
java.io.IOException

getData

public java.util.ArrayList getData(java.lang.String sName,
                                   DateSelectionInfo dateInfo,
                                   CancelTask cancel)
                            throws java.io.IOException
Getting data for a single radar station, with time range.

Parameters:
sName - radar station name
dateInfo - the date time selection information
Returns:
list of radialDatasetSweep
Throws:
java.io.IOException

getDataURIs

public java.util.ArrayList getDataURIs(java.lang.String sName,
                                       DateSelectionInfo dateInfo,
                                       CancelTask cancel)
                                throws java.io.IOException
Getting data for a single radar station, with time range and interval.

Parameters:
sName - radar station name
dateInfo - the date information of selection
Returns:
list of radialDatasetSweep
Throws:
java.io.IOException - java io exception

getTimeIntervalList

public java.util.ArrayList getTimeIntervalList(java.util.ArrayList timeList,
                                               int interval,
                                               int roundTo)
                                        throws java.io.IOException
Getting data URI for a single radar station, with time range and interval.

Parameters:
timeList - is the list of time to be parsed
interval - the interval time
roundTo - the round to time
Returns:
list of times
Throws:
java.io.IOException - java io exception

getISOTime

public java.lang.String getISOTime(java.util.Date d)

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

public static void main(java.lang.String[] args)
                 throws java.io.IOException
Throws:
java.io.IOException