Package thredds.core
Class DatasetManager
java.lang.Object
thredds.core.DatasetManager
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean
@Component
public class DatasetManager
extends Object
implements org.springframework.beans.factory.InitializingBean
Provides an API to obtain the various Dataset objects, given the request Path.
Need to rethink return type - using null to mean many things
- Since:
- 1/23/2015 This needs revision to separate out the url path stuff from the more general file stuff.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidgetLocationFromNcml(String reqPath) getLocationFromRequestPath(String reqPath) static booleanisLocationObjectStore(String location) ucar.nc2.ft2.coverage.CoverageCollectionopenCoverageDataset(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res, String reqPath) openFeatureCollection(thredds.server.catalog.FeatureCollectionRef ftCollection) ucar.nc2.dt.grid.GridDatasetopenGridDataset(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res, String reqPath) Open a file as a GridDataset, using getNetcdfFile(), so that it gets wrapped in NcML if needed.ucar.nc2.NetcdfFileopenNetcdfFile(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res, String reqPath) ucar.nc2.ft.FeatureDatasetPointopenPointDataset(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res, String reqPath) ucar.nc2.ft2.simpgeometry.SimpleGeometryFeatureDatasetopenSimpleGeometryDataset(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res, String reqPath) voidregisterDatasetSource(String className) voidbooleanresourceControlOk(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res, String reqPath) Check if this is making a request for a restricted dataset, and if so, if its allowed.voidsetDatasetTracker(thredds.server.catalog.tracker.DatasetTracker datasetTracker) boolean
-
Constructor Details
-
DatasetManager
public DatasetManager()
-
-
Method Details
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
setDatasetTracker
public void setDatasetTracker(thredds.server.catalog.tracker.DatasetTracker datasetTracker) -
useNetcdfJavaBuilders
public boolean useNetcdfJavaBuilders() -
getLocationFromRequestPath
-
getLocationFromNcml
-
isLocationObjectStore
-
openNetcdfFile
public ucar.nc2.NetcdfFile openNetcdfFile(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res, String reqPath) throws IOException - Throws:
IOException
-
openGridDataset
public ucar.nc2.dt.grid.GridDataset openGridDataset(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res, String reqPath) throws IOException Open a file as a GridDataset, using getNetcdfFile(), so that it gets wrapped in NcML if needed.- Throws:
IOException
-
openPointDataset
public ucar.nc2.ft.FeatureDatasetPoint openPointDataset(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res, String reqPath) throws IOException - Throws:
IOException
-
openCoverageDataset
public ucar.nc2.ft2.coverage.CoverageCollection openCoverageDataset(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res, String reqPath) throws IOException - Throws:
IOException
-
openSimpleGeometryDataset
public ucar.nc2.ft2.simpgeometry.SimpleGeometryFeatureDataset openSimpleGeometryDataset(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res, String reqPath) throws IOException - Throws:
IOException
-
resourceControlOk
public boolean resourceControlOk(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res, String reqPath) Check if this is making a request for a restricted dataset, and if so, if its allowed.- Parameters:
req- the requestres- the responsereqPath- the request path; if null, use req.getPathInfo()- Returns:
- true if ok to proceed. If false, the appropriate error or redirect message has been sent, the caller only needs to return.
-
registerDatasetSource
-
registerDatasetSource
-
openFeatureCollection
public InvDatasetFeatureCollection openFeatureCollection(thredds.server.catalog.FeatureCollectionRef ftCollection) throws IOException - Throws:
IOException
-