Package dap4.dap4lib.netcdf
Class Nc4DSP
- java.lang.Object
-
- dap4.dap4lib.AbstractDSP
-
- dap4.dap4lib.netcdf.Nc4DSP
-
- All Implemented Interfaces:
dap4.core.data.DSP
public class Nc4DSP extends AbstractDSP
DSP for reading netcdf files through jni interface to netcdf4 library
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNc4DSP.Nc4PointerProvide a wrapper for pointers that tracks the size.
-
Field Summary
Fields Modifier and Type Field Description protected Map<Nc4Notes.NoteSort,Map<Long,Nc4Notes.Notes>>allnotesprotected booleanclosedstatic booleanDEBUGprotected dap4.core.dmr.DMRFactorydmrfactorystatic booleanDUMPDMRstatic String[]EXTENSIONSprotected Stringfilepathprotected intformatprotected intmodestatic intNC_GRPNULLstatic intNC_IDNULLstatic intNC_NOERRprotected static ucar.nc2.jni.netcdf.Nc4prototypesnc4protected intncidprotected booleantrace-
Fields inherited from class dap4.dap4lib.AbstractDSP
context, DAPVERSION, dmr, DMRNS, DMRVERSION, location, PARSEDEBUG, rootcursor, TESTING, UCARTAGOPAQUE, UCARTAGORIGTYPE, UCARTAGUNLIMITED, UCARTAGVLEN, USEDOM, variables
-
-
Constructor Summary
Constructors Constructor Description Nc4DSP()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidallnotesInit()voidclose()booleandspMatch(String path, dap4.core.util.DapContext context)A path is file if it has no base protocol or is file:Nc4Notes.Notesfind(long id, Nc4Notes.NoteSort sort)ucar.nc2.jni.netcdf.Nc4prototypesgetJNI()StringgetLocation()Nc4CursorgetVariableData(dap4.core.dmr.DapVariable var)static StringmakeString(byte[] b)protected Nc4Notes.NoteSortnoteSortFor(dap4.core.dmr.DapNode node)Nc4DSPopen(String filepath)"open" a reference to a data source and return the DSP wrapper.-
Methods inherited from class dap4.dap4lib.AbstractDSP
addVariableData, getChecksumMode, getContext, getDMR, getOrder, parseDMR, printDMR, processAttributes, setChecksumMode, setContext, setDataset, setDMR, setLocation, setOrder, suppress
-
-
-
-
Field Detail
-
DEBUG
public static final boolean DEBUG
- See Also:
- Constant Field Values
-
DUMPDMR
public static final boolean DUMPDMR
- See Also:
- Constant Field Values
-
EXTENSIONS
public static String[] EXTENSIONS
-
NC_GRPNULL
public static final int NC_GRPNULL
- See Also:
- Constant Field Values
-
NC_IDNULL
public static final int NC_IDNULL
- See Also:
- Constant Field Values
-
NC_NOERR
public static final int NC_NOERR
- See Also:
- Constant Field Values
-
nc4
protected static ucar.nc2.jni.netcdf.Nc4prototypes nc4
-
allnotes
protected Map<Nc4Notes.NoteSort,Map<Long,Nc4Notes.Notes>> allnotes
-
trace
protected boolean trace
-
closed
protected boolean closed
-
ncid
protected int ncid
-
format
protected int format
-
mode
protected int mode
-
filepath
protected String filepath
-
dmrfactory
protected dap4.core.dmr.DMRFactory dmrfactory
-
-
Method Detail
-
dspMatch
public boolean dspMatch(String path, dap4.core.util.DapContext context)
A path is file if it has no base protocol or is file:- Parameters:
path-context- Any parameters that may help to decide.- Returns:
- true if this path appears to be processible by this DSP
-
find
public Nc4Notes.Notes find(long id, Nc4Notes.NoteSort sort)
-
noteSortFor
protected Nc4Notes.NoteSort noteSortFor(dap4.core.dmr.DapNode node)
-
allnotesInit
protected void allnotesInit()
-
open
public Nc4DSP open(String filepath) throws dap4.core.util.DapException
Description copied from class:AbstractDSP"open" a reference to a data source and return the DSP wrapper.- Specified by:
openin interfacedap4.core.data.DSP- Specified by:
openin classAbstractDSP- Parameters:
filepath- - Object that defines the data source- Returns:
- = wrapping dsp
- Throws:
dap4.core.util.DapException
-
close
public void close() throws dap4.core.util.DapException- Specified by:
closein interfacedap4.core.data.DSP- Specified by:
closein classAbstractDSP- Throws:
dap4.core.util.DapException
-
getVariableData
public Nc4Cursor getVariableData(dap4.core.dmr.DapVariable var) throws dap4.core.util.DapException
- Specified by:
getVariableDatain interfacedap4.core.data.DSP- Overrides:
getVariableDatain classAbstractDSP- Throws:
dap4.core.util.DapException
-
getJNI
public ucar.nc2.jni.netcdf.Nc4prototypes getJNI()
-
getLocation
public String getLocation()
- Specified by:
getLocationin interfacedap4.core.data.DSP- Overrides:
getLocationin classAbstractDSP
-
makeString
public static String makeString(byte[] b)
-
-