Class TdsWmsDatasetFactory

java.lang.Object
uk.ac.rdg.resc.edal.dataset.DatasetFactory
uk.ac.rdg.resc.edal.dataset.cdm.CdmDatasetFactory
uk.ac.rdg.resc.edal.dataset.cdm.CdmGridDatasetFactory
thredds.server.wms.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:
  • Field Summary

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

    workingDir
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TdsWmsDatasetFactory

      public TdsWmsDatasetFactory()
  • Method Details

    • 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