public class DapNetcdfFile extends NetcdfFile
| Modifier and Type | Class and Description |
|---|---|
protected static class |
DapNetcdfFile.NullCancelTask |
NetcdfFile.Builder<T extends NetcdfFile.Builder<T>>| Modifier and Type | Field and Description |
|---|---|
protected boolean |
allowCompression |
protected java.util.Map<Variable,Array> |
arraymap |
protected 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 |
cache, dimensions, gattributes, id, iosp, IOSP_MESSAGE_ADD_RECORD_STRUCTURE, IOSP_MESSAGE_CONVERT_RECORD_STRUCTURE, IOSP_MESSAGE_GET_NETCDF_FILE_FORMAT, IOSP_MESSAGE_RANDOM_ACCESS_FILE, IOSP_MESSAGE_REMOVE_RECORD_STRUCTURE, rootGroup, title, variables| Constructor and Description |
|---|
DapNetcdfFile(java.lang.String url)
Open a Dap4 connection
|
DapNetcdfFile(java.lang.String location,
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()
Get the NetcdfFile location.
|
boolean |
isconstrainable() |
protected void |
loadContext() |
java.util.List<Array> |
readArrays(java.util.List<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 Array |
readData(Variable cdmvar,
Section section)
b * Primary read entry point.
|
Array |
readSection(java.lang.String variableSection)
Read a variable using the given section specification.
|
long |
readToByteChannel(Variable v,
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 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
public DapNetcdfFile(java.lang.String location,
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 FileCacheableclose in class NetcdfFilejava.io.IOException - if error when closingpublic boolean isconstrainable()
public java.lang.String getLocation()
NetcdfFilegetLocation in interface FileCacheablegetLocation in class NetcdfFilepublic D4DSP getDSP()
public java.util.List<Array> readArrays(java.util.List<Variable> variables) throws java.io.IOException
readArrays in class NetcdfFilevariables - List of type Variablejava.io.IOException - if read errorpublic long readToByteChannel(Variable v, Section section, java.nio.channels.WritableByteChannel channel) throws java.io.IOException, InvalidRangeException
readToByteChannel in class 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 errorInvalidRangeException - if invalid sectionpublic Array readSection(java.lang.String variableSection) throws java.io.IOException, InvalidRangeException
NetcdfFilereadSection in class NetcdfFilevariableSection - the constraint expression.java.io.IOException - if errorInvalidRangeException - if variableSection is invalidprotected Array readData(Variable cdmvar, Section section) throws java.io.IOException, InvalidRangeException
readData in class 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 errorInvalidRangeException - 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