Package ucar.nc2.ft2.coverage
Class FeatureDatasetCoverage
- java.lang.Object
-
- ucar.nc2.ft2.coverage.FeatureDatasetCoverage
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,FeatureDataset
,FileCacheable
public class FeatureDatasetCoverage extends Object implements FeatureDataset, Closeable
A FeatureDataset with Coverage Features. Some endpoints (eg files) can have multiple CoverageCollections. A CoverageCollection must have a single HorizCoordSys and Calendar. Grib collections often have multiple CoverageCollections (TwoD, Best).- Since:
- 8/8/2015
-
-
Constructor Summary
Constructors Constructor Description FeatureDatasetCoverage(String location, Closeable closer, CoverageCollection covCollection)
FeatureDatasetCoverage(String location, AttributeContainer gatts, Closeable closer, List<CoverageCollection> covCollections)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description AttributeContainer
attributes()
Get the global attributes.void
close()
Close all resources associated with this dataset.CoverageCollection
findCoverageDataset(String name)
CoverageCollection
findCoverageDataset(FeatureType type)
Attribute
findGlobalAttributeIgnoreCase(String name)
Return the global attribute with the given name, ignoring case.LatLonRect
getBoundingBox()
The lat/lon boundingBox for the entire dataset.CalendarDate
getCalendarDateEnd()
Ending Calendar date for the entire dataset.CalendarDateRange
getCalendarDateRange()
Calendar Date range for the entire dataset.CalendarDate
getCalendarDateStart()
Starting Calendar date for the entire dataset.List<CoverageCollection>
getCoverageCollections()
VariableSimpleIF
getDataVariable(String shortName)
Get the named data Variable.List<VariableSimpleIF>
getDataVariables()
The data Variables available in this dataset.String
getDescription()
Text information about this dataset.void
getDetailInfo(Formatter sf)
Show debug / underlying implementation detailsFeatureType
getFeatureType()
Contains collections of this FeatureType.List<Attribute>
getGlobalAttributes()
List of global attributes.String
getImplementationName()
Show who is implementinglong
getLastModified()
Returns the time that the underlying file(s) were last modified.String
getLocation()
The URI location of the datasetNetcdfFile
getNetcdfFile()
Return underlying NetcdfFile, or null if none.CoverageCollection
getSingleCoverageCollection()
String
getTitle()
Title of the dataset.void
reacquire()
Deprecated.do not usevoid
release()
Deprecated.do not usevoid
setFileCache(FileCacheIF fileCache)
Deprecated.do not use
-
-
-
Constructor Detail
-
FeatureDatasetCoverage
public FeatureDatasetCoverage(String location, Closeable closer, CoverageCollection covCollection)
-
FeatureDatasetCoverage
public FeatureDatasetCoverage(String location, AttributeContainer gatts, Closeable closer, List<CoverageCollection> covCollections)
-
-
Method Detail
-
getCoverageCollections
public List<CoverageCollection> getCoverageCollections()
-
getSingleCoverageCollection
public CoverageCollection getSingleCoverageCollection()
-
findCoverageDataset
public CoverageCollection findCoverageDataset(FeatureType type)
-
findCoverageDataset
public CoverageCollection findCoverageDataset(String name)
-
getFeatureType
public FeatureType getFeatureType()
Description copied from interface:FeatureDataset
Contains collections of this FeatureType.- Specified by:
getFeatureType
in interfaceFeatureDataset
- Returns:
- FeatureType of data
-
getTitle
public String getTitle()
Description copied from interface:FeatureDataset
Title of the dataset.- Specified by:
getTitle
in interfaceFeatureDataset
- Returns:
- the title of the dataset, or null
-
getDescription
public String getDescription()
Description copied from interface:FeatureDataset
Text information about this dataset.- Specified by:
getDescription
in interfaceFeatureDataset
- Returns:
- any text information about this dataset, or null.
-
getLocation
public String getLocation()
Description copied from interface:FeatureDataset
The URI location of the dataset- Specified by:
getLocation
in interfaceFeatureDataset
- Specified by:
getLocation
in interfaceFileCacheable
- Returns:
- the URI location of the dataset, or null
-
getCalendarDateRange
public CalendarDateRange getCalendarDateRange()
Description copied from interface:FeatureDataset
Calendar Date range for the entire dataset.- Specified by:
getCalendarDateRange
in interfaceFeatureDataset
- Returns:
- the date range for the entire dataset, or null if unknown
-
getCalendarDateStart
public CalendarDate getCalendarDateStart()
Description copied from interface:FeatureDataset
Starting Calendar date for the entire dataset.- Specified by:
getCalendarDateStart
in interfaceFeatureDataset
- Returns:
- the starting date for the entire dataset, or null if unknown
-
getCalendarDateEnd
public CalendarDate getCalendarDateEnd()
Description copied from interface:FeatureDataset
Ending Calendar date for the entire dataset.- Specified by:
getCalendarDateEnd
in interfaceFeatureDataset
- Returns:
- the ending date for the entire dataset, or null if unknown
-
getBoundingBox
public LatLonRect getBoundingBox()
Description copied from interface:FeatureDataset
The lat/lon boundingBox for the entire dataset.- Specified by:
getBoundingBox
in interfaceFeatureDataset
- Returns:
- the lat/lon boundingBox for the entire dataset, or null if unknown.
-
attributes
public AttributeContainer attributes()
Description copied from interface:FeatureDataset
Get the global attributes.- Specified by:
attributes
in interfaceFeatureDataset
-
getGlobalAttributes
public List<Attribute> getGlobalAttributes()
Description copied from interface:FeatureDataset
List of global attributes.- Specified by:
getGlobalAttributes
in interfaceFeatureDataset
- Returns:
- List of type ucar.nc2.Attribute, may be empty but not null
-
findGlobalAttributeIgnoreCase
public Attribute findGlobalAttributeIgnoreCase(String name)
Description copied from interface:FeatureDataset
Return the global attribute with the given name, ignoring case.- Specified by:
findGlobalAttributeIgnoreCase
in interfaceFeatureDataset
- Parameters:
name
- attribute name- Returns:
- the global attribute, or null
-
getDataVariables
public 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 shapes of the VariableSimpleIF do not necessarily match the StructureData member.- Specified by:
getDataVariables
in interfaceFeatureDataset
- Returns:
- List of subclass of VariableSimpleIF, may be empty but not null
-
getDataVariable
public VariableSimpleIF getDataVariable(String shortName)
Description copied from interface:FeatureDataset
Get the named data Variable.- Specified by:
getDataVariable
in interfaceFeatureDataset
- Parameters:
shortName
- of data Variable.- Returns:
- VariableSimpleIF or null if not found
-
getNetcdfFile
@Nullable public NetcdfFile getNetcdfFile()
Description copied from interface:FeatureDataset
Return underlying NetcdfFile, or null if none.- Specified by:
getNetcdfFile
in interfaceFeatureDataset
- Returns:
- the underlying NetcdfFile, or null if none.
-
getDetailInfo
public void getDetailInfo(Formatter sf)
Description copied from interface:FeatureDataset
Show debug / underlying implementation details- Specified by:
getDetailInfo
in interfaceFeatureDataset
- Parameters:
sf
- append info here
-
getImplementationName
public String getImplementationName()
Description copied from interface:FeatureDataset
Show who is implementing- Specified by:
getImplementationName
in interfaceFeatureDataset
- Returns:
- name of implementor
-
getLastModified
public long getLastModified()
Description copied from interface:FileCacheable
Returns the time that the underlying file(s) were last modified. If they've changed since they were stored in the cache, they will be closed and reopened withFileFactory
.- Specified by:
getLastModified
in interfaceFileCacheable
- Returns:
- a
long
value representing the time the file(s) were last modified or0L
if the last-modified time couldn't be determined for any reason.
-
setFileCache
@Deprecated public void setFileCache(FileCacheIF fileCache)
Deprecated.do not useDescription copied from interface:FileCacheable
If the FileCache is not null, FileCacheable.close() must call FileCache.release()public synchronized void close() throws java.io.IOException { if (cache != null) { if (cache.release(this)) return; } reallyClose(); }
- Specified by:
setFileCache
in interfaceFileCacheable
- Parameters:
fileCache
- must store this, use it on close as above.
-
release
@Deprecated public void release()
Deprecated.do not useDescription copied from interface:FileCacheable
Release any system resources like file handles. Optional, implement only if you are able to reacquire. Used when object is made inactive in cache.- Specified by:
release
in interfaceFileCacheable
-
reacquire
@Deprecated public void reacquire()
Deprecated.do not useDescription copied from interface:FileCacheable
Reacquire any resources like file handles Used when reactivating in cache.- Specified by:
reacquire
in interfaceFileCacheable
-
close
public void close() throws IOException
Description copied from interface:FeatureDataset
Close all resources associated with this dataset.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceFeatureDataset
- Specified by:
close
in interfaceFileCacheable
- Throws:
IOException
- on i/o error
-
-