public abstract class FeatureDatasetImpl extends java.lang.Object implements FeatureDataset
| Modifier and Type | Field and Description |
|---|---|
protected LatLonRect |
boundingBox |
protected java.util.List<VariableSimpleIF> |
dataVariables |
protected DateRange |
dateRange |
protected java.lang.String |
desc |
protected FileCache |
fileCache |
protected java.lang.String |
location |
protected NetcdfDataset |
ncfile |
protected java.util.Formatter |
parseInfo |
protected java.lang.String |
title |
| Modifier | Constructor and Description |
|---|---|
|
FeatureDatasetImpl()
No-arg constuctor
|
protected |
FeatureDatasetImpl(FeatureDatasetImpl from) |
|
FeatureDatasetImpl(NetcdfDataset ncfile)
Constructor when theres a NetcdfFile underneath
|
|
FeatureDatasetImpl(java.lang.String title,
java.lang.String description,
java.lang.String location)
Constructor when theres no NetcdfFile underneath.
|
| Modifier and Type | Method and Description |
|---|---|
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 |
getImplementationName()
Show who is implementing
|
java.lang.String |
getLocation()
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 |
setBoundingBox(LatLonRect boundingBox) |
protected void |
setDateRange(DateRange dateRange) |
protected void |
setDescription(java.lang.String desc) |
void |
setFileCache(FileCache fileCache)
If the FileCache is set, the FileCacheable object must store it and call FileCache.release() on FileCacheable.close():
|
protected void |
setLocationURI(java.lang.String location) |
protected void |
setTitle(java.lang.String title) |
boolean |
sync()
Sync() is called when the FileCacheable is found in the cache, before returning the object to the
application.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcalcBounds, getFeatureTypeprotected NetcdfDataset ncfile
protected java.lang.String title
protected java.lang.String desc
protected java.lang.String location
protected java.util.List<VariableSimpleIF> dataVariables
protected java.util.Formatter parseInfo
protected DateRange dateRange
protected LatLonRect boundingBox
protected FileCache fileCache
protected FeatureDatasetImpl(FeatureDatasetImpl from)
public FeatureDatasetImpl()
public FeatureDatasetImpl(java.lang.String title,
java.lang.String description,
java.lang.String location)
title - title of the dataset.description - description of the dataset.location - URI of the datasetpublic FeatureDatasetImpl(NetcdfDataset ncfile)
ncfile - adapt this NetcdfDatasetprotected void setTitle(java.lang.String title)
protected void setDescription(java.lang.String desc)
protected void setLocationURI(java.lang.String location)
protected void setDateRange(DateRange dateRange)
protected void setBoundingBox(LatLonRect boundingBox)
public NetcdfFile getNetcdfFile()
FeatureDatasetgetNetcdfFile in interface FeatureDatasetpublic java.lang.String getTitle()
FeatureDatasetgetTitle in interface FeatureDatasetpublic java.lang.String getDescription()
FeatureDatasetgetDescription in interface FeatureDatasetpublic java.lang.String getLocation()
FeatureDatasetgetLocation in interface FeatureDatasetgetLocation in interface FileCacheablepublic java.util.List<Attribute> getGlobalAttributes()
FeatureDatasetgetGlobalAttributes in interface FeatureDatasetpublic Attribute findGlobalAttributeIgnoreCase(java.lang.String name)
FeatureDatasetfindGlobalAttributeIgnoreCase in interface FeatureDatasetname - attribute namepublic void getDetailInfo(java.util.Formatter sf)
FeatureDatasetgetDetailInfo in interface FeatureDatasetsf - append info herepublic DateRange getDateRange()
FeatureDatasetgetDateRange in interface FeatureDatasetpublic java.util.Date getStartDate()
FeatureDatasetgetStartDate in interface FeatureDatasetpublic java.util.Date getEndDate()
FeatureDatasetgetEndDate in interface FeatureDatasetpublic LatLonRect getBoundingBox()
FeatureDatasetgetBoundingBox in interface FeatureDatasetpublic java.util.List<VariableSimpleIF> getDataVariables()
FeatureDatasetgetDataVariables in interface FeatureDatasetpublic VariableSimpleIF getDataVariable(java.lang.String shortName)
FeatureDatasetgetDataVariable in interface FeatureDatasetshortName - of data Variable.public java.lang.String getImplementationName()
FeatureDatasetgetImplementationName in interface FeatureDatasetpublic void close()
throws java.io.IOException
FeatureDatasetclose in interface FeatureDatasetclose in interface FileCacheablejava.io.IOExceptionpublic boolean sync()
throws java.io.IOException
FileCacheablesync in interface FileCacheablejava.io.IOException - on i/o error.public void setFileCache(FileCache fileCache)
FileCacheable
public synchronized void close() throws java.io.IOException {
if (isClosed) return;
if (cache != null) {
cache.release(this);
} else {
reallyClose();
}
isClosed = true;
setFileCache in interface FileCacheablefileCache - must store this, use it on close as above.