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 CalendarDateRange |
dateRange |
protected java.lang.String |
desc |
protected FileCacheIF |
fileCache |
protected java.lang.String |
location |
protected NetcdfDataset |
netcdfDataset |
protected java.util.Formatter |
parseInfo |
protected java.lang.String |
title |
Modifier | Constructor and Description |
---|---|
|
FeatureDatasetImpl()
No-arg constuctor
|
protected |
FeatureDatasetImpl(FeatureDatasetImpl from) |
|
FeatureDatasetImpl(NetcdfDataset netcdfDataset)
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.
|
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.
|
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
|
long |
getLastModified()
Returns the time that the underlying file(s) were last modified.
|
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.
|
void |
reacquire() |
void |
release() |
void |
setBoundingBox(LatLonRect boundingBox) |
void |
setDateRange(CalendarDateRange dateRange) |
protected void |
setDescription(java.lang.String desc) |
void |
setFileCache(FileCacheIF fileCache)
If the FileCache is not null, FileCacheable.close() must call FileCache.release()
|
protected void |
setLocationURI(java.lang.String location) |
protected void |
setTitle(java.lang.String title) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
calcBounds, getFeatureType
protected NetcdfDataset netcdfDataset
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 CalendarDateRange dateRange
protected LatLonRect boundingBox
protected FileCacheIF 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 netcdfDataset)
netcdfDataset
- adapt this NetcdfDatasetprotected void setTitle(java.lang.String title)
protected void setDescription(java.lang.String desc)
protected void setLocationURI(java.lang.String location)
public void setDateRange(CalendarDateRange dateRange)
public void setBoundingBox(LatLonRect boundingBox)
public NetcdfFile getNetcdfFile()
FeatureDataset
getNetcdfFile
in interface FeatureDataset
public java.lang.String getTitle()
FeatureDataset
getTitle
in interface FeatureDataset
public java.lang.String getDescription()
FeatureDataset
getDescription
in interface FeatureDataset
public java.lang.String getLocation()
FeatureDataset
getLocation
in interface FeatureDataset
getLocation
in interface FileCacheable
public java.util.List<Attribute> getGlobalAttributes()
FeatureDataset
getGlobalAttributes
in interface FeatureDataset
public Attribute findGlobalAttributeIgnoreCase(java.lang.String name)
FeatureDataset
findGlobalAttributeIgnoreCase
in interface FeatureDataset
name
- attribute namepublic void getDetailInfo(java.util.Formatter sf)
FeatureDataset
getDetailInfo
in interface FeatureDataset
sf
- append info herepublic CalendarDateRange getCalendarDateRange()
FeatureDataset
getCalendarDateRange
in interface FeatureDataset
public CalendarDate getCalendarDateStart()
FeatureDataset
getCalendarDateStart
in interface FeatureDataset
public CalendarDate getCalendarDateEnd()
FeatureDataset
getCalendarDateEnd
in interface FeatureDataset
public DateRange getDateRange()
FeatureDataset
getDateRange
in interface FeatureDataset
public java.util.Date getStartDate()
FeatureDataset
getStartDate
in interface FeatureDataset
public java.util.Date getEndDate()
FeatureDataset
getEndDate
in interface FeatureDataset
public LatLonRect getBoundingBox()
FeatureDataset
getBoundingBox
in interface FeatureDataset
public java.util.List<VariableSimpleIF> getDataVariables()
FeatureDataset
getDataVariables
in interface FeatureDataset
public VariableSimpleIF getDataVariable(java.lang.String shortName)
FeatureDataset
getDataVariable
in interface FeatureDataset
shortName
- of data Variable.public java.lang.String getImplementationName()
FeatureDataset
getImplementationName
in interface FeatureDataset
public void close() throws java.io.IOException
FeatureDataset
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in interface FeatureDataset
close
in interface FileCacheable
java.io.IOException
- on io errorpublic void release() throws java.io.IOException
release
in interface FileCacheable
java.io.IOException
public void reacquire() throws java.io.IOException
reacquire
in interface FileCacheable
java.io.IOException
public long getLastModified()
FileCacheable
FileFactory
.getLastModified
in interface FileCacheable
long
value representing the time the file(s) were last modified or 0L
if the
last-modified time couldn't be determined for any reason.public void setFileCache(FileCacheIF fileCache)
FileCacheable
public synchronized void close() throws java.io.IOException { if (cache != null) { if (cache.release(this)) return; } reallyClose(); }
setFileCache
in interface FileCacheable
fileCache
- must store this, use it on close as above.