ucar.nc2.ft
Class FeatureDatasetImpl

java.lang.Object
  extended by ucar.nc2.ft.FeatureDatasetImpl
All Implemented Interfaces:
FeatureDataset
Direct Known Subclasses:
PointDatasetImpl

public abstract class FeatureDatasetImpl
extends java.lang.Object
implements FeatureDataset

Abstract superclass for implementations of FeatureDataset. Subclass must implement getFeatureClass(), and add specific functionality.

Since:
Sep 7, 2007
Author:
caron

Field Summary
protected  LatLonRect boundingBox
           
protected  java.util.List<VariableSimpleIF> dataVariables
           
protected  DateRange dateRange
           
protected  java.lang.String desc
           
protected  java.lang.String location
           
protected  NetcdfDataset ncfile
           
protected  java.util.Formatter parseInfo
           
protected  java.lang.String title
           
 
Constructor Summary
  FeatureDatasetImpl()
          No-arg constuctor
protected FeatureDatasetImpl(FeatureDatasetImpl from)
           
  FeatureDatasetImpl(NetcdfDataset ncfile)
          Construtor when theres a NetcdfFile underneath
  FeatureDatasetImpl(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)
          Return the global attribute with the given name, ignoring case.
 LatLonRect getBoundingBox()
          The boundingBox for the entire dataset.
 VariableSimpleIF getDataVariable(java.lang.String shortName)
          Get the named data Variable.
 java.util.List<VariableSimpleIF> getDataVariables()
          The data Variables available in this dataset.
 DateRange getDateRange()
          Date range for the entire dataset.
 java.lang.String getDescription()
          Text information about this dataset.
 void getDetailInfo(java.util.Formatter sf)
          Show debug / underlying implementation details
 java.util.Date getEndDate()
          Ending date for the entire dataset.
 java.util.List<Attribute> getGlobalAttributes()
          List of global attributes.
 java.lang.String getLocationURI()
          The URI location of the dataset
 NetcdfFile getNetcdfFile()
          Return underlying NetcdfFile, or null if none.
 java.util.Date getStartDate()
          Starting date for the entire dataset.
 java.lang.String getTitle()
          Title of the dataset.
protected  void removeDataVariable(java.lang.String varName)
           
protected  void setBoundingBox(LatLonRect boundingBox)
           
protected  void setDateRange(DateRange dateRange)
           
protected  void setDescription(java.lang.String desc)
           
protected  void setLocationURI(java.lang.String location)
           
protected  void setTitle(java.lang.String title)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ucar.nc2.ft.FeatureDataset
getFeatureType
 

Field Detail

ncfile

protected NetcdfDataset ncfile

title

protected java.lang.String title

desc

protected java.lang.String desc

location

protected java.lang.String location

dataVariables

protected java.util.List<VariableSimpleIF> dataVariables

parseInfo

protected java.util.Formatter parseInfo

dateRange

protected DateRange dateRange

boundingBox

protected LatLonRect boundingBox
Constructor Detail

FeatureDatasetImpl

protected FeatureDatasetImpl(FeatureDatasetImpl from)

FeatureDatasetImpl

public FeatureDatasetImpl()
No-arg constuctor


FeatureDatasetImpl

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

FeatureDatasetImpl

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

Parameters:
ncfile - adapt this NetcdfDataset
Method Detail

setTitle

protected void setTitle(java.lang.String title)

setDescription

protected void setDescription(java.lang.String desc)

setLocationURI

protected void setLocationURI(java.lang.String location)

setDateRange

protected void setDateRange(DateRange dateRange)

setBoundingBox

protected void setBoundingBox(LatLonRect boundingBox)

removeDataVariable

protected void removeDataVariable(java.lang.String varName)

getNetcdfFile

public NetcdfFile getNetcdfFile()
Description copied from interface: FeatureDataset
Return underlying NetcdfFile, or null if none.

Specified by:
getNetcdfFile in interface FeatureDataset
Returns:
the underlying NetcdfFile, or null if none.

getTitle

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

Specified by:
getTitle in interface FeatureDataset
Returns:
the title of the dataset, or null

getDescription

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

Specified by:
getDescription in interface FeatureDataset
Returns:
any text information about this dataset, or null.

getLocationURI

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

Specified by:
getLocationURI in interface FeatureDataset
Returns:
the URI location of the dataset, or null

getGlobalAttributes

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

Specified by:
getGlobalAttributes in interface FeatureDataset
Returns:
List of type ucar.nc2.Attribute, may be empty but not null

findGlobalAttributeIgnoreCase

public Attribute findGlobalAttributeIgnoreCase(java.lang.String name)
Description copied from interface: FeatureDataset
Return the global attribute with the given name, ignoring case.

Specified by:
findGlobalAttributeIgnoreCase in interface FeatureDataset
Parameters:
name - attribute name
Returns:
the global attribute, or null

close

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

Specified by:
close in interface FeatureDataset
Throws:
java.io.IOException - on i/o error

getDetailInfo

public void getDetailInfo(java.util.Formatter sf)
Description copied from interface: FeatureDataset
Show debug / underlying implementation details

Specified by:
getDetailInfo in interface FeatureDataset
Parameters:
sf - append info here

getDateRange

public DateRange getDateRange()
Description copied from interface: FeatureDataset
Date range for the entire dataset.

Specified by:
getDateRange in interface FeatureDataset
Returns:
the date range for the entire dataset, or null if unknown

getStartDate

public java.util.Date getStartDate()
Description copied from interface: FeatureDataset
Starting date for the entire dataset.

Specified by:
getStartDate in interface FeatureDataset
Returns:
the starting date for the entire dataset, or null if unknown

getEndDate

public java.util.Date getEndDate()
Description copied from interface: FeatureDataset
Ending date for the entire dataset.

Specified by:
getEndDate in interface FeatureDataset
Returns:
the ending date for the entire dataset, or null if unknown

getBoundingBox

public LatLonRect getBoundingBox()
Description copied from interface: FeatureDataset
The boundingBox for the entire dataset.

Specified by:
getBoundingBox in interface FeatureDataset
Returns:
the lat/lon boundingBox for the entire dataset, or null if unknown.

getDataVariables

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

Specified by:
getDataVariables in interface FeatureDataset
Returns:
List of subclass of VariableSimpleIF, may be empty but not null

getDataVariable

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

Specified by:
getDataVariable in interface FeatureDataset
Parameters:
shortName - of data Variable.
Returns:
VariableSimpleIF or null if not found