Package ucar.nc2.dods

Class DodsNetcdfFiles


  • public class DodsNetcdfFiles
    extends Object
    Static utilities for opendap.
    • Constructor Detail

      • DodsNetcdfFiles

        public DodsNetcdfFiles()
    • Method Detail

      • setDebugFlags

        public static void setDebugFlags​(ucar.nc2.util.DebugFlags debugFlag)
        Debugging
      • canonicalURL

        public static String canonicalURL​(String urlName)
        Create the canonical form of the URL. If the urlName starts with "http:" or "https:", change it to start with "dods:", otherwise leave it alone.
        Parameters:
        urlName - the url string
        Returns:
        canonical form
      • makeDODSname

        public static String makeDODSname​(ucar.nc2.dods.DodsV dodsV)
      • makeShortName

        public static String makeShortName​(String name)
      • makeDODSName

        public static String makeDODSName​(String name)
      • convertToDODSType

        public static int convertToDODSType​(ucar.ma2.DataType dataType)
        Get the DODS data class corresponding to the Netcdf data type. This is the inverse of convertToNCType().
        Parameters:
        dataType - Netcdf data type.
        Returns:
        the corresponding DODS type enum, from opendap.dap.Attribute.XXXX.
      • convertToNCType

        public static ucar.ma2.DataType convertToNCType​(int dodsDataType,
                                                        boolean isUnsigned)
        Get the Netcdf data type corresponding to the DODS data type. This is the inverse of convertToDODSType().
        Parameters:
        dodsDataType - DODS type enum, from dods.dap.Attribute.XXXX.
        Returns:
        the corresponding netcdf DataType.
        See Also:
        isUnsigned(opendap.dap.BaseType)
      • convertToNCType

        public static ucar.ma2.DataType convertToNCType​(BaseType dtype,
                                                        boolean isUnsigned)
        Get the Netcdf data type corresponding to the DODS BaseType class. This is the inverse of convertToDODSType().
        Parameters:
        dtype - DODS BaseType.
        Returns:
        the corresponding netcdf DataType.
        See Also:
        isUnsigned(opendap.dap.BaseType)
      • isUnsigned

        public static boolean isUnsigned​(BaseType dtype)
        Get whether this is an unsigned type.
        Parameters:
        dtype - DODS BaseType.
        Returns:
        true if unsigned