Package thredds.featurecollection
Class InvDatasetFeatureCollection
java.lang.Object
thredds.featurecollection.InvDatasetFeatureCollection
- All Implemented Interfaces:
Closeable,AutoCloseable
- Direct Known Subclasses:
InvDatasetFcFmrc,InvDatasetFcGrib,InvDatasetFcPoint
Abstract superclass for Feature Collection Datasets.
This is a InvCatalogRef subclass. So the reference is placed in the parent, but
the catalog itself isnt constructed until the following call from DataRootHandler.makeDynamicCatalog():
match.dataRoot.featCollection.makeCatalog(match.remaining, path, baseURI);
The DatasetFeatureCollection object is held in the DataRootManager's FeatureCollectionCache; it may get closed and recreated.
- Since:
- Mar 3, 2010
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static AllowedServicesprotected final thredds.featurecollection.FeatureCollectionConfigprotected final Stringprotected static Stringprotected thredds.inventory.MFileCollectionManagerprotected thredds.client.catalog.Serviceprotected final thredds.featurecollection.FeatureCollectionTypeprotected static final Stringprotected booleanprotected static final Stringprotected thredds.client.catalog.Serviceprotected final Objectprotected final Stringprotected thredds.client.catalog.Serviceprotected thredds.server.catalog.FeatureCollectionRefprotected InvDatasetFeatureCollection.Stateprotected Stringprotected static final booleanprotected static final Stringprotected thredds.client.catalog.Service -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedInvDatasetFeatureCollection(thredds.server.catalog.FeatureCollectionRef parent, thredds.featurecollection.FeatureCollectionConfig config) -
Method Summary
Modifier and TypeMethodDescriptionprotected void_showStatus(Formatter f, boolean summaryOnly, String type) protected static Stringprotected InvDatasetFeatureCollection.StateA request has come in, check that the state has been initialized.voidclose()static InvDatasetFeatureCollectionfactory(thredds.server.catalog.FeatureCollectionRef parent, thredds.featurecollection.FeatureCollectionConfig config) protected voidprotected StringgetCatalogHref(String what) thredds.featurecollection.FeatureCollectionConfigthredds.inventory.MCollectionucar.nc2.ft2.coverage.CoverageCollectiongetGridCoverage(String matchPath) ucar.nc2.dt.grid.GridDatasetgetGridDataset(String matchPath) Get the associated Grid Dataset, if any.org.slf4j.LoggergetName()ucar.nc2.dataset.NetcdfDatasetgetNetcdfDataset(String matchPath) Get the dataset named by the path.protected StringgetPath()ucar.nc2.ft.FeatureDatasetPointgetPointDataset(String matchPath) Get the associated Point Dataset, if any.ucar.nc2.ft2.simpgeometry.SimpleGeometryFeatureDatasetgetSimpleGeometryDataset(String matchPath) abstract thredds.client.catalog.builder.CatalogBuildermakeCatalog(String match, String orgPath, URI catURI) Get one of the catalogs contained in this collection, called by DataRootHandler.makeDynamicCatalog()protected thredds.client.catalog.builder.CatalogBuildermakeCatalogFiles(URI catURI, InvDatasetFeatureCollection.State localState, List<String> filenames, boolean addLatest) protected thredds.client.catalog.builder.CatalogBuildermakeCatalogTop(URI catURI, InvDatasetFeatureCollection.State localState) Make the containing catalog of this feature collection "http://server:port/thredds/catalog/path/catalog.xml"protected voidprotected abstract thredds.client.catalog.builder.DatasetBuildermakeDatasetTop(URI catURI, InvDatasetFeatureCollection.State localState) protected voidprotected StringmakeFullName(thredds.client.catalog.DatasetNode ds) thredds.client.catalog.builder.CatalogBuildermakeLatest(String matchPath, String reqPath, URI catURI) protected StringmakeMetadataLink(String datasetName, String metadata) protected thredds.client.catalog.ThreddsMetadata.UriResolvedmakeUriResolved(URI baseURI, String href) voidprocessEvent(thredds.inventory.CollectionUpdateEvent event) static voidsetAllowedServices(AllowedServices _allowedServices) static voidvoidshowStatusShort(String type) protected voidupdate(thredds.inventory.CollectionUpdateType force) Collection was changed, update internal objects.protected abstract voidupdateCollection(InvDatasetFeatureCollection.State localState, thredds.inventory.CollectionUpdateType force)
-
Field Details
-
LATEST_DATASET_CATALOG
- See Also:
-
VARIABLES
- See Also:
-
FILES
- See Also:
-
useNetcdfJavaBuilders
protected static final boolean useNetcdfJavaBuilders- See Also:
-
allowedServices
-
contextName
-
parent
protected thredds.server.catalog.FeatureCollectionRef parent -
orgService
protected thredds.client.catalog.Service orgService -
virtualService
protected thredds.client.catalog.Service virtualService -
latestService
protected thredds.client.catalog.Service latestService -
downloadService
protected thredds.client.catalog.Service downloadService -
name
-
configPath
-
fcType
protected final thredds.featurecollection.FeatureCollectionType fcType -
config
protected final thredds.featurecollection.FeatureCollectionConfig config -
topDirectory
-
datasetCollection
protected thredds.inventory.MFileCollectionManager datasetCollection -
state
-
first
protected boolean first -
lock
-
-
Constructor Details
-
InvDatasetFeatureCollection
protected InvDatasetFeatureCollection(thredds.server.catalog.FeatureCollectionRef parent, thredds.featurecollection.FeatureCollectionConfig config)
-
-
Method Details
-
setContextName
-
setAllowedServices
-
buildCatalogServiceHref
-
factory
public static InvDatasetFeatureCollection factory(thredds.server.catalog.FeatureCollectionRef parent, thredds.featurecollection.FeatureCollectionConfig config) -
makeDefaultServices
protected void makeDefaultServices() -
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
makeCollection
protected void makeCollection() -
processEvent
public void processEvent(thredds.inventory.CollectionUpdateEvent event) -
showStatus
-
showStatusShort
-
_showStatus
- Throws:
IOException
-
getPath
-
updateCollection
protected abstract void updateCollection(InvDatasetFeatureCollection.State localState, thredds.inventory.CollectionUpdateType force) -
getCatalogHref
-
firstInit
protected void firstInit() -
checkState
A request has come in, check that the state has been initialized. this is called from the request thread.- Returns:
- a copy of the State
- Throws:
IOException
-
update
Collection was changed, update internal objects. called by CollectionUpdater, trigger via handleCollectionEvent, so in a quartz scheduler thread- Parameters:
force- update type- Throws:
IOException
-
getName
-
getConfigPath
-
getLatestFileName
-
getTopDirectoryLocation
-
getConfig
public thredds.featurecollection.FeatureCollectionConfig getConfig() -
getDatasetCollectionManager
public thredds.inventory.MCollection getDatasetCollectionManager() -
getLogger
public org.slf4j.Logger getLogger() -
makeFullName
-
makeCatalog
public abstract thredds.client.catalog.builder.CatalogBuilder makeCatalog(String match, String orgPath, URI catURI) throws IOException Get one of the catalogs contained in this collection, called by DataRootHandler.makeDynamicCatalog()- Parameters:
match- match.remainingorgPath- the path for the request.catURI- the base URI for the catalog to be made, used to resolve relative URLs.- Returns:
- containing catalog
- Throws:
IOException
-
makeDatasetTop
protected abstract thredds.client.catalog.builder.DatasetBuilder makeDatasetTop(URI catURI, InvDatasetFeatureCollection.State localState) throws IOException - Throws:
IOException
-
makeCatalogTop
protected thredds.client.catalog.builder.CatalogBuilder makeCatalogTop(URI catURI, InvDatasetFeatureCollection.State localState) throws IOException, URISyntaxException Make the containing catalog of this feature collection "http://server:port/thredds/catalog/path/catalog.xml"- Parameters:
catURI- base URI of the requestlocalState- current state to use- Returns:
- the top FMRC catalog
- Throws:
IOException- on I/O errorURISyntaxException- if path is misformed
-
makeCatalogFiles
protected thredds.client.catalog.builder.CatalogBuilder makeCatalogFiles(URI catURI, InvDatasetFeatureCollection.State localState, List<String> filenames, boolean addLatest) throws IOException - Throws:
IOException
-
makeMetadataLink
-
makeUriResolved
-
makeLatest
public thredds.client.catalog.builder.CatalogBuilder makeLatest(String matchPath, String reqPath, URI catURI) throws IOException - Throws:
IOException
-
getPointDataset
Get the associated Point Dataset, if any. called by DatasetHandler.openPointDataset()- Parameters:
matchPath- match.remaining- Returns:
- Grid Dataset, or null if n/a
- Throws:
IOException- on error
-
getGridDataset
Get the associated Grid Dataset, if any. called by DatasetHandler.openGridDataset()- Parameters:
matchPath- match.remaining- Returns:
- Grid Dataset, or null if n/a
- Throws:
IOException- on error
-
getGridCoverage
public ucar.nc2.ft2.coverage.CoverageCollection getGridCoverage(String matchPath) throws IOException - Throws:
IOException
-
getSimpleGeometryDataset
public ucar.nc2.ft2.simpgeometry.SimpleGeometryFeatureDataset getSimpleGeometryDataset(String matchPath) throws IOException - Throws:
IOException
-
getNetcdfDataset
Get the dataset named by the path. called by DatasetHandler.getNetcdfFile()- Parameters:
matchPath- remaining path from match- Returns:
- requested dataset
- Throws:
IOException- if read error
-
getFile
-