Class Nc4Cursor

  • All Implemented Interfaces:
    dap4.core.data.DataCursor

    public class Nc4Cursor
    extends AbstractCursor
    • Constructor Detail

      • Nc4Cursor

        public Nc4Cursor​(dap4.core.data.DataCursor.Scheme scheme,
                         Nc4DSP dsp,
                         dap4.core.dmr.DapVariable template,
                         Nc4Cursor container)
                  throws dap4.core.util.DapException
        Throws:
        dap4.core.util.DapException
      • Nc4Cursor

        public Nc4Cursor​(Nc4Cursor c)
    • Method Detail

      • read

        public Object read​(dap4.core.util.Index index)
                    throws dap4.core.util.DapException
        Specified by:
        read in interface dap4.core.data.DataCursor
        Specified by:
        read in class AbstractCursor
        Throws:
        dap4.core.util.DapException
      • read

        public Object read​(List<dap4.core.util.Slice> slices)
                    throws dap4.core.util.DapException
        Specified by:
        read in interface dap4.core.data.DataCursor
        Specified by:
        read in class AbstractCursor
        Throws:
        dap4.core.util.DapException
      • readField

        public Nc4Cursor readField​(int findex)
                            throws dap4.core.util.DapException
        Specified by:
        readField in interface dap4.core.data.DataCursor
        Specified by:
        readField in class AbstractCursor
        Throws:
        dap4.core.util.DapException
      • getRecordCount

        public long getRecordCount()
        Specified by:
        getRecordCount in interface dap4.core.data.DataCursor
        Overrides:
        getRecordCount in class AbstractCursor
      • readRecord

        public Nc4Cursor readRecord​(long recno)
                             throws dap4.core.util.DapException
        Specified by:
        readRecord in interface dap4.core.data.DataCursor
        Specified by:
        readRecord in class AbstractCursor
        Throws:
        dap4.core.util.DapException
      • getIndex

        public dap4.core.util.Index getIndex()
                                      throws dap4.core.util.DapException
        Specified by:
        getIndex in interface dap4.core.data.DataCursor
        Overrides:
        getIndex in class AbstractCursor
        Throws:
        dap4.core.util.DapException
      • readAtomic

        protected Object readAtomic​(List<dap4.core.util.Slice> slices)
                             throws dap4.core.util.DapException
        Throws:
        dap4.core.util.DapException
      • readAtomicScalar

        protected Object readAtomicScalar​(Nc4Notes.VarNotes vi,
                                          Nc4Notes.TypeNotes ti)
                                   throws dap4.core.util.DapException
        Read a top-level scalar atomic variable
        Parameters:
        vi -
        ti -
        Returns:
        Object scalar
        Throws:
        dap4.core.util.DapException
      • readStructure

        protected Nc4Cursor readStructure​(dap4.core.util.Index index)
                                   throws dap4.core.util.DapException
        Throws:
        dap4.core.util.DapException
      • readSequence

        protected Nc4Cursor readSequence​(dap4.core.util.Index index)
                                  throws dap4.core.util.DapException
        Throws:
        dap4.core.util.DapException
      • getOffset

        public long getOffset()
      • getElementSize

        public long getElementSize()
      • getatomicdata

        protected Object getatomicdata​(dap4.core.dmr.DapType basetype,
                                       long lcount,
                                       long elemsize,
                                       Nc4DSP.Nc4Pointer mem)
      • errcheck

        public static void errcheck​(ucar.nc2.jni.netcdf.Nc4prototypes nc4,
                                    int ret)
                             throws dap4.core.util.DapException
        Throws:
        dap4.core.util.DapException
      • readcheck

        public static void readcheck​(ucar.nc2.jni.netcdf.Nc4prototypes nc4,
                                     int ret)
                              throws dap4.core.util.DapException
        Throws:
        dap4.core.util.DapException
      • getVlenType

        public Nc4Notes.TypeNotes getVlenType​(dap4.core.dmr.DapVariable v)
        If the basetype is sequence (=> isVlen()), then return the type of the first field of this sequence. Otherwise return null.
        Returns:
        the type of the first field
      • debug

        protected void debug()