Package thredds.featurecollection
Class InvDatasetFcGrib
- java.lang.Object
-
- thredds.featurecollection.InvDatasetFeatureCollection
-
- thredds.featurecollection.InvDatasetFcGrib
-
- All Implemented Interfaces:
Closeable,AutoCloseable
@ThreadSafe public class InvDatasetFcGrib extends InvDatasetFeatureCollection
Implement FeatureCollection GRIB - a collection of Grib1 or Grib2 files that are served as Grids.catalogs see makeCatalog() path/catalog.xml // top catalog path/partitionName/catalog.xml path/partitionName/../partitionName/catalog.xml path/latest.xml // latest (resolver)
datasets see findDataset() path/dataset (dataset = BEST, TWOD, TP, "") // top collection, single group path/dataset/groupName // top collection, multiple group path/partitionName/dataset // partition, single group path/partitionName/../partitionName/dataset path/partitionName/dataset/groupName // partition, multiple group path/partitionName/../partitionName/dataset/groupName
files path/partitionName/../partitionName/FILES/filename
- Since:
- 4/15/11
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classInvDatasetFcGrib.StateGrib-
Nested classes/interfaces inherited from class thredds.featurecollection.InvDatasetFeatureCollection
InvDatasetFeatureCollection.State
-
-
Field Summary
-
Fields inherited from class thredds.featurecollection.InvDatasetFeatureCollection
allowedServices, config, configPath, contextName, datasetCollection, downloadService, fcType, FILES, first, LATEST_DATASET_CATALOG, latestService, lock, name, orgService, parent, state, topDirectory, useNetcdfJavaBuilders, VARIABLES, virtualService
-
-
Constructor Summary
Constructors Constructor Description InvDatasetFcGrib(thredds.server.catalog.FeatureCollectionRef parent, thredds.featurecollection.FeatureCollectionConfig config)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected void_showStatus(Formatter f, boolean summaryOnly, String type)protected voidaddFileDatasets(thredds.client.catalog.builder.DatasetBuilder parent, String parentPath, ucar.nc2.grib.collection.GribCollectionImmutable fromGc)voidclose()protected StringgetDatasetNameBest(String dsName)protected StringgetDatasetNameLatest(String dsName)protected StringgetDatasetNameTP(String dsName)protected StringgetDatasetNameTwoD(String dsName)FilegetFile(String remaining)ucar.nc2.ft2.coverage.CoverageCollectiongetGridCoverage(String matchPath)ucar.nc2.dt.grid.GridDatasetgetGridDataset(String matchPath)Get the associated Grid Dataset, if any.ucar.nc2.dataset.NetcdfDatasetgetNetcdfDataset(String matchPath)Get the dataset named by the path.ucar.nc2.grib.collection.GribCollectionImmutable.DatasetgetSingleDatasetOrByTypeName(ucar.nc2.grib.collection.GribCollectionImmutable gc, String typeName)Deprecated.Should not be publicthredds.client.catalog.builder.CatalogBuildermakeCatalog(String match, String reqPath, URI catURI)Get one of the catalogs contained in this collection, called by DataRootHandler.makeDynamicCatalog()protected thredds.client.catalog.builder.DatasetBuildermakeDatasetTop(URI catURI, InvDatasetFeatureCollection.State state)thredds.client.catalog.builder.CatalogBuildermakeLatest(String matchPath, String reqPath, URI catURI)protected voidupdateCollection(InvDatasetFeatureCollection.State state, thredds.inventory.CollectionUpdateType force)-
Methods inherited from class thredds.featurecollection.InvDatasetFeatureCollection
buildCatalogServiceHref, checkState, factory, firstInit, getCatalogHref, getConfig, getConfigPath, getDatasetCollectionManager, getLatestFileName, getLogger, getName, getPath, getPointDataset, getSimpleGeometryDataset, getTopDirectoryLocation, makeCatalogFiles, makeCatalogTop, makeCollection, makeDefaultServices, makeFullName, makeMetadataLink, makeUriResolved, processEvent, setAllowedServices, setContextName, showStatus, showStatusShort, update
-
-
-
-
Method Detail
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInvDatasetFeatureCollection
-
_showStatus
protected void _showStatus(Formatter f, boolean summaryOnly, String type) throws IOException
- Overrides:
_showStatusin classInvDatasetFeatureCollection- Throws:
IOException
-
updateCollection
protected void updateCollection(InvDatasetFeatureCollection.State state, thredds.inventory.CollectionUpdateType force)
- Specified by:
updateCollectionin classInvDatasetFeatureCollection
-
addFileDatasets
protected void addFileDatasets(thredds.client.catalog.builder.DatasetBuilder parent, String parentPath, ucar.nc2.grib.collection.GribCollectionImmutable fromGc) throws IOException- Throws:
IOException
-
makeCatalog
public thredds.client.catalog.builder.CatalogBuilder makeCatalog(String match, String reqPath, URI catURI) throws IOException
Description copied from class:InvDatasetFeatureCollectionGet one of the catalogs contained in this collection, called by DataRootHandler.makeDynamicCatalog()- Specified by:
makeCatalogin classInvDatasetFeatureCollection- Parameters:
match- match.remainingreqPath- 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 thredds.client.catalog.builder.DatasetBuilder makeDatasetTop(URI catURI, InvDatasetFeatureCollection.State state) throws IOException
- Specified by:
makeDatasetTopin classInvDatasetFeatureCollection- Throws:
IOException
-
makeLatest
public thredds.client.catalog.builder.CatalogBuilder makeLatest(String matchPath, String reqPath, URI catURI) throws IOException
- Overrides:
makeLatestin classInvDatasetFeatureCollection- Throws:
IOException
-
getFile
public File getFile(String remaining)
- Overrides:
getFilein classInvDatasetFeatureCollection
-
getGridCoverage
public ucar.nc2.ft2.coverage.CoverageCollection getGridCoverage(String matchPath) throws IOException
- Overrides:
getGridCoveragein classInvDatasetFeatureCollection- Throws:
IOException
-
getGridDataset
public ucar.nc2.dt.grid.GridDataset getGridDataset(String matchPath) throws IOException
Description copied from class:InvDatasetFeatureCollectionGet the associated Grid Dataset, if any. called by DatasetHandler.openGridDataset()- Overrides:
getGridDatasetin classInvDatasetFeatureCollection- Parameters:
matchPath- match.remaining- Returns:
- Grid Dataset, or null if n/a
- Throws:
IOException- on error
-
getNetcdfDataset
public ucar.nc2.dataset.NetcdfDataset getNetcdfDataset(String matchPath) throws IOException
Description copied from class:InvDatasetFeatureCollectionGet the dataset named by the path. called by DatasetHandler.getNetcdfFile()- Overrides:
getNetcdfDatasetin classInvDatasetFeatureCollection- Parameters:
matchPath- remaining path from match- Returns:
- requested dataset
- Throws:
IOException- if read error
-
getSingleDatasetOrByTypeName
@Deprecated public ucar.nc2.grib.collection.GribCollectionImmutable.Dataset getSingleDatasetOrByTypeName(ucar.nc2.grib.collection.GribCollectionImmutable gc, String typeName)
Deprecated.Should not be public- Returns:
- Dataset if typeName matches the type of one of the collection datasets (e.g. "Best", "TwoD"). If the requested typeName is "TP" and there is only one dataset, return it (e.g. dataset is type "MRUTP"). Else return null, e.g. if typeName is the name of a dataset.
-
-