public class CDMDSP extends AbstractDSP
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
closed |
protected NodeMap<Variable,DapStructure> |
compoundmap |
protected static boolean |
DEBUG |
protected DMRFactory |
dmrfactory |
protected static boolean |
DUMPCDL |
protected static java.util.Set<NetcdfDataset.Enhance> |
ENHANCEMENT |
protected static java.lang.String |
FILLVALUE |
protected static java.lang.Class |
NC4CLASS |
protected static boolean |
nc4loaded |
protected NetcdfDataset |
ncdfile |
protected NodeMap<CDMNode,DapNode> |
nodemap |
protected NodeMap<Variable,DapVariable> |
varmap |
protected NodeMap<Variable,DapSequence> |
vlenmap |
context, DAPVERSION, dmr, DMRNS, DMRVERSION, location, PARSEDEBUG, rootcursor, TESTING, UCARTAGOPAQUE, UCARTAGORIGTYPE, UCARTAGUNLIMITED, UCARTAGVLEN, USEDOM, variables| Modifier and Type | Method and Description |
|---|---|
protected void |
addToParent(DapNode parent,
DapVariable dapvar) |
protected DapVariable |
buildatomicvar(Variable cdmvar,
DapNode parent) |
protected DapAttribute |
buildattribute(Attribute cdmattr) |
protected void |
buildattributes(DapNode node,
java.util.List<Attribute> attributes) |
protected DapStructure |
buildcompoundtype(Variable cdmvar,
DapNode parent) |
protected DapDimension |
builddim(Dimension cdmdim) |
protected void |
builddimrefs(DapVariable dapvar,
java.util.List<Dimension> cdmdims)
Assign dimensions to a variable
|
void |
buildDMR()
Extract the metadata from the NetcdfDataset
and build the DMR.
|
protected DapEnumeration |
buildenum(EnumTypedef cdmenum) |
protected DapVariable |
buildenumvar(Variable cdmvar) |
protected DapGroup |
buildgroup(Group cdmgroup) |
protected void |
buildmaps(DapVariable dapvar,
Variable var) |
protected DapVariable |
buildopaquevar(Variable cdmvar) |
protected DapSequence |
buildseqtype(Variable cdmvar) |
protected void |
buildseqtypes(Variable cdmvar)
Walk this variable, including fields, to construct sequence types
for any contained vlen dimensions
|
protected DapVariable |
buildstringvar(Variable cdmvar) |
protected DapVariable |
buildstructvar(Variable cdmvar) |
protected DapVariable |
buildvariable(Variable cdmbasevar,
DapNode parent,
java.util.List<Dimension> cdmdims) |
void |
close() |
protected NetcdfFile |
createNetcdfFile(java.lang.String location,
CancelTask canceltask) |
protected long |
dapsize(Dimension cdmdim) |
boolean |
dspMatch(java.lang.String path,
DapContext context)
Determine if a path refers to an object processable by this DSP
|
protected void |
fillgroup(DapGroup dapgroup,
Group cdmgroup) |
protected Dimension |
finddimdecl(Dimension dimref) |
protected EnumTypedef |
findMatchingEnum(EnumTypedef varenum)
Unfortunately, the CDM Iosp does not
actually use the declared enums.
|
NetcdfDataset |
getNetcdfDataset() |
DataCursor |
getVariableData(DapVariable var) |
protected boolean |
isdeclfor(Dimension decl,
Dimension ref) |
static void |
loadNc4Iosp()
Make sure that NC4Iosp is registered and library loaded
(Is this really the right place for this?)
|
CDMDSP |
open(NetcdfDataset ncd)
Provide an extra API for use in testing
|
CDMDSP |
open(java.lang.String filepath)
"open" a reference to a data source and return the DSP wrapper.
|
protected void |
processmappedvariables(Group g) |
protected void |
recordNode(CDMNode cdm,
DapNode dap)
Track generic CDMNode <-> DapNode
|
protected void |
recordSeq(Variable cdm,
DapSequence dap)
Track Variable <-> DapSequence
|
protected void |
recordStruct(Variable cdm,
DapStructure dap)
Track Variable <-> DapStructure
|
protected void |
recordVar(Variable cdm,
DapVariable dap)
Track Variable <-> DapVariable
|
protected boolean |
shadows(Group parent,
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(DataType datatype,
java.lang.Class typeclass) |
addVariableData, getChecksumMode, getContext, getDMR, getLocation, getOrder, parseDMR, printDMR, processAttributes, setChecksumMode, setContext, setDataset, setDMR, setLocation, setOrderprotected static final boolean DEBUG
protected static final boolean DUMPCDL
protected static final java.lang.Class NC4CLASS
protected static java.util.Set<NetcdfDataset.Enhance> ENHANCEMENT
protected static final java.lang.String FILLVALUE
protected static boolean nc4loaded
protected NetcdfDataset ncdfile
protected boolean closed
protected DMRFactory dmrfactory
protected NodeMap<Variable,DapVariable> varmap
protected NodeMap<Variable,DapStructure> compoundmap
protected NodeMap<Variable,DapSequence> vlenmap
public CDMDSP()
public CDMDSP(java.lang.String path)
throws DapException
DapExceptionpublic static void loadNc4Iosp()
throws DapException
DapExceptionpublic boolean dspMatch(java.lang.String path,
DapContext context)
DSPpublic CDMDSP open(java.lang.String filepath) throws DapException
AbstractDSPopen in interface DSPopen in class AbstractDSPfilepath - - absolute path to a fileDapExceptionpublic CDMDSP open(NetcdfDataset ncd) throws DapException
ncd - DapExceptionpublic void close()
throws java.io.IOException
close in interface DSPclose in class AbstractDSPjava.io.IOExceptionpublic DataCursor getVariableData(DapVariable var) throws DapException
getVariableData in interface DSPgetVariableData in class AbstractDSPDapExceptionpublic NetcdfDataset getNetcdfDataset()
protected void recordVar(Variable cdm, DapVariable dap)
protected void recordStruct(Variable cdm, DapStructure dap)
protected void recordSeq(Variable cdm, DapSequence dap)
public void buildDMR()
throws DapException
DapExceptionprotected void fillgroup(DapGroup dapgroup, Group cdmgroup) throws DapException
DapExceptionprotected DapDimension builddim(Dimension cdmdim) throws DapException
DapExceptionprotected DapEnumeration buildenum(EnumTypedef cdmenum) throws DapException
DapExceptionprotected DapStructure buildcompoundtype(Variable cdmvar, DapNode parent) throws DapException
DapExceptionprotected DapVariable buildvariable(Variable cdmbasevar, DapNode parent, java.util.List<Dimension> cdmdims) throws DapException
DapExceptionprotected DapVariable buildatomicvar(Variable cdmvar, DapNode parent) throws DapException
DapExceptionprotected DapVariable buildopaquevar(Variable cdmvar) throws DapException
DapExceptionprotected DapVariable buildstringvar(Variable cdmvar) throws DapException
DapExceptionprotected DapVariable buildenumvar(Variable cdmvar) throws DapException
DapExceptionprotected DapVariable buildstructvar(Variable cdmvar) throws DapException
DapExceptionprotected DapSequence buildseqtype(Variable cdmvar) throws DapException
DapExceptionprotected void buildseqtypes(Variable cdmvar) throws DapException
cdmvar - variable to walkDapExceptionprotected void buildattributes(DapNode node, java.util.List<Attribute> attributes) throws DapException
DapExceptionprotected DapAttribute buildattribute(Attribute cdmattr) throws DapException
DapExceptionprotected void builddimrefs(DapVariable dapvar, java.util.List<Dimension> cdmdims) throws DapException
dapvar - The variable to which we wish to assign dimensionscdmdims - The cdm dimensions from which we will find the dimension infoDapExceptionprotected void processmappedvariables(Group g) throws DapException
DapExceptionprotected void buildmaps(DapVariable dapvar, Variable var) throws DapException
dapvar - The variable to which we wish to assign mapsvar - The NetcdfDataset variable from which to extract coord systemDapExceptionprotected DapGroup buildgroup(Group cdmgroup) throws DapException
DapExceptionprotected EnumTypedef findMatchingEnum(EnumTypedef varenum) throws DapException
DapExceptionprotected long dapsize(Dimension cdmdim)
protected boolean validatecdmtype(DataType datatype, java.lang.Class typeclass)
protected NetcdfFile createNetcdfFile(java.lang.String location, CancelTask canceltask) throws DapException
DapExceptionprotected boolean suppress(java.lang.String attrname)
suppress in class AbstractDSPattrname - A non-escaped attribute name to be tested for suppressionprotected void addToParent(DapNode parent, DapVariable dapvar) throws DapException
DapException