Package dap4.dap4lib.cdm.nc2
Class DMRToCDM
- java.lang.Object
-
- dap4.dap4lib.cdm.nc2.DMRToCDM
-
public class DMRToCDM extends Object
Convert a DSP to corresponding NetcdfFile CDM metadata. Note that we have a problem with
-
-
Field Summary
Fields Modifier and Type Field Description protected DapDatasetdmrprotected D4DSPdspprotected DapNetcdfFilencfileprotected NodeMap<ucar.nc2.CDMNode,DapNode>nodemap
-
Constructor Summary
Constructors Constructor Description DMRToCDM(DapNetcdfFile ncfile, D4DSP dsp)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NodeMap<ucar.nc2.CDMNode,DapNode>create()Do the conversion and return a NodeMap representing the conversion.protected ucar.nc2.AttributecreateAttribute(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, DapAttribute dapattr)protected voidcreateDimension(DapDimension dapdim, ucar.nc2.Group cdmgroup)protected ucar.nc2.DimensioncreateDimensionRef(DapDimension dim, ucar.nc2.Group cdmgroup)protected ucar.nc2.EnumTypedefcreateEnum(DapEnumeration dapenum, ucar.nc2.Group cdmparent)protected voidcreateGroup(DapGroup dapgroup, ucar.nc2.Group cdmparent, ucar.nc2.NetcdfFile ncfile)protected voidcreateVar(DapVariable dapvar, ucar.nc2.NetcdfFile ncfile, ucar.nc2.Group cdmgroup, ucar.nc2.Structure cdmparentstruct)Create a variable or fieldprotected voidfillGroup(ucar.nc2.Group cdmparent, DapGroup dapparent, ucar.nc2.NetcdfFile ncfile)
-
-
-
Field Detail
-
ncfile
protected DapNetcdfFile ncfile
-
dsp
protected D4DSP dsp
-
dmr
protected DapDataset dmr
-
-
Constructor Detail
-
DMRToCDM
public DMRToCDM(DapNetcdfFile ncfile, D4DSP dsp) throws DapException
- Parameters:
ncfile- - the NetcdfFile objectdsp- - the DSP being wrapped- Throws:
DapException
-
-
Method Detail
-
create
public NodeMap<ucar.nc2.CDMNode,DapNode> create() throws DapException
Do the conversion and return a NodeMap representing the conversion.- Throws:
DapException
-
fillGroup
protected void fillGroup(ucar.nc2.Group cdmparent, DapGroup dapparent, ucar.nc2.NetcdfFile ncfile) throws DapException- Throws:
DapException
-
createGroup
protected void createGroup(DapGroup dapgroup, ucar.nc2.Group cdmparent, ucar.nc2.NetcdfFile ncfile) throws DapException
- Throws:
DapException
-
createVar
protected void createVar(DapVariable dapvar, ucar.nc2.NetcdfFile ncfile, ucar.nc2.Group cdmgroup, ucar.nc2.Structure cdmparentstruct) throws DapException
Create 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:
DapException
-
createDimension
protected void createDimension(DapDimension dapdim, ucar.nc2.Group cdmgroup) throws DapException
- Throws:
DapException
-
createDimensionRef
protected ucar.nc2.Dimension createDimensionRef(DapDimension dim, ucar.nc2.Group cdmgroup) throws DapException
- Throws:
DapException
-
createEnum
protected ucar.nc2.EnumTypedef createEnum(DapEnumeration dapenum, ucar.nc2.Group cdmparent) throws DapException
- Throws:
DapException
-
createAttribute
protected ucar.nc2.Attribute createAttribute(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, DapAttribute dapattr)
-
-