ucar.nc2.ft
Class FeatureDatasetImpl

java.lang.Object
  extended by ucar.nc2.ft.FeatureDatasetImpl
All Implemented Interfaces:
FeatureDataset

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

Constructor Summary
FeatureDatasetImpl()
          No-arg constuctor
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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ucar.nc2.ft.FeatureDataset
getFeatureType
 

Constructor Detail

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

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