Class TdsWmsDatasetFactory

  • All Implemented Interfaces:
    Serializable

    public class TdsWmsDatasetFactory
    extends uk.ac.rdg.resc.edal.dataset.cdm.CdmGridDatasetFactory
    Basically, this class exists to use a NetcdfDataset that has been opened by the TDS into ncWMS. We needed to do this to use NcML wrapped datasets being served by the TDS, but since we already get a NetcdfDataset from the TDS side, we might as well pass it along to ncWMS for non-NcML cases too.
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class uk.ac.rdg.resc.edal.dataset.DatasetFactory

        workingDir
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected ucar.nc2.dataset.NetcdfDataset getNetcdfDatasetFromLocation​(String location, boolean forceRefresh)
      None of this matters really.
      void setNetcdfDataset​(ucar.nc2.dataset.NetcdfDataset ncd)  
      • Methods inherited from class uk.ac.rdg.resc.edal.dataset.cdm.CdmGridDatasetFactory

        generateDataset
      • Methods inherited from class uk.ac.rdg.resc.edal.dataset.cdm.CdmDatasetFactory

        createDataset, createDataset, getParameter, getVariableName
      • Methods inherited from class uk.ac.rdg.resc.edal.dataset.DatasetFactory

        forName, setDefaultDatasetFactoryClass, setWorkingDirectory
    • Constructor Detail

      • TdsWmsDatasetFactory

        public TdsWmsDatasetFactory()
    • Method Detail

      • setNetcdfDataset

        public void setNetcdfDataset​(ucar.nc2.dataset.NetcdfDataset ncd)
      • getNetcdfDatasetFromLocation

        protected ucar.nc2.dataset.NetcdfDataset getNetcdfDatasetFromLocation​(String location,
                                                                              boolean forceRefresh)
        None of this matters really. For NcML datasets, we cannot rely on a location, as the ncml is modifying the dataset in memory. So, we are ignoring location and force reset while accssing the NetcdfDataset directly (which is set in ThreddsWmsCatalogue)
        Overrides:
        getNetcdfDatasetFromLocation in class uk.ac.rdg.resc.edal.dataset.cdm.CdmDatasetFactory
        Parameters:
        location - - location of the netCDF File
        forceRefresh - - this is an ncWMS specific thing
        Returns:
        Throws:
        IOException