Package dap4.dap4lib.cdm.nc2
Class CDMCompiler
- java.lang.Object
-
- dap4.dap4lib.cdm.nc2.CDMCompiler
-
public class CDMCompiler extends Object
The goal for the CDM compiler is produce a NetcdfDataset whose content comes from a DSP. In a sense it is the inverse of CDMDSP. Compilation implies two translations/wraps. 1. Create a set of CDMNodes corresponding to the relevant nodes in the DMR. 2. Create a set of CDM ucar.ma2.array objects that wrap the DataDataset object. Note that this compiler has nothing to do with D4DataCompiler.
-
-
Constructor Summary
Constructors Constructor Description CDMCompiler(DapNetcdfFile ncfile, D4DSP dsp)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
compileData()
Convert a DataDataset to equivalent CDM data (Array objects).void
compileDMR()
Convert a DMR to equivalent CDM meta-databuffer and populate a NetcdfDataset with it.Map<Variable,Array>
getArrayMap()
NetcdfFile
getNetcdfFile()
NodeMap<CDMNode,DapNode>
getNodeMap()
-
-
-
Field Detail
-
DEBUG
public static boolean DEBUG
-
ncfile
protected DapNetcdfFile ncfile
-
dsp
protected D4DSP dsp
-
dmr
protected DapDataset dmr
-
-
Constructor Detail
-
CDMCompiler
public CDMCompiler(DapNetcdfFile ncfile, D4DSP dsp) throws DapException
Constructor- Parameters:
ncfile
- the target NetcdfDataset (as yet empty)dsp
-- Throws:
DapException
-
-
Method Detail
-
getNetcdfFile
public NetcdfFile getNetcdfFile()
-
compileDMR
public void compileDMR() throws DapException
Convert a DMR to equivalent CDM meta-databuffer and populate a NetcdfDataset with it.- Throws:
DapException
-
compileData
public void compileData() throws DapException
Convert a DataDataset to equivalent CDM data (Array objects). and populate a NetcdfDataset with it.- Throws:
DapException
-
-