ucar.nc2.dt.point
Class PointObsDatasetImpl

java.lang.Object
  extended by ucar.nc2.dt.TypedDatasetImpl
      extended by ucar.nc2.dt.point.PointObsDatasetImpl
All Implemented Interfaces:
PointCollection, PointObsDataset, TypedDataset
Direct Known Subclasses:
DapperDataset, MadisPointObsDataset, OldUnidataPointObsDataset, StationObsDatasetImpl, UnidataPointObsDataset

public abstract class PointObsDatasetImpl
extends TypedDatasetImpl
implements PointObsDataset

Superclass for implementations of PointObsDataset.

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

Field Summary
protected  DateFormatter formatter
           
protected static SimpleUnit meterUnit
           
protected  DateUnit timeUnit
           
 
Fields inherited from class ucar.nc2.dt.TypedDatasetImpl
boundingBox, dataVariables, desc, endDate, location, ncfile, parseInfo, startDate, title
 
Constructor Summary
PointObsDatasetImpl()
           
PointObsDatasetImpl(NetcdfFile ncfile)
           
PointObsDatasetImpl(java.lang.String title, java.lang.String description, java.lang.String location)
           
 
Method Summary
 java.util.List getData()
          Get all data.
 java.util.List getData(LatLonRect boundingBox)
          Get all data within the specified bounding box.
 java.util.List getData(LatLonRect boundingBox, java.util.Date start, java.util.Date end)
          Get all data within the specified bounding box and date range.
 java.lang.Class getDataClass()
          The getData() methods return objects of this Class
 java.lang.String getDetailInfo()
          Show debug / underlying implementation details
protected static double getMetersConversionFactor(java.lang.String unitsString)
          Get conversion factor for this unit into meters.
 DataType getScientificDataType()
           
protected  double getTime(Variable timeVar, StructureData sdata)
           
 DateUnit getTimeUnits()
          Get the units of Calendar time.
protected abstract  void 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, getDataCount, getDataIterator
 

Field Detail

meterUnit

protected static SimpleUnit meterUnit

timeUnit

protected DateUnit timeUnit

formatter

protected DateFormatter formatter
Constructor Detail

PointObsDatasetImpl

public PointObsDatasetImpl()

PointObsDatasetImpl

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

PointObsDatasetImpl

public PointObsDatasetImpl(NetcdfFile ncfile)
Method Detail

getMetersConversionFactor

protected static double getMetersConversionFactor(java.lang.String unitsString)
                                           throws java.lang.Exception
Get conversion factor for this unit into meters.

Parameters:
unitsString - unit you want to convert
Returns:
conversion factor : value in meters = factor * (value in units)
Throws:
java.lang.Exception - if not valid unit, or not convertible to meters

setTimeUnits

protected abstract void setTimeUnits()

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 TypedDatasetImpl

getScientificDataType

public DataType getScientificDataType()

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

getTimeUnits

public DateUnit getTimeUnits()
Description copied from interface: PointCollection
Get the units of Calendar time. To get a Date, from a time value, call DateUnit.makeDate(double value). To get units as a String, call DateUnit.getUnitsString().

Specified by:
getTimeUnits in interface PointCollection

getData

public java.util.List getData()
                       throws java.io.IOException
Description copied from interface: PointCollection
Get all data. Return null if too expensive to implement. Call getDataCount() to get estimate of size. This will return a list of getDataClass(), but the actual data may or may not already be read in to memory. In any case, you call dataType.getData() to get the data.

Specified by:
getData in interface PointCollection
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)
                       throws java.io.IOException
Description copied from interface: PointCollection
Get all data within the specified bounding box.

Specified by:
getData in interface PointCollection
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)
                       throws java.io.IOException
Description copied from interface: PointCollection
Get all data within the specified bounding box and date range.

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

getTime

protected double getTime(Variable timeVar,
                         StructureData sdata)
                  throws java.text.ParseException
Throws:
java.text.ParseException