ucar.nc2.dt
Class TypedDatasetImpl

java.lang.Object
  extended by ucar.nc2.dt.TypedDatasetImpl
All Implemented Interfaces:
TypedDataset
Direct Known Subclasses:
MultiTrajectoryObsDataset, PointObsDatasetImpl, RadialDatasetSweepAdapter, SingleTrajectoryObsDataset, StationRadarCollectionImpl, UnidataTrajectoryObsDataset2

public abstract class TypedDatasetImpl
extends java.lang.Object
implements TypedDataset

Superclass for implementations of TypedDataset.

Author:
John Caron

Field Summary
protected  LatLonRect boundingBox
           
protected  java.util.List<VariableSimpleIF> dataVariables
           
protected  java.lang.String desc
           
protected  java.util.Date endDate
           
protected  java.lang.String location
           
protected  NetcdfDataset ncfile
           
protected  java.lang.StringBuffer parseInfo
           
protected  java.util.Date startDate
           
protected  java.lang.String title
           
 
Constructor Summary
TypedDatasetImpl()
          No-arg constuctor
TypedDatasetImpl(NetcdfDataset ncfile)
          Construtor when theres a NetcdfFile underneath
TypedDatasetImpl(java.lang.String title, java.lang.String description, java.lang.String location)
          Constructor when theres no NetcdfFile underneath.
 
Method Summary
 void close()
          Close all resources associated with this dataset.
 Attribute findGlobalAttributeIgnoreCase(java.lang.String name)
           
 LatLonRect getBoundingBox()
           
 VariableSimpleIF getDataVariable(java.lang.String shortName)
          Get the named data Variable.
 java.util.List<VariableSimpleIF> getDataVariables()
          The data Variables available in this dataset.
 java.lang.String getDescription()
           
 java.lang.String getDetailInfo()
           
 java.util.Date getEndDate()
           
 java.util.List<Attribute> getGlobalAttributes()
          List of global attributes.
 java.lang.String getLocation()
           
 java.lang.String getLocationURI()
           
 NetcdfFile getNetcdfFile()
           
 java.util.Date getStartDate()
           
 java.lang.String getTitle()
           
protected  void removeDataVariable(java.lang.String varName)
           
protected abstract  void setBoundingBox()
           
 void setDescription(java.lang.String desc)
           
protected abstract  void setEndDate()
           
 void setLocationURI(java.lang.String location)
           
protected abstract  void setStartDate()
           
 void setTitle(java.lang.String title)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ncfile

protected NetcdfDataset ncfile

title

protected java.lang.String title

desc

protected java.lang.String desc

location

protected java.lang.String location

startDate

protected java.util.Date startDate

endDate

protected java.util.Date endDate

boundingBox

protected LatLonRect boundingBox

dataVariables

protected java.util.List<VariableSimpleIF> dataVariables

parseInfo

protected java.lang.StringBuffer parseInfo
Constructor Detail

TypedDatasetImpl

public TypedDatasetImpl()
No-arg constuctor


TypedDatasetImpl

public TypedDatasetImpl(java.lang.String title,
                        java.lang.String description,
                        java.lang.String location)
Constructor when theres no NetcdfFile underneath.

Parameters:
title - title of the dataset.
description - description of the dataset.
location - URI of the dataset

TypedDatasetImpl

public TypedDatasetImpl(NetcdfDataset ncfile)
Construtor when theres a NetcdfFile underneath

Parameters:
ncfile - adapt this NetcdfDataset
Method Detail

setTitle

public void setTitle(java.lang.String title)

setDescription

public void setDescription(java.lang.String desc)

setLocationURI

public void setLocationURI(java.lang.String location)

setStartDate

protected abstract void setStartDate()

setEndDate

protected abstract void setEndDate()

setBoundingBox

protected abstract void setBoundingBox()

removeDataVariable

protected void removeDataVariable(java.lang.String varName)

getNetcdfFile

public NetcdfFile getNetcdfFile()
Specified by:
getNetcdfFile in interface TypedDataset
Returns:
underlying NetcdfFile, or null if none.

getTitle

public java.lang.String getTitle()
Specified by:
getTitle in interface TypedDataset
Returns:
Title of the dataset.

getDescription

public java.lang.String getDescription()
Specified by:
getDescription in interface TypedDataset
Returns:
Text information about this dataset.

getLocationURI

public java.lang.String getLocationURI()
Specified by:
getLocationURI in interface TypedDataset
Returns:
The URI location of the dataset

getLocation

public java.lang.String getLocation()

getGlobalAttributes

public java.util.List<Attribute> getGlobalAttributes()
Description copied from interface: TypedDataset
List of global attributes.

Specified by:
getGlobalAttributes in interface TypedDataset
Returns:
List of type ucar.nc2.Attribute

findGlobalAttributeIgnoreCase

public Attribute findGlobalAttributeIgnoreCase(java.lang.String name)
Specified by:
findGlobalAttributeIgnoreCase in interface TypedDataset
Parameters:
name - attribute name
Returns:
the global attribute with the given name, ingnoring case.

close

public void close()
           throws java.io.IOException
Description copied from interface: TypedDataset
Close all resources associated with this dataset.

Specified by:
close in interface TypedDataset
Throws:
java.io.IOException - on I/O error

getDetailInfo

public java.lang.String getDetailInfo()
Specified by:
getDetailInfo in interface TypedDataset
Returns:
debug / underlying implementation details

getStartDate

public java.util.Date getStartDate()
Specified by:
getStartDate in interface TypedDataset
Returns:
Start date for the entire dataset.

getEndDate

public java.util.Date getEndDate()
Specified by:
getEndDate in interface TypedDataset
Returns:
End date for the entire dataset.

getBoundingBox

public LatLonRect getBoundingBox()
Specified by:
getBoundingBox in interface TypedDataset
Returns:
the boundingBox for the entire dataset.

getDataVariables

public java.util.List<VariableSimpleIF> getDataVariables()
Description copied from interface: TypedDataset
The data Variables available in this dataset. Should just be data variable others might be searching for, not metadata or coordinate system variables, etc. The shape of this VariableSimpleIF does not necessarily match the

Specified by:
getDataVariables in interface TypedDataset
Returns:
List of type VariableSimpleIF

getDataVariable

public VariableSimpleIF getDataVariable(java.lang.String shortName)
Description copied from interface: TypedDataset
Get the named data Variable.

Specified by:
getDataVariable in interface TypedDataset
Parameters:
shortName - of data Variable.
Returns:
VariableSimpleIF or null.