|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectucar.nc2.ft.FeatureDatasetImpl
public abstract class FeatureDatasetImpl
Abstract superclass for implementations of FeatureDataset. Subclass must implement getFeatureClass(), and add specific functionality.
| Field Summary | |
|---|---|
protected LatLonRect |
boundingBox
|
protected List<VariableSimpleIF> |
dataVariables
|
protected DateRange |
dateRange
|
protected String |
desc
|
protected FileCache |
fileCache
|
protected String |
location
|
protected NetcdfDataset |
ncfile
|
protected Formatter |
parseInfo
|
protected String |
title
|
| Constructor Summary | |
|---|---|
|
FeatureDatasetImpl()
No-arg constuctor |
protected |
FeatureDatasetImpl(FeatureDatasetImpl from)
|
|
FeatureDatasetImpl(NetcdfDataset ncfile)
Constructor when theres a NetcdfFile underneath |
|
FeatureDatasetImpl(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)
Return the global attribute with the given name, ignoring case. |
LatLonRect |
getBoundingBox()
The boundingBox for the entire dataset. |
VariableSimpleIF |
getDataVariable(String shortName)
Get the named data Variable. |
List<VariableSimpleIF> |
getDataVariables()
The data Variables available in this dataset. |
DateRange |
getDateRange()
Date range for the entire dataset. |
String |
getDescription()
Text information about this dataset. |
void |
getDetailInfo(Formatter sf)
Show debug / underlying implementation details |
Date |
getEndDate()
Ending date for the entire dataset. |
List<Attribute> |
getGlobalAttributes()
List of global attributes. |
String |
getImplementationName()
Show who is implementing |
String |
getLocation()
The URI location of the dataset |
NetcdfFile |
getNetcdfFile()
Return underlying NetcdfFile, or null if none. |
Date |
getStartDate()
Starting date for the entire dataset. |
String |
getTitle()
Title of the dataset. |
protected void |
removeDataVariable(String varName)
|
protected void |
setBoundingBox(LatLonRect boundingBox)
|
protected void |
setDateRange(DateRange dateRange)
|
protected void |
setDescription(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(String location)
|
protected void |
setTitle(String title)
|
boolean |
sync()
Sync() is called when the FileCacheable is found in the cache, before returning the object to the application. |
| 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 |
|---|
calcBounds, getFeatureType |
| Field Detail |
|---|
protected NetcdfDataset ncfile
protected String title
protected String desc
protected String location
protected List<VariableSimpleIF> dataVariables
protected Formatter parseInfo
protected DateRange dateRange
protected LatLonRect boundingBox
protected FileCache fileCache
| Constructor Detail |
|---|
protected FeatureDatasetImpl(FeatureDatasetImpl from)
public FeatureDatasetImpl()
public FeatureDatasetImpl(String title,
String description,
String location)
title - title of the dataset.description - description of the dataset.location - URI of the datasetpublic FeatureDatasetImpl(NetcdfDataset ncfile)
ncfile - adapt this NetcdfDataset| Method Detail |
|---|
protected void setTitle(String title)
protected void setDescription(String desc)
protected void setLocationURI(String location)
protected void setDateRange(DateRange dateRange)
protected void setBoundingBox(LatLonRect boundingBox)
protected void removeDataVariable(String varName)
public NetcdfFile getNetcdfFile()
FeatureDataset
getNetcdfFile in interface FeatureDatasetpublic String getTitle()
FeatureDataset
getTitle in interface FeatureDatasetpublic String getDescription()
FeatureDataset
getDescription in interface FeatureDatasetpublic String getLocation()
FeatureDataset
getLocation in interface FeatureDatasetgetLocation in interface FileCacheablepublic List<Attribute> getGlobalAttributes()
FeatureDataset
getGlobalAttributes in interface FeatureDatasetpublic Attribute findGlobalAttributeIgnoreCase(String name)
FeatureDataset
findGlobalAttributeIgnoreCase in interface FeatureDatasetname - attribute name
public void getDetailInfo(Formatter sf)
FeatureDataset
getDetailInfo in interface FeatureDatasetsf - append info herepublic DateRange getDateRange()
FeatureDataset
getDateRange in interface FeatureDatasetpublic Date getStartDate()
FeatureDataset
getStartDate in interface FeatureDatasetpublic Date getEndDate()
FeatureDataset
getEndDate in interface FeatureDatasetpublic LatLonRect getBoundingBox()
FeatureDataset
getBoundingBox in interface FeatureDatasetpublic List<VariableSimpleIF> getDataVariables()
FeatureDataset
getDataVariables in interface FeatureDatasetpublic VariableSimpleIF getDataVariable(String shortName)
FeatureDataset
getDataVariable in interface FeatureDatasetshortName - of data Variable.
public String getImplementationName()
FeatureDataset
getImplementationName in interface FeatureDataset
public void close()
throws IOException
FeatureDataset
close in interface FeatureDatasetclose in interface FileCacheableIOException
public boolean sync()
throws IOException
FileCacheable
sync in interface FileCacheableIOException - 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.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||