Package dap4.cdm.nc2
Class DMRToCDM
- java.lang.Object
-
- dap4.cdm.nc2.DMRToCDM
-
public class DMRToCDM extends Object
Convert a DSP to corresponding NetcdfFile CDM metadata. Note that we have a problem with
-
-
Constructor Summary
Constructors Constructor Description DMRToCDM(DapNetcdfFile ncfile, dap4.core.data.DSP dsp)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NodeMap<ucar.nc2.CDMNode,dap4.core.dmr.DapNode>create()Do the conversion and return a NodeMap representing the conversion.protected ucar.nc2.AttributecreateAttribute(dap4.core.dmr.DapAttribute dapattr)Our goal is to convert, where possible, to a list of objects to a list of values acceptable to the ucar.nc2.Attribute classprotected ucar.nc2.AttributecreateAttribute(String prefix, dap4.core.dmr.DapAttribute dapattr)protected voidcreateDimension(dap4.core.dmr.DapDimension dapdim, ucar.nc2.Group cdmgroup)protected ucar.nc2.DimensioncreateDimensionRef(dap4.core.dmr.DapDimension dim, ucar.nc2.Group cdmgroup)protected ucar.nc2.EnumTypedefcreateEnum(dap4.core.dmr.DapEnumeration dapenum, ucar.nc2.Group cdmparent)protected voidcreateGroup(dap4.core.dmr.DapGroup dapgroup, ucar.nc2.Group cdmparent, ucar.nc2.NetcdfFile ncfile)protected voidcreateVar(dap4.core.dmr.DapVariable dapvar, ucar.nc2.NetcdfFile ncfile, ucar.nc2.Group cdmgroup, ucar.nc2.Structure cdmparentstruct)Create a variable or fieldprotected voidfillGroup(ucar.nc2.Group cdmparent, dap4.core.dmr.DapGroup dapparent, ucar.nc2.NetcdfFile ncfile)
-
-
-
Field Detail
-
ncfile
protected DapNetcdfFile ncfile
-
dsp
protected dap4.core.data.DSP dsp
-
dmr
protected dap4.core.dmr.DapDataset dmr
-
nodemap
protected NodeMap<ucar.nc2.CDMNode,dap4.core.dmr.DapNode> nodemap
-
-
Constructor Detail
-
DMRToCDM
public DMRToCDM(DapNetcdfFile ncfile, dap4.core.data.DSP dsp) throws dap4.core.util.DapException
- Parameters:
ncfile- - the NetcdfFile objectdsp- - the DSP being wrapped- Throws:
dap4.core.util.DapException
-
-
Method Detail
-
create
public NodeMap<ucar.nc2.CDMNode,dap4.core.dmr.DapNode> create() throws dap4.core.util.DapException
Do the conversion and return a NodeMap representing the conversion.- Throws:
dap4.core.util.DapException
-
fillGroup
protected void fillGroup(ucar.nc2.Group cdmparent, dap4.core.dmr.DapGroup dapparent, ucar.nc2.NetcdfFile ncfile) throws dap4.core.util.DapException- Throws:
dap4.core.util.DapException
-
createGroup
protected void createGroup(dap4.core.dmr.DapGroup dapgroup, ucar.nc2.Group cdmparent, ucar.nc2.NetcdfFile ncfile) throws dap4.core.util.DapException- Throws:
dap4.core.util.DapException
-
createVar
protected void createVar(dap4.core.dmr.DapVariable dapvar, ucar.nc2.NetcdfFile ncfile, ucar.nc2.Group cdmgroup, ucar.nc2.Structure cdmparentstruct) throws dap4.core.util.DapExceptionCreate a variable or field- Parameters:
dapvar- the template variablencfile- the containing NetcdfFile (really NetcdfDataset)cdmgroup- the containing CDM groupcdmparentstruct- the containing CDM structure (or null)- Throws:
dap4.core.util.DapException
-
createDimension
protected void createDimension(dap4.core.dmr.DapDimension dapdim, ucar.nc2.Group cdmgroup) throws dap4.core.util.DapException- Throws:
dap4.core.util.DapException
-
createDimensionRef
protected ucar.nc2.Dimension createDimensionRef(dap4.core.dmr.DapDimension dim, ucar.nc2.Group cdmgroup) throws dap4.core.util.DapException- Throws:
dap4.core.util.DapException
-
createEnum
protected ucar.nc2.EnumTypedef createEnum(dap4.core.dmr.DapEnumeration dapenum, ucar.nc2.Group cdmparent) throws dap4.core.util.DapException- Throws:
dap4.core.util.DapException
-
createAttribute
protected ucar.nc2.Attribute createAttribute(dap4.core.dmr.DapAttribute dapattr)
Our goal is to convert, where possible, to a list of objects to a list of values acceptable to the ucar.nc2.Attribute class- Parameters:
dapattr- The dap attribute whose values need to be converted- Returns:
- The created ucar.nc2.Attribute
-
createAttribute
protected ucar.nc2.Attribute createAttribute(String prefix, dap4.core.dmr.DapAttribute dapattr)
-
-