public class CDMDSP
extends dap4.dap4lib.AbstractDSP
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
closed |
protected NodeMap<ucar.nc2.Variable,dap4.core.dmr.DapStructure> |
compoundmap |
protected static boolean |
DEBUG |
protected dap4.core.dmr.DMRFactory |
dmrfactory |
protected static boolean |
DUMPCDL |
protected static java.util.Set<ucar.nc2.dataset.NetcdfDataset.Enhance> |
ENHANCEMENT |
protected static java.lang.String |
FILLVALUE |
protected static boolean |
nc4loaded |
protected ucar.nc2.dataset.NetcdfDataset |
ncdfile |
protected NodeMap<ucar.nc2.CDMNode,dap4.core.dmr.DapNode> |
nodemap |
protected NodeMap<ucar.nc2.Variable,dap4.core.dmr.DapVariable> |
varmap |
protected NodeMap<ucar.nc2.Variable,dap4.core.dmr.DapSequence> |
vlenmap |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addToParent(dap4.core.dmr.DapNode parent,
dap4.core.dmr.DapVariable dapvar) |
protected dap4.core.dmr.DapVariable |
buildatomicvar(ucar.nc2.Variable cdmvar,
dap4.core.dmr.DapNode parent) |
protected dap4.core.dmr.DapAttribute |
buildattribute(ucar.nc2.Attribute cdmattr) |
protected void |
buildattributes(dap4.core.dmr.DapNode node,
ucar.nc2.AttributeContainer attributes) |
protected dap4.core.dmr.DapStructure |
buildcompoundtype(ucar.nc2.Variable cdmvar,
dap4.core.dmr.DapNode parent) |
protected dap4.core.dmr.DapDimension |
builddim(ucar.nc2.Dimension cdmdim) |
protected void |
builddimrefs(dap4.core.dmr.DapVariable dapvar,
java.util.List<ucar.nc2.Dimension> cdmdims)
Assign dimensions to a variable
|
void |
buildDMR()
Extract the metadata from the NetcdfDataset
and build the DMR.
|
protected dap4.core.dmr.DapEnumeration |
buildenum(ucar.nc2.EnumTypedef cdmenum) |
protected dap4.core.dmr.DapVariable |
buildenumvar(ucar.nc2.Variable cdmvar) |
protected dap4.core.dmr.DapGroup |
buildgroup(ucar.nc2.Group cdmgroup) |
protected void |
buildmaps(dap4.core.dmr.DapVariable dapvar,
ucar.nc2.Variable var) |
protected dap4.core.dmr.DapVariable |
buildopaquevar(ucar.nc2.Variable cdmvar) |
protected dap4.core.dmr.DapSequence |
buildseqtype(ucar.nc2.Variable cdmvar) |
protected void |
buildseqtypes(ucar.nc2.Variable cdmvar)
Walk this variable, including fields, to construct sequence types
for any contained vlen dimensions
|
protected dap4.core.dmr.DapVariable |
buildstringvar(ucar.nc2.Variable cdmvar) |
protected dap4.core.dmr.DapVariable |
buildstructvar(ucar.nc2.Variable cdmvar) |
protected dap4.core.dmr.DapVariable |
buildvariable(ucar.nc2.Variable cdmbasevar,
dap4.core.dmr.DapNode parent,
java.util.List<ucar.nc2.Dimension> cdmdims) |
void |
close() |
protected ucar.nc2.NetcdfFile |
createNetcdfFile(java.lang.String location,
ucar.nc2.util.CancelTask canceltask) |
protected long |
dapsize(ucar.nc2.Dimension cdmdim) |
boolean |
dspMatch(java.lang.String path,
dap4.core.util.DapContext context) |
protected void |
fillgroup(dap4.core.dmr.DapGroup dapgroup,
ucar.nc2.Group cdmgroup) |
protected ucar.nc2.Dimension |
finddimdecl(ucar.nc2.Dimension dimref) |
protected ucar.nc2.EnumTypedef |
findMatchingEnum(ucar.nc2.EnumTypedef varenum)
Unfortunately, the CDM Iosp does not
actually use the declared enums.
|
ucar.nc2.dataset.NetcdfDataset |
getNetcdfDataset() |
dap4.core.data.DataCursor |
getVariableData(dap4.core.dmr.DapVariable var) |
protected boolean |
isDimDeclFor(ucar.nc2.Dimension decl,
ucar.nc2.Dimension ref) |
CDMDSP |
open(ucar.nc2.dataset.NetcdfDataset ncd)
Provide an extra API for use in testing
|
CDMDSP |
open(java.lang.String filepath) |
protected void |
processmappedvariables(ucar.nc2.Group g) |
protected void |
recordNode(ucar.nc2.CDMNode cdm,
dap4.core.dmr.DapNode dap)
Track generic CDMNode <-> DapNode
|
protected void |
recordSeq(ucar.nc2.Variable cdm,
dap4.core.dmr.DapSequence dap)
Track Variable <-> DapSequence
|
protected void |
recordStruct(ucar.nc2.Variable cdm,
dap4.core.dmr.DapStructure dap)
Track Variable <-> DapStructure
|
protected void |
recordVar(ucar.nc2.Variable cdm,
dap4.core.dmr.DapVariable dap)
Track Variable <-> DapVariable
|
protected boolean |
shadows(ucar.nc2.Group parent,
ucar.nc2.Group child) |
protected boolean |
suppress(java.lang.String attrname)
Some attributes that are added by the NetcdfDataset
need to be kept out of the DMR.
|
protected boolean |
validatecdmtype(ucar.ma2.DataType datatype,
java.lang.Class typeclass) |
protected static final boolean DEBUG
protected static final boolean DUMPCDL
protected static java.util.Set<ucar.nc2.dataset.NetcdfDataset.Enhance> ENHANCEMENT
protected static final java.lang.String FILLVALUE
protected static boolean nc4loaded
protected ucar.nc2.dataset.NetcdfDataset ncdfile
protected boolean closed
protected dap4.core.dmr.DMRFactory dmrfactory
protected NodeMap<ucar.nc2.Variable,dap4.core.dmr.DapVariable> varmap
protected NodeMap<ucar.nc2.Variable,dap4.core.dmr.DapStructure> compoundmap
protected NodeMap<ucar.nc2.Variable,dap4.core.dmr.DapSequence> vlenmap
protected NodeMap<ucar.nc2.CDMNode,dap4.core.dmr.DapNode> nodemap
public CDMDSP()
public CDMDSP(java.lang.String path)
throws dap4.core.util.DapException
dap4.core.util.DapExceptionpublic boolean dspMatch(java.lang.String path,
dap4.core.util.DapContext context)
public CDMDSP open(java.lang.String filepath) throws dap4.core.util.DapException
open in interface dap4.core.data.DSPopen in class dap4.dap4lib.AbstractDSPfilepath - - absolute path to a filedap4.core.util.DapExceptionpublic CDMDSP open(ucar.nc2.dataset.NetcdfDataset ncd) throws dap4.core.util.DapException
ncd - netcdf datasetdap4.core.util.DapExceptionpublic void close()
throws java.io.IOException
close in interface dap4.core.data.DSPclose in class dap4.dap4lib.AbstractDSPjava.io.IOExceptionpublic dap4.core.data.DataCursor getVariableData(dap4.core.dmr.DapVariable var)
throws dap4.core.util.DapException
getVariableData in interface dap4.core.data.DSPgetVariableData in class dap4.dap4lib.AbstractDSPdap4.core.util.DapExceptionpublic ucar.nc2.dataset.NetcdfDataset getNetcdfDataset()
protected void recordNode(ucar.nc2.CDMNode cdm,
dap4.core.dmr.DapNode dap)
protected void recordVar(ucar.nc2.Variable cdm,
dap4.core.dmr.DapVariable dap)
protected void recordStruct(ucar.nc2.Variable cdm,
dap4.core.dmr.DapStructure dap)
protected void recordSeq(ucar.nc2.Variable cdm,
dap4.core.dmr.DapSequence dap)
public void buildDMR()
throws dap4.core.util.DapException
dap4.core.util.DapExceptionprotected void fillgroup(dap4.core.dmr.DapGroup dapgroup,
ucar.nc2.Group cdmgroup)
throws dap4.core.util.DapException
dap4.core.util.DapExceptionprotected dap4.core.dmr.DapDimension builddim(ucar.nc2.Dimension cdmdim)
throws dap4.core.util.DapException
dap4.core.util.DapExceptionprotected dap4.core.dmr.DapEnumeration buildenum(ucar.nc2.EnumTypedef cdmenum)
throws dap4.core.util.DapException
dap4.core.util.DapExceptionprotected dap4.core.dmr.DapStructure buildcompoundtype(ucar.nc2.Variable cdmvar,
dap4.core.dmr.DapNode parent)
throws dap4.core.util.DapException
dap4.core.util.DapExceptionprotected dap4.core.dmr.DapVariable buildvariable(ucar.nc2.Variable cdmbasevar,
dap4.core.dmr.DapNode parent,
java.util.List<ucar.nc2.Dimension> cdmdims)
throws dap4.core.util.DapException
dap4.core.util.DapExceptionprotected dap4.core.dmr.DapVariable buildatomicvar(ucar.nc2.Variable cdmvar,
dap4.core.dmr.DapNode parent)
throws dap4.core.util.DapException
dap4.core.util.DapExceptionprotected dap4.core.dmr.DapVariable buildopaquevar(ucar.nc2.Variable cdmvar)
throws dap4.core.util.DapException
dap4.core.util.DapExceptionprotected dap4.core.dmr.DapVariable buildstringvar(ucar.nc2.Variable cdmvar)
throws dap4.core.util.DapException
dap4.core.util.DapExceptionprotected dap4.core.dmr.DapVariable buildenumvar(ucar.nc2.Variable cdmvar)
throws dap4.core.util.DapException
dap4.core.util.DapExceptionprotected dap4.core.dmr.DapVariable buildstructvar(ucar.nc2.Variable cdmvar)
throws dap4.core.util.DapException
dap4.core.util.DapExceptionprotected dap4.core.dmr.DapSequence buildseqtype(ucar.nc2.Variable cdmvar)
throws dap4.core.util.DapException
dap4.core.util.DapExceptionprotected void buildseqtypes(ucar.nc2.Variable cdmvar)
throws dap4.core.util.DapException
cdmvar - variable to walkdap4.core.util.DapExceptionprotected void buildattributes(dap4.core.dmr.DapNode node,
ucar.nc2.AttributeContainer attributes)
throws dap4.core.util.DapException
dap4.core.util.DapExceptionprotected dap4.core.dmr.DapAttribute buildattribute(ucar.nc2.Attribute cdmattr)
throws dap4.core.util.DapException
dap4.core.util.DapExceptionprotected void builddimrefs(dap4.core.dmr.DapVariable dapvar,
java.util.List<ucar.nc2.Dimension> cdmdims)
throws dap4.core.util.DapException
dapvar - The variable to which we wish to assign dimensionscdmdims - The cdm dimensions from which we will find the dimension infodap4.core.util.DapExceptionprotected void processmappedvariables(ucar.nc2.Group g)
throws dap4.core.util.DapException
dap4.core.util.DapExceptionprotected void buildmaps(dap4.core.dmr.DapVariable dapvar,
ucar.nc2.Variable var)
throws dap4.core.util.DapException
dapvar - The variable to which we wish to assign mapsvar - The NetcdfDataset variable from which to extract coord systemdap4.core.util.DapExceptionprotected dap4.core.dmr.DapGroup buildgroup(ucar.nc2.Group cdmgroup)
throws dap4.core.util.DapException
dap4.core.util.DapExceptionprotected ucar.nc2.EnumTypedef findMatchingEnum(ucar.nc2.EnumTypedef varenum)
throws dap4.core.util.DapException
dap4.core.util.DapExceptionprotected boolean shadows(ucar.nc2.Group parent,
ucar.nc2.Group child)
protected long dapsize(ucar.nc2.Dimension cdmdim)
protected boolean validatecdmtype(ucar.ma2.DataType datatype,
java.lang.Class typeclass)
protected ucar.nc2.Dimension finddimdecl(ucar.nc2.Dimension dimref)
protected boolean isDimDeclFor(ucar.nc2.Dimension decl,
ucar.nc2.Dimension ref)
protected ucar.nc2.NetcdfFile createNetcdfFile(java.lang.String location,
ucar.nc2.util.CancelTask canceltask)
throws dap4.core.util.DapException
dap4.core.util.DapExceptionprotected boolean suppress(java.lang.String attrname)
suppress in class dap4.dap4lib.AbstractDSPattrname - A non-escaped attribute name to be tested for suppressionprotected void addToParent(dap4.core.dmr.DapNode parent,
dap4.core.dmr.DapVariable dapvar)
throws dap4.core.util.DapException
dap4.core.util.DapException