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 Details

    • DatasetManager

      public DatasetManager()
  • Method Details

    • afterPropertiesSet

      public void afterPropertiesSet() throws Exception
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Throws:
      Exception
    • setDatasetTracker

      public void setDatasetTracker(thredds.server.catalog.tracker.DatasetTracker datasetTracker)
    • useNetcdfJavaBuilders

      public boolean useNetcdfJavaBuilders()
    • getLocationFromRequestPath

      public String getLocationFromRequestPath(String reqPath)
    • getLocationFromNcml

      public String getLocationFromNcml(String reqPath)
    • isLocationObjectStore

      public static boolean isLocationObjectStore(String location)
    • 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 request
      res - the response
      reqPath - 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

      public void registerDatasetSource(String className)
    • registerDatasetSource

      public void registerDatasetSource(DatasetSource v)
    • openFeatureCollection

      public InvDatasetFeatureCollection openFeatureCollection(thredds.server.catalog.FeatureCollectionRef ftCollection) throws IOException
      Throws:
      IOException