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 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 |
ncdfile |
protected NodeMap |
nodemap |
protected javax.servlet.http.HttpServletRequest |
request |
protected javax.servlet.http.HttpServletResponse |
response |
context, dmr, PARSEDEBUG, path
Constructor and Description |
---|
CDMDSP() |
CDMDSP(NetcdfFile ncd,
DapContext cxt) |
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(String location,
CancelTask canceltask) |
protected long |
dapsize(Dimension cdmdim) |
protected void |
fillgroup(DapGroup dapgroup,
Group cdmgroup) |
protected Dimension |
finddimdecl(Dimension dimref) |
protected EnumTypedef |
findMatchingEnum(EnumTypedef varenum)
Unfortunately, the CDM Iosp does not
actually use the declared enums.
|
protected Object |
fixvalue(Object o,
DapType datatype) |
CDMNode |
getCDMNode(DapNode dapnode)
Lookup a dapnode in the dap nodemap.
|
DataDataset |
getDataDataset() |
NetcdfDataset |
getNetcdfDataset() |
protected void |
init(NetcdfFile ncfile) |
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.
|
static 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 void |
setRequestResponse() |
protected boolean |
shadows(Group parent,
Group child) |
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, parseDMR, processAttributes, setContext, setDataset, setPath
protected static final boolean DEBUG
protected static final Object FACTORYKEY
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 ncdfile
protected DapFactory factory
protected NodeMap nodemap
protected boolean closed
protected CDMDataDataset data
protected javax.servlet.http.HttpServletRequest request
protected javax.servlet.http.HttpServletResponse response
public CDMDSP()
public CDMDSP(String path, DapContext cxt) throws DapException
DapException
public CDMDSP(NetcdfFile ncd, DapContext cxt) throws DapException
DapException
public static void loadNc4Iosp() throws DapException
DapException
protected void init(NetcdfFile ncfile) throws DapException
DapException
protected void setRequestResponse()
setRequestResponse
in class AbstractDSP
public static boolean match(String path, DapContext context)
public DSP open(String path) throws DapException
open
in interface DSP
open
in class AbstractDSP
DapException
public DSP open(String path, DapContext context) throws DapException
open
in interface DSP
open
in class AbstractDSP
DapException
public void close() throws IOException
IOException
public DataDataset getDataDataset()
getDataDataset
in interface DSP
getDataDataset
in class AbstractDSP
public 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
DapException
protected void fillgroup(DapGroup dapgroup, Group cdmgroup) throws DapException
DapException
protected DapDimension builddim(Dimension cdmdim) throws DapException
DapException
protected DapEnum buildenum(EnumTypedef cdmenum) throws DapException
DapException
protected DapNode buildvariable(Variable cdmvar, DapNode parent) throws DapException
DapException
protected DapNode buildvariable(Variable cdmbasevar, List<Dimension> cdmdims, DapNode parent) throws DapException
DapException
protected DapAtomicVariable buildatomicvar(Variable cdmvar) throws DapException
DapException
protected DapAtomicVariable buildopaquevar(Variable cdmvar) throws DapException
DapException
protected DapAtomicVariable buildstringvar(Variable cdmvar) throws DapException
DapException
protected DapAtomicVariable buildenumvar(Variable cdmvar) throws DapException
DapException
protected EnumTypedef findMatchingEnum(EnumTypedef varenum) throws DapException
DapException
protected DapStructure buildstructvar(Variable cdmvar) throws DapException
DapException
protected DapSequence buildsequence(Variable cdmbasevar) throws DapException
DapException
protected void buildattributes(DapNode node, List<Attribute> attributes) throws DapException
DapException
protected DapAttribute buildattribute(Attribute attr) throws DapException
DapException
protected 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 infoDapException
protected void processmappedvariables(Group g) throws DapException
DapException
protected 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 systemDapException
protected DapGroup buildgroup(Group cdmgroup) throws DapException
DapException
protected long dapsize(Dimension cdmdim)
protected boolean validatecdmtype(DataType datatype, boolean unsigned, Class typeclass)
protected DataDataset buildDataDataset() throws DataException
DataException
protected DataVariable buildData(DapVariable dap) throws DataException
DataException
protected NetcdfFile createNetcdfFile(String location, CancelTask canceltask) throws DapException
DapException
protected boolean suppress(String attrname)
suppress
in class AbstractDSP
attrname
- A non-escaped attribute name to be tested for suppressionCopyright © 1999–2015 UCAR/Unidata. All rights reserved.