public class DapNetcdfFile
extends ucar.nc2.NetcdfFile
| Modifier and Type | Class and Description |
|---|---|
protected static class |
DapNetcdfFile.NullCancelTask |
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
allowCompression |
protected Map<ucar.nc2.Variable,ucar.ma2.Array> |
arraymap
Originally, the array for a variable was stored
using var.setCacheData().
|
protected ucar.nc2.util.CancelTask |
cancel |
protected boolean |
closed |
protected dap4.core.data.DSP |
dsp |
protected String |
dsplocation |
protected static dap4.core.data.DSPRegistry |
dspregistry
Define a map of known DSP classes.
|
protected String |
location |
protected static DapNetcdfFile.NullCancelTask |
nullcancel |
protected dap4.dap4lib.XURI |
xuri |
cache, cacheName, debugCompress, debugSPI, dimensions, gattributes, id, IOSP_MESSAGE_ADD_RECORD_STRUCTURE, IOSP_MESSAGE_CONVERT_RECORD_STRUCTURE, IOSP_MESSAGE_RANDOM_ACCESS_FILE, IOSP_MESSAGE_REMOVE_RECORD_STRUCTURE, reservedCdl, reservedFullName, reservedSectionSpec, rootGroup, showRequest, spi, title, variables| Constructor and Description |
|---|
DapNetcdfFile(String url)
Open a Dap4 connection
|
DapNetcdfFile(String location,
ucar.nc2.util.CancelTask cancelTask)
Open a Dap4 connection or file via a D4DSP.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close all resources (files, sockets, etc) associated with this file.
|
dap4.core.data.DSP |
getDSP() |
String |
getLocation() |
boolean |
isconstrainable() |
List<ucar.ma2.Array> |
readArrays(List<ucar.nc2.Variable> variables)
Do a bulk read on a list of Variables and
return a corresponding list of Array that contains the results
of a full read on each Variable.
|
protected ucar.ma2.Array |
readData(ucar.nc2.Variable cdmvar,
ucar.ma2.Section section)
Primary read entry point.
|
ucar.ma2.Array |
readSection(String variableSection) |
long |
readToByteChannel(ucar.nc2.Variable v,
ucar.ma2.Section section,
WritableByteChannel channel)
Read databuffer from a top level Variable
and send databuffer to a WritableByteChannel.
|
addAttribute, addAttribute, addDimension, addGroup, addStringVariable, addVariable, addVariable, addVariableAttribute, canonicalizeUriString, canOpen, empty, findAttribute, findAttValueIgnoreCase, findDimension, findGlobalAttribute, findGlobalAttributeIgnoreCase, findGroup, findVariable, findVariable, findVariableByAttribute, finish, getCacheName, getDetailInfo, getDetailInfo, getDimensions, getFileTypeDescription, getFileTypeId, getFileTypeVersion, getGlobalAttributes, getId, getIosp, getLastModified, getRootGroup, getStructureIterator, getTitle, getUnlimitedDimension, getVariables, hasUnlimitedDimension, iospDeRegister, iospRegistered, makeFullName, makeFullName, makeFullNameSectionSpec, makeFullNameWithString, makeNameUnescaped, makeRecordStructure, makeRootGroup, makeValidCDLName, makeValidCdmObjectName, makeValidPathName, makeValidSectionSpecName, open, open, open, open, open, open, openInMemory, openInMemory, openInMemory, openInMemory, reacquire, read, readAttributeDouble, readAttributeInteger, readToOutputStream, registerIOProvider, registerIOProvider, registerIOProvider, registerIOProviderPreferred, release, removeDimension, removeRecordStructure, removeVariable, sendIospMessage, setCacheName, setDebugFlags, setFileCache, setId, setImmutable, setLocation, setProperty, setTitle, showCached, showProxies, syncExtend, toNcML, toString, toStringDebug, toStringEnd, toStringStart, toStringStart, writeCDL, writeCDL, writeCDL, writeNcML, writeNcMLprotected static final DapNetcdfFile.NullCancelTask nullcancel
protected static dap4.core.data.DSPRegistry dspregistry
protected boolean allowCompression
protected boolean closed
protected String location
protected String dsplocation
protected dap4.dap4lib.XURI xuri
protected dap4.core.data.DSP dsp
protected ucar.nc2.util.CancelTask cancel
protected Map<ucar.nc2.Variable,ucar.ma2.Array> arraymap
public DapNetcdfFile(String location, ucar.nc2.util.CancelTask cancelTask) throws IOException
location - URL for the request. Note that if this is
intended to send to a file oriented
DSP, then if must be converted to an absolute path.cancelTask - check if task is cancelled; may be null.IOExceptionpublic DapNetcdfFile(String url) throws IOException
url - URL for the request.IOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in interface ucar.nc2.util.cache.FileCacheableclose in class ucar.nc2.NetcdfFileIOException - if error when closingpublic boolean isconstrainable()
public String getLocation()
getLocation in interface ucar.nc2.util.cache.FileCacheablegetLocation in class ucar.nc2.NetcdfFilepublic dap4.core.data.DSP getDSP()
public List<ucar.ma2.Array> readArrays(List<ucar.nc2.Variable> variables) throws IOException
readArrays in class ucar.nc2.NetcdfFilevariables - List of type VariableIOException - if read errorpublic long readToByteChannel(ucar.nc2.Variable v,
ucar.ma2.Section section,
WritableByteChannel channel)
throws IOException,
ucar.ma2.InvalidRangeException
readToByteChannel in class ucar.nc2.NetcdfFilev - a top-level Variablesection - the section of databuffer to read.
There must be a Range for each Dimension in the variable,
in order.
Note: no nulls allowed. IOSP may not modify.channel - write databuffer to this WritableByteChannelIOException - if read errorucar.ma2.InvalidRangeException - if invalid sectionpublic ucar.ma2.Array readSection(String variableSection) throws IOException, ucar.ma2.InvalidRangeException
readSection in class ucar.nc2.NetcdfFileIOExceptionucar.ma2.InvalidRangeExceptionprotected ucar.ma2.Array readData(ucar.nc2.Variable cdmvar,
ucar.ma2.Section section)
throws IOException,
ucar.ma2.InvalidRangeException
readData in class ucar.nc2.NetcdfFilecdmvar - A top-level variablesection - the section of databuffer to read.
There must be a Range for each Dimension in the variable,
in order. Note: no nulls allowed.IOException - if read errorucar.ma2.InvalidRangeException - if invalid section