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 java.util.Map<ucar.nc2.Variable,ucar.ma2.Array> |
arraymap |
protected ucar.nc2.util.CancelTask |
cancel |
protected CDMCompiler |
cdmCompiler |
protected ChecksumMode |
checksummode |
protected boolean |
closed |
protected DapContext |
cxt |
protected boolean |
daploaded |
protected DapDataset |
dmr |
protected D4DSP |
dsp |
protected java.lang.String |
dsplocation |
protected static DSPRegistry |
dspregistry
Define a map of known DSP classes.
|
protected java.lang.String |
location |
protected static DapNetcdfFile.NullCancelTask |
nullcancel |
protected XURI |
xuri |
| Constructor and Description |
|---|
DapNetcdfFile(java.lang.String url)
Open a Dap4 connection
|
DapNetcdfFile(java.lang.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.
|
void |
ensuredata() |
void |
ensuredmr()
Do what is necessary to ensure that DMR and DAP compilation will work
|
D4DSP |
getDSP() |
java.lang.String |
getLocation() |
boolean |
isconstrainable() |
protected void |
loadContext() |
java.util.List<ucar.ma2.Array> |
readArrays(java.util.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)
b * Primary read entry point.
|
ucar.ma2.Array |
readSection(java.lang.String variableSection) |
long |
readToByteChannel(ucar.nc2.Variable v,
ucar.ma2.Section section,
java.nio.channels.WritableByteChannel channel)
Read databuffer from a top level Variable
and send databuffer to a WritableByteChannel.
|
protected void |
verifyChecksums() |
addAttribute, addAttribute, addDimension, addGroup, addLocalFieldsToBuilder, addStringVariable, addVariable, addVariable, addVariableAttribute, builder, 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, 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, setRootGroup, setTitle, showCached, showProxies, syncExtend, toBuilder, toNcml, toString, toStringDebug, writeCDL, writeCDL, writeCDL, writeNcml, writeNcmlprotected static final DapNetcdfFile.NullCancelTask nullcancel
protected static DSPRegistry dspregistry
protected boolean allowCompression
protected boolean closed
protected java.lang.String location
protected ucar.nc2.util.CancelTask cancel
protected java.lang.String dsplocation
protected XURI xuri
protected DapContext cxt
protected D4DSP dsp
protected DapDataset dmr
protected CDMCompiler cdmCompiler
protected ChecksumMode checksummode
protected boolean daploaded
protected java.util.Map<ucar.nc2.Variable,ucar.ma2.Array> arraymap
public DapNetcdfFile(java.lang.String location,
ucar.nc2.util.CancelTask cancelTask)
throws java.io.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.
Note also that the URL path should not have any .dap or .dmr
extension since using those is the purview of this class.cancelTask - check if task is cancelled; may be null.java.io.IOExceptionpublic DapNetcdfFile(java.lang.String url)
throws java.io.IOException
url - URL for the request.java.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in interface ucar.nc2.util.cache.FileCacheableclose in class ucar.nc2.NetcdfFilejava.io.IOException - if error when closingpublic boolean isconstrainable()
public java.lang.String getLocation()
getLocation in interface ucar.nc2.util.cache.FileCacheablegetLocation in class ucar.nc2.NetcdfFilepublic D4DSP getDSP()
public java.util.List<ucar.ma2.Array> readArrays(java.util.List<ucar.nc2.Variable> variables)
throws java.io.IOException
readArrays in class ucar.nc2.NetcdfFilevariables - List of type Variablejava.io.IOException - if read errorpublic long readToByteChannel(ucar.nc2.Variable v,
ucar.ma2.Section section,
java.nio.channels.WritableByteChannel channel)
throws java.io.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 WritableByteChanneljava.io.IOException - if read errorucar.ma2.InvalidRangeException - if invalid sectionpublic ucar.ma2.Array readSection(java.lang.String variableSection)
throws java.io.IOException,
ucar.ma2.InvalidRangeException
readSection in class ucar.nc2.NetcdfFilejava.io.IOExceptionucar.ma2.InvalidRangeExceptionprotected ucar.ma2.Array readData(ucar.nc2.Variable cdmvar,
ucar.ma2.Section section)
throws java.io.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.java.io.IOException - if read errorucar.ma2.InvalidRangeException - if invalid sectionprotected void loadContext()
protected void verifyChecksums()
throws DapException
DapExceptionpublic void ensuredmr()
throws java.io.IOException
java.io.IOExceptionpublic void ensuredata()
throws java.io.IOException
java.io.IOException