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 DapDataset
dmr
protected D4DSP
dsp
protected DapNetcdfFile
ncfile
protected NodeMap<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<CDMNode,DapNode>
create()
Do the conversion and return a NodeMap representing the conversion.protected 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 classprotected Attribute
createAttribute(String prefix, DapAttribute dapattr)
protected void
createDimension(DapDimension dapdim, Group cdmgroup)
protected Dimension
createDimensionRef(DapDimension dim, Group cdmgroup)
protected EnumTypedef
createEnum(DapEnumeration dapenum, Group cdmparent)
protected void
createGroup(DapGroup dapgroup, Group cdmparent, NetcdfFile ncfile)
protected void
createVar(DapVariable dapvar, NetcdfFile ncfile, Group cdmgroup, Structure cdmparentstruct)
Create a variable or fieldprotected void
fillGroup(Group cdmparent, DapGroup dapparent, 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<CDMNode,DapNode> create() throws DapException
Do the conversion and return a NodeMap representing the conversion.- Throws:
DapException
-
fillGroup
protected void fillGroup(Group cdmparent, DapGroup dapparent, NetcdfFile ncfile) throws DapException
- Throws:
DapException
-
createGroup
protected void createGroup(DapGroup dapgroup, Group cdmparent, NetcdfFile ncfile) throws DapException
- Throws:
DapException
-
createVar
protected void createVar(DapVariable dapvar, NetcdfFile ncfile, Group cdmgroup, 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, Group cdmgroup) throws DapException
- Throws:
DapException
-
createDimensionRef
protected Dimension createDimensionRef(DapDimension dim, Group cdmgroup) throws DapException
- Throws:
DapException
-
createEnum
protected EnumTypedef createEnum(DapEnumeration dapenum, Group cdmparent) throws DapException
- Throws:
DapException
-
createAttribute
protected 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 Attribute createAttribute(String prefix, DapAttribute dapattr)
-
-