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, TrajectoryObsDatasetImpl, UnidataTrajectoryObsDataset2

public abstract class TypedDatasetImpl
extends Object
implements TypedDataset

Superclass for implementations of TypedDataset.

Author:
John Caron

Field Summary
protected  LatLonRect boundingBox
           
protected  List<VariableSimpleIF> dataVariables
           
protected  String desc
           
protected  Date endDate
           
protected  String location
           
protected  NetcdfDataset ncfile
           
protected  StringBuffer parseInfo
           
protected  Date startDate
           
protected  String title
           
 
Constructor Summary
TypedDatasetImpl()
          No-arg constuctor
TypedDatasetImpl(NetcdfDataset ncfile)
          Construtor when theres a NetcdfFile underneath
TypedDatasetImpl(String title, String description, String location)
          Constructor when theres no NetcdfFile underneath.
 
Method Summary
 void close()
          Close all resources associated with this dataset.
 Attribute findGlobalAttributeIgnoreCase(String name)
           
 LatLonRect getBoundingBox()
           
 VariableSimpleIF getDataVariable(String shortName)
          Get the named data Variable.
 List<VariableSimpleIF> getDataVariables()
          The data Variables available in this dataset.
 String getDescription()
           
 String getDetailInfo()
           
 Date getEndDate()
           
 List<Attribute> getGlobalAttributes()
          List of global attributes.
 String getLocation()
           
 String getLocationURI()
           
 NetcdfFile getNetcdfFile()
           
 Date getStartDate()
           
 String getTitle()
           
protected  void removeDataVariable(String varName)
           
protected abstract  void setBoundingBox()
           
 void setDescription(String desc)
           
protected abstract  void setEndDate()
           
 void setLocationURI(String location)
           
protected abstract  void setStartDate()
           
 void setTitle(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 String title

desc

protected String desc

location

protected String location

startDate

protected Date startDate

endDate

protected Date endDate

boundingBox

protected LatLonRect boundingBox

dataVariables

protected List<VariableSimpleIF> dataVariables

parseInfo

protected StringBuffer parseInfo
Constructor Detail

TypedDatasetImpl

public TypedDatasetImpl()
No-arg constuctor


TypedDatasetImpl

public TypedDatasetImpl(String title,
                        String description,
                        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(String title)

setDescription

public void setDescription(String desc)

setLocationURI

public void setLocationURI(String location)

setStartDate

protected abstract void setStartDate()

setEndDate

protected abstract void setEndDate()

setBoundingBox

protected abstract void setBoundingBox()

removeDataVariable

protected void removeDataVariable(String varName)

getNetcdfFile

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

getTitle

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

getDescription

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

getLocationURI

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

getLocation

public String getLocation()

getGlobalAttributes

public 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(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 IOException
Description copied from interface: TypedDataset
Close all resources associated with this dataset.

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

getDetailInfo

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

getStartDate

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

getEndDate

public 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 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(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.


Copyright © 1999-2011 UCAR/Unidata. All Rights Reserved.