@ThreadSafe public abstract class InvDatasetFeatureCollection extends Object implements Closeable
The DatasetFeatureCollection object is held in the DataRootManager's FeatureCollectionCache; it may get closed and recreated.
| Modifier and Type | Class and Description |
|---|---|
protected class |
InvDatasetFeatureCollection.State |
| Modifier and Type | Field and Description |
|---|---|
protected static AllowedServices |
allowedServices |
protected thredds.featurecollection.FeatureCollectionConfig |
config |
protected String |
configPath |
protected static String |
contextName |
protected thredds.inventory.MFileCollectionManager |
datasetCollection |
protected thredds.client.catalog.Service |
downloadService |
protected thredds.featurecollection.FeatureCollectionType |
fcType |
protected static String |
FILES |
protected boolean |
first |
protected static String |
LATEST_DATASET_CATALOG |
protected thredds.client.catalog.Service |
latestService |
protected Object |
lock |
protected String |
name |
protected thredds.client.catalog.Service |
orgService |
protected thredds.server.catalog.FeatureCollectionRef |
parent |
protected InvDatasetFeatureCollection.State |
state |
protected String |
topDirectory |
protected static String |
VARIABLES |
protected thredds.client.catalog.Service |
virtualService |
| Modifier | Constructor and Description |
|---|---|
protected |
InvDatasetFeatureCollection(thredds.server.catalog.FeatureCollectionRef parent,
thredds.featurecollection.FeatureCollectionConfig config) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
_showStatus(Formatter f,
boolean summaryOnly,
String type) |
protected static String |
buildCatalogServiceHref(String path) |
protected InvDatasetFeatureCollection.State |
checkState()
A request has come in, check that the state has been initialized.
|
void |
close() |
static InvDatasetFeatureCollection |
factory(thredds.server.catalog.FeatureCollectionRef parent,
thredds.featurecollection.FeatureCollectionConfig config) |
protected void |
firstInit() |
protected String |
getCatalogHref(String what) |
thredds.featurecollection.FeatureCollectionConfig |
getConfig() |
String |
getConfigPath() |
thredds.inventory.MCollection |
getDatasetCollectionManager() |
File |
getFile(String remaining) |
ucar.nc2.ft2.coverage.CoverageCollection |
getGridCoverage(String matchPath) |
ucar.nc2.dt.grid.GridDataset |
getGridDataset(String matchPath)
Get the associated Grid Dataset, if any.
|
String |
getLatestFileName() |
org.slf4j.Logger |
getLogger() |
String |
getName() |
ucar.nc2.dataset.NetcdfDataset |
getNetcdfDataset(String matchPath)
Get the dataset named by the path.
|
protected String |
getPath() |
ucar.nc2.ft.FeatureDatasetPoint |
getPointDataset(String matchPath)
Get the associated Point Dataset, if any.
|
ucar.nc2.ft2.simpgeometry.SimpleGeometryFeatureDataset |
getSimpleGeometryDataset(String matchPath) |
String |
getTopDirectoryLocation() |
abstract thredds.client.catalog.builder.CatalogBuilder |
makeCatalog(String match,
String orgPath,
URI catURI)
Get one of the catalogs contained in this collection,
called by DataRootHandler.makeDynamicCatalog()
|
protected thredds.client.catalog.builder.CatalogBuilder |
makeCatalogFiles(URI catURI,
InvDatasetFeatureCollection.State localState,
List<String> filenames,
boolean addLatest) |
protected thredds.client.catalog.builder.CatalogBuilder |
makeCatalogTop(URI catURI,
InvDatasetFeatureCollection.State localState)
Make the containing catalog of this feature collection
"http://server:port/thredds/catalog/path/catalog.xml"
|
protected void |
makeCollection() |
protected abstract thredds.client.catalog.builder.DatasetBuilder |
makeDatasetTop(URI catURI,
InvDatasetFeatureCollection.State localState) |
protected void |
makeDefaultServices() |
protected String |
makeFullName(thredds.client.catalog.DatasetNode ds) |
thredds.client.catalog.builder.CatalogBuilder |
makeLatest(String matchPath,
String reqPath,
URI catURI) |
protected String |
makeMetadataLink(String datasetName,
String metadata) |
protected thredds.client.catalog.ThreddsMetadata.UriResolved |
makeUriResolved(URI baseURI,
String href) |
void |
processEvent(thredds.inventory.CollectionUpdateEvent event) |
static void |
setAllowedServices(AllowedServices _allowedServices) |
static void |
setContextName(String c) |
void |
showStatus(Formatter f) |
String |
showStatusShort(String type) |
protected void |
update(thredds.inventory.CollectionUpdateType force)
Collection was changed, update internal objects.
|
protected abstract void |
updateCollection(InvDatasetFeatureCollection.State localState,
thredds.inventory.CollectionUpdateType force) |
protected static final String LATEST_DATASET_CATALOG
protected static final String VARIABLES
protected static final String FILES
protected static AllowedServices allowedServices
protected static String contextName
protected thredds.server.catalog.FeatureCollectionRef parent
protected thredds.client.catalog.Service orgService
protected thredds.client.catalog.Service virtualService
protected thredds.client.catalog.Service latestService
protected thredds.client.catalog.Service downloadService
protected final String name
protected final String configPath
protected final thredds.featurecollection.FeatureCollectionType fcType
protected final thredds.featurecollection.FeatureCollectionConfig config
protected String topDirectory
protected thredds.inventory.MFileCollectionManager datasetCollection
protected InvDatasetFeatureCollection.State state
protected boolean first
protected final Object lock
protected InvDatasetFeatureCollection(thredds.server.catalog.FeatureCollectionRef parent,
thredds.featurecollection.FeatureCollectionConfig config)
public static void setContextName(String c)
public static void setAllowedServices(AllowedServices _allowedServices)
public static InvDatasetFeatureCollection factory(thredds.server.catalog.FeatureCollectionRef parent, thredds.featurecollection.FeatureCollectionConfig config)
protected void makeDefaultServices()
public void close()
close in interface Closeableclose in interface AutoCloseableprotected void makeCollection()
public void processEvent(thredds.inventory.CollectionUpdateEvent event)
public void showStatus(Formatter f)
protected void _showStatus(Formatter f, boolean summaryOnly, String type) throws IOException
IOExceptionprotected String getPath()
protected abstract void updateCollection(InvDatasetFeatureCollection.State localState, thredds.inventory.CollectionUpdateType force)
protected void firstInit()
protected InvDatasetFeatureCollection.State checkState() throws IOException
IOExceptionprotected void update(thredds.inventory.CollectionUpdateType force)
throws IOException
force - update typeIOExceptionpublic String getName()
public String getConfigPath()
public String getLatestFileName()
public String getTopDirectoryLocation()
public thredds.featurecollection.FeatureCollectionConfig getConfig()
public thredds.inventory.MCollection getDatasetCollectionManager()
public org.slf4j.Logger getLogger()
protected String makeFullName(thredds.client.catalog.DatasetNode ds)
public abstract thredds.client.catalog.builder.CatalogBuilder makeCatalog(String match, String orgPath, URI catURI) throws IOException
match - match.remainingorgPath - the path for the request.catURI - the base URI for the catalog to be made, used to resolve relative URLs.IOExceptionprotected abstract thredds.client.catalog.builder.DatasetBuilder makeDatasetTop(URI catURI, InvDatasetFeatureCollection.State localState) throws IOException
IOExceptionprotected thredds.client.catalog.builder.CatalogBuilder makeCatalogTop(URI catURI, InvDatasetFeatureCollection.State localState) throws IOException, URISyntaxException
catURI - base URI of the requestlocalState - current state to useIOException - on I/O errorURISyntaxException - if path is misformedprotected thredds.client.catalog.builder.CatalogBuilder makeCatalogFiles(URI catURI, InvDatasetFeatureCollection.State localState, List<String> filenames, boolean addLatest) throws IOException
IOExceptionprotected thredds.client.catalog.ThreddsMetadata.UriResolved makeUriResolved(URI baseURI, String href)
public thredds.client.catalog.builder.CatalogBuilder makeLatest(String matchPath, String reqPath, URI catURI) throws IOException
IOExceptionpublic ucar.nc2.ft.FeatureDatasetPoint getPointDataset(String matchPath) throws IOException
matchPath - match.remainingIOException - on errorpublic ucar.nc2.dt.grid.GridDataset getGridDataset(String matchPath) throws IOException
matchPath - match.remainingIOException - on errorpublic ucar.nc2.ft2.coverage.CoverageCollection getGridCoverage(String matchPath) throws IOException
IOExceptionpublic ucar.nc2.ft2.simpgeometry.SimpleGeometryFeatureDataset getSimpleGeometryDataset(String matchPath) throws IOException
IOExceptionpublic ucar.nc2.dataset.NetcdfDataset getNetcdfDataset(String matchPath) throws IOException
matchPath - remaining path from matchIOException - if read error