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 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,
AttributeContainer 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 |
isDimDeclFor(Dimension decl,
Dimension ref) |
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, setOrder
protected static final boolean DEBUG
protected static final boolean DUMPCDL
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
DapException
public boolean dspMatch(java.lang.String path, DapContext context)
DSP
public CDMDSP open(java.lang.String filepath) throws DapException
AbstractDSP
open
in interface DSP
open
in class AbstractDSP
filepath
- - absolute path to a fileDapException
public CDMDSP open(NetcdfDataset ncd) throws DapException
ncd
- netcdf datasetDapException
public void close() throws java.io.IOException
close
in interface DSP
close
in class AbstractDSP
java.io.IOException
public DataCursor getVariableData(DapVariable var) throws DapException
getVariableData
in interface DSP
getVariableData
in class AbstractDSP
DapException
public 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
DapException
protected void fillgroup(DapGroup dapgroup, Group cdmgroup) throws DapException
DapException
protected DapDimension builddim(Dimension cdmdim) throws DapException
DapException
protected DapEnumeration buildenum(EnumTypedef cdmenum) throws DapException
DapException
protected DapStructure buildcompoundtype(Variable cdmvar, DapNode parent) throws DapException
DapException
protected DapVariable buildvariable(Variable cdmbasevar, DapNode parent, java.util.List<Dimension> cdmdims) throws DapException
DapException
protected DapVariable buildatomicvar(Variable cdmvar, DapNode parent) throws DapException
DapException
protected DapVariable buildopaquevar(Variable cdmvar) throws DapException
DapException
protected DapVariable buildstringvar(Variable cdmvar) throws DapException
DapException
protected DapVariable buildenumvar(Variable cdmvar) throws DapException
DapException
protected DapVariable buildstructvar(Variable cdmvar) throws DapException
DapException
protected DapSequence buildseqtype(Variable cdmvar) throws DapException
DapException
protected void buildseqtypes(Variable cdmvar) throws DapException
cdmvar
- variable to walkDapException
protected void buildattributes(DapNode node, AttributeContainer attributes) throws DapException
DapException
protected DapAttribute buildattribute(Attribute cdmattr) throws DapException
DapException
protected 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 infoDapException
protected void processmappedvariables(Group g) throws DapException
DapException
protected 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 systemDapException
protected DapGroup buildgroup(Group cdmgroup) throws DapException
DapException
protected EnumTypedef findMatchingEnum(EnumTypedef varenum) throws DapException
DapException
protected long dapsize(Dimension cdmdim)
protected boolean validatecdmtype(DataType datatype, java.lang.Class typeclass)
protected NetcdfFile createNetcdfFile(java.lang.String location, CancelTask canceltask) throws DapException
DapException
protected boolean suppress(java.lang.String attrname)
suppress
in class AbstractDSP
attrname
- A non-escaped attribute name to be tested for suppressionprotected void addToParent(DapNode parent, DapVariable dapvar) throws DapException
DapException