Package ucar.nc2.dods

Class DodsNetcdfFile

  • All Implemented Interfaces:
    Closeable, AutoCloseable, ucar.nc2.internal.cache.FileCacheable

    @NotThreadSafe
    public class DodsNetcdfFile
    extends ucar.nc2.NetcdfFile
    A DODS dataset as seen through the Netcdf API.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  DodsNetcdfFile.Builder2  
      • Nested classes/interfaces inherited from class ucar.nc2.NetcdfFile

        ucar.nc2.NetcdfFile.Builder<T extends ucar.nc2.NetcdfFile.Builder<T>>
    • Field Summary

      • Fields inherited from class ucar.nc2.NetcdfFile

        cache, IOSP_MESSAGE_ADD_RECORD_STRUCTURE, IOSP_MESSAGE_GET_IOSP, IOSP_MESSAGE_GET_NETCDF_FILE_FORMAT, IOSP_MESSAGE_RANDOM_ACCESS_FILE
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static DodsNetcdfFile.Builder2 builder()  
      void close()  
      void getDetailInfo​(Formatter f)  
      String getFileTypeDescription()  
      String getFileTypeId()  
      protected ucar.array.Array<?> readArrayData​(ucar.nc2.Variable v, ucar.array.Section section)  
      protected ucar.ma2.Array readData​(ucar.nc2.Variable v, ucar.ma2.Section section)  
      ucar.ma2.Array readSection​(String variableSection)  
      ucar.ma2.Array readWithCE​(ucar.nc2.Variable v, String CE)  
      static void setAllowCompression​(boolean b)
      Set whether to allow messages to be compressed.
      static void setAllowSessions​(boolean b)
      Set whether to allow sessions by allowing cookies.
      static void setCoordinateVariablePreloadSize​(int size)
      If preloading, set maximum size of coordinate variables to be preloaded.
      static void setPreload​(boolean b)
      Set whether small variables are preloaded; only turn off for debugging.
      • Methods inherited from class ucar.nc2.NetcdfFile

        addLocalFieldsToBuilder, findAttribute, findDimension, findGlobalAttribute, findGlobalAttributeIgnoreCase, findGroup, findVariable, getDetailInfo, getDimensions, getFileTypeVersion, getGlobalAttributes, getId, getLastModified, getLocation, getRootGroup, getStructureDataArrayIterator, getStructureIterator, getTitle, getUnlimitedDimension, getVariables, hasUnlimitedDimension, reacquire, readSectionArray, release, sendIospMessage, setCachedData, setDebugFlags, setFileCache, showCached, showProxies, toBuilder, toNcml, toString, toStringDebug, writeNcml, writeNcml
    • Method Detail

      • setAllowSessions

        public static void setAllowSessions​(boolean b)
        Set whether to allow sessions by allowing cookies. This only affects requests to the TDS. Setting this to true can eliminate consistency problems for datasets that are being updated.
        Parameters:
        b - true or false. default is false.
      • setAllowCompression

        public static void setAllowCompression​(boolean b)
        Set whether to allow messages to be compressed. LOOK why not true as default?
        Parameters:
        b - true or false.
      • setPreload

        public static void setPreload​(boolean b)
        Set whether small variables are preloaded; only turn off for debugging.
        Parameters:
        b - true if small variables are preloaded (default true)
      • setCoordinateVariablePreloadSize

        public static void setCoordinateVariablePreloadSize​(int size)
        If preloading, set maximum size of coordinate variables to be preloaded.
        Parameters:
        size - maximum size of coordinate variables to be preloaded.
      • close

        public void close()
                   throws IOException
        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface Closeable
        Specified by:
        close in interface ucar.nc2.internal.cache.FileCacheable
        Overrides:
        close in class ucar.nc2.NetcdfFile
        Throws:
        IOException
      • readSection

        public ucar.ma2.Array readSection​(String variableSection)
                                   throws IOException,
                                          ucar.ma2.InvalidRangeException
        Overrides:
        readSection in class ucar.nc2.NetcdfFile
        Throws:
        IOException
        ucar.ma2.InvalidRangeException
      • readArrayData

        protected ucar.array.Array<?> readArrayData​(ucar.nc2.Variable v,
                                                    ucar.array.Section section)
                                             throws IOException,
                                                    ucar.array.InvalidRangeException
        Overrides:
        readArrayData in class ucar.nc2.NetcdfFile
        Throws:
        IOException
        ucar.array.InvalidRangeException
      • readData

        protected ucar.ma2.Array readData​(ucar.nc2.Variable v,
                                          ucar.ma2.Section section)
                                   throws IOException,
                                          ucar.ma2.InvalidRangeException
        Overrides:
        readData in class ucar.nc2.NetcdfFile
        Throws:
        IOException
        ucar.ma2.InvalidRangeException
      • getDetailInfo

        public void getDetailInfo​(Formatter f)
        Overrides:
        getDetailInfo in class ucar.nc2.NetcdfFile
      • getFileTypeId

        public String getFileTypeId()
        Overrides:
        getFileTypeId in class ucar.nc2.NetcdfFile
      • getFileTypeDescription

        public String getFileTypeDescription()
        Overrides:
        getFileTypeDescription in class ucar.nc2.NetcdfFile