public class CDMDSP extends AbstractDSP
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
closed |
protected static String |
DAPVERSION |
protected CDMDataDataset |
data |
protected static boolean |
DEBUG |
protected DapDataset |
dmr |
protected static String |
DMRVERSION |
protected static Set<NetcdfDataset.Enhance> |
ENHANCEMENT |
protected DapFactory |
factory |
protected static Object |
FACTORYKEY |
protected static Class |
NC4CLASS |
protected static boolean |
nc4loaded |
protected NetcdfDataset |
ncfile |
protected NodeMap |
nodemap |
protected static String |
SYNTHETICTAG |
context, path, xuri| Constructor and Description |
|---|
CDMDSP() |
CDMDSP(String path) |
CDMDSP(String path,
DapContext cxt) |
| Modifier and Type | Method and Description |
|---|---|
void |
build()
Extract the metadata from the NetcdfDataset
and build the DMR.
|
protected DapAtomicVariable |
buildatomicvar(Variable cdmvar) |
protected DapAttribute |
buildattribute(Attribute attr) |
protected void |
buildattributes(DapNode node,
List<Attribute> attributes) |
protected DataVariable |
buildData(DapVariable dap) |
protected DataDataset |
buildDataDataset()
Build a tree of Data objects corresponding
to the DMR.
|
protected DapDimension |
builddim(Dimension cdmdim) |
protected void |
builddimrefs(DapVariable dapvar,
List<Dimension> cdmdims)
Assign dimensions to a variable
|
protected DapEnum |
buildenum(EnumTypedef cdmenum) |
protected DapAtomicVariable |
buildenumvar(Variable cdmvar) |
protected DapGroup |
buildgroup(Group cdmgroup) |
protected void |
buildmaps(DapVariable dapvar,
Variable var) |
protected DapAtomicVariable |
buildopaquevar(Variable cdmvar) |
protected DapSequence |
buildsequence(Variable cdmbasevar) |
protected DapAtomicVariable |
buildstringvar(Variable cdmvar) |
protected DapStructure |
buildstructvar(Variable cdmvar) |
protected DapNode |
buildvariable(Variable cdmvar,
DapNode parent) |
protected DapNode |
buildvariable(Variable cdmbasevar,
List<Dimension> cdmdims,
DapNode parent) |
void |
close() |
protected NetcdfFile |
createNetcdfFile() |
protected long |
dapsize(Dimension cdmdim) |
protected void |
fillgroup(DapGroup dapgroup,
Group cdmgroup) |
protected Dimension |
finddimdecl(Dimension dimref) |
CDMNode |
getCDMNode(DapNode dapnode)
Lookup a dapnode in the dap nodemap.
|
DataDataset |
getDataDataset() |
NetcdfDataset |
getNetcdfDataset() |
protected boolean |
isdeclfor(Dimension decl,
Dimension ref) |
static void |
loadNc4Iosp()
Make sure that NC4Iosp is registered and library loaded
|
protected DapNode |
lookupNode(CDMNode cdmnode)
Lookup a cdmnode in the cdmnodemap.
|
boolean |
match(String path,
DapContext context) |
protected DapNode |
newNode(DapSort sort) |
DSP |
open(String path) |
DSP |
open(String path,
DapContext context) |
protected void |
processmappedvariables(Group g) |
protected void |
recordNode(CDMNode cdmnode,
DapNode dapnode)
Record a cdmnode+dapnode in the nodemap.
|
void |
setDataDataset(CDMDataDataset data) |
protected boolean |
suppress(String attrname)
Some attributes that are added by the NetcdfDataset
need to be kept out of the DMR.
|
protected boolean |
validatecdmtype(DataType datatype,
boolean unsigned,
Class typeclass) |
getContext, getDMR, getPath, setContext, setDataset, setPathprotected static final boolean DEBUG
protected static final Object FACTORYKEY
protected static final String SYNTHETICTAG
protected static final String DAPVERSION
protected static final String DMRVERSION
protected static final Class NC4CLASS
protected static Set<NetcdfDataset.Enhance> ENHANCEMENT
protected static boolean nc4loaded
protected NetcdfDataset ncfile
protected DapDataset dmr
protected DapFactory factory
protected NodeMap nodemap
protected boolean closed
protected CDMDataDataset data
public CDMDSP()
public CDMDSP(String path) throws DapException
DapExceptionpublic CDMDSP(String path, DapContext cxt) throws DapException
DapExceptionpublic static void loadNc4Iosp()
throws DapException
DapExceptionpublic boolean match(String path, DapContext context)
match in interface DSPmatch in class AbstractDSPpublic DSP open(String path) throws DapException
open in interface DSPopen in class AbstractDSPDapExceptionpublic DSP open(String path, DapContext context) throws DapException
open in interface DSPopen in class AbstractDSPDapExceptionpublic void close()
public DataDataset getDataDataset()
getDataDataset in interface DSPgetDataDataset in class AbstractDSPpublic NetcdfDataset getNetcdfDataset()
public void setDataDataset(CDMDataDataset data)
public CDMNode getCDMNode(DapNode dapnode)
dapnode - The DapNodeprotected void recordNode(CDMNode cdmnode, DapNode dapnode)
cdmnode - The CMDNode (variable, dimension, etc) to recorddapnode - The DapNode to which the cdmnode is to be mapped.protected DapNode lookupNode(CDMNode cdmnode)
cdmnode - The CMDNode (variable, dimension, etc) to recordpublic void build()
throws DapException
DapExceptionprotected void fillgroup(DapGroup dapgroup, Group cdmgroup) throws DapException
DapExceptionprotected DapDimension builddim(Dimension cdmdim) throws DapException
DapExceptionprotected DapEnum buildenum(EnumTypedef cdmenum) throws DapException
DapExceptionprotected DapNode buildvariable(Variable cdmvar, DapNode parent) throws DapException
DapExceptionprotected DapNode buildvariable(Variable cdmbasevar, List<Dimension> cdmdims, DapNode parent) throws DapException
DapExceptionprotected DapAtomicVariable buildatomicvar(Variable cdmvar) throws DapException
DapExceptionprotected DapAtomicVariable buildopaquevar(Variable cdmvar) throws DapException
DapExceptionprotected DapAtomicVariable buildstringvar(Variable cdmvar) throws DapException
DapExceptionprotected DapAtomicVariable buildenumvar(Variable cdmvar) throws DapException
DapExceptionprotected DapStructure buildstructvar(Variable cdmvar) throws DapException
DapExceptionprotected DapSequence buildsequence(Variable cdmbasevar) throws DapException
DapExceptionprotected void buildattributes(DapNode node, List<Attribute> attributes) throws DapException
DapExceptionprotected DapAttribute buildattribute(Attribute attr) throws DapException
DapExceptionprotected void builddimrefs(DapVariable dapvar, 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 infoDapExceptionprotected void processmappedvariables(Group g) throws DapException
DapExceptionprotected 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 systemDapExceptionprotected DapGroup buildgroup(Group cdmgroup) throws DapException
DapExceptionprotected long dapsize(Dimension cdmdim)
protected boolean validatecdmtype(DataType datatype, boolean unsigned, Class typeclass)
protected DataDataset buildDataDataset() throws DataException
DataExceptionprotected DataVariable buildData(DapVariable dap) throws DataException
DataExceptionprotected NetcdfFile createNetcdfFile() throws DapException
DapExceptionprotected boolean suppress(String attrname)
attrname - A non-escaped attribute name to be tested for suppressionCopyright © 1999–2014 UCAR/Unidata. All rights reserved.