libdap Updated for version 3.21.1
libdap4 is an implementation of OPeNDAP's DAP protocol.
|
#include <DMR.h>
Public Member Functions | |
virtual void | build_using_dds (DDS &dds) |
int | dap_major () const |
int | dap_minor () const |
std::string | dap_version () const |
DMR ()=default | |
DMR (const DMR &dmr) | |
DMR (D4BaseTypeFactory *factory, const std::string &name="") | |
DMR (D4BaseTypeFactory *factory, DDS &dds) | |
Build a DMR using a DAP2 DDS. | |
std::string | dmr_version () const |
void | dump (std::ostream &strm) const override |
dumps information about this object | |
virtual D4BaseTypeFactory * | factory () |
std::string | filename () const |
bool | get_ce_empty () const |
Get the flag that marks the expression constraint as empty. | |
bool | get_global_dio_flag () const |
std::string | get_namespace () const |
Get the namespace associated with the DMR. | |
bool | get_utf8_xml_encoding () const |
virtual DDS * | getDDS () |
Build a DDS from a DMR. | |
virtual bool | is_dap4_projected (std::vector< string > &inventory) |
Scans the inventory of projected variables and their attributes for projected DAP4 types. As it locates projected DAP4 types it adds a description of each to the vector inventory. | |
std::string | name () const |
bool | OK () const |
DMR & | operator= (const DMR &rhs) |
void | print_dap4 (XMLWriter &xml, bool constrained=false) |
long | request_size (bool constrained) |
Get the estimated response size, in kilobytes. | |
uint64_t | request_size_kb (bool constrained) |
Compute the estimated response size, in kilobytes. | |
std::string | request_xml_base () const |
Get the URL that will return this DMR. | |
long | response_limit () const |
Get the maximum response size, in KB. Zero indicates no limit. | |
uint64_t | response_limit_kb () const |
Get the maximum response size, in KB. Zero indicates no limit. | |
D4Group * | root () |
void | set_ce_empty (bool ce_empty) |
Set the flag that marks the expression constraint as empty. | |
void | set_dap_version (const std::string &version_string) |
void | set_dmr_version (const std::string &v) |
virtual void | set_factory (D4BaseTypeFactory *f) |
void | set_filename (const std::string &fn) |
void | set_global_dio_flag (bool dio_flag_value=true) |
void | set_name (const std::string &n) |
void | set_namespace (const std::string &ns) |
Set the namespace for this DMR. | |
void | set_request_xml_base (const std::string &xb) |
void | set_response_limit (long size) |
void | set_response_limit_kb (const uint64_t &size) |
void | set_utf8_xml_encoding (bool encoding_value=true) |
bool | too_big () |
~DMR () override | |
Protected Member Functions | |
void | m_duplicate (const DMR &dmr) |
Copy the contents of the given DMR into this one. This is defined because the we perform a deep copy of the root group object. | |
Friends | |
class | DMRTest |
class | MockDMR |
DMR is root object for a DAP4 dataset. It holds a D4Group and other information about the dataset (DAP protocol number, DMR version, etc.).
|
default |
libdap::DMR::DMR | ( | const DMR & | rhs | ) |
|
explicit |
Make a DMR which uses the given BaseTypeFactory to create variables.
factory | The D4BaseTypeFactory to use when creating instances of DAP4 variables. The caller must ensure the factory's lifetime is at least that of the DMR instance. |
name | The name of the DMR - usually derived from the name of the pathname or table name of the dataset. |
libdap::DMR::DMR | ( | D4BaseTypeFactory * | factory, |
DDS & | dds ) |
Given a DDS from code written for DAP2, build a DAP4 DMR object. This works because DAP4 subsumes DAP2, but there are a few quirks... For each variable in the DDS, transform it to the equivalent DAP4 variable type and then copy the variable's attributes. Most types convert easily. Types that need special treatment are: Array: DAP2 array dimensions must be morphed to DAP4 Sequence: Make a D4Sequence Grid: Make a coverage; assume Grids with the same dimension names have 'shared dimensions' and that maps with the same names are shared too.
factory | Factory class used to make new variables |
dds | Get the variables to convert from this DAP2 DDS. |
|
override |
|
virtual |
If we have a DDS that includes Attributes, use it to build the DMR. This will copy all of the variables in the DDS into the DMR using BaseType::transform_to_dap4(), so the actual types added can be controlled by code that specializes the various type classes.
dds | Read variables and Attributes from this DDS |
|
overridevirtual |
dumps information about this object
Displays the pointer value of this instance and then calls parent dump
strm | C++ i/o stream to dump the information to |
Implements libdap::DapObj.
|
inlinevirtual |
Get/set the factory which makes instances of the variables. Specialize D4BaseTypeFactory so that a DMR will be populated with your client's or server's specialized types.
|
inline |
|
inline |
|
inline |
|
virtual |
Build a DDS from a DMR, collapsing DAP4 Groups, transforming Arrays to Grids as needed, and moving the attributes around to match the new variables. All of the variables in the returned DDS object are newly allocated with separate lifetimes from the objects in the DMR. They are made using ptr_duplicate() so that all of the variables mirror specializations for the various types. That is, if the HDF5 handler built the DMR, then the resulting DDS will hold instances of H5Int32, etc.
|
virtual |
Scans the inventory of projected variables and their attributes for projected DAP4 types. As it locates projected DAP4 types it adds a description of each to the vector inventory.
inventory |
|
protected |
|
inline |
|
inline |
void libdap::DMR::print_dap4 | ( | XMLWriter & | xml, |
bool | constrained = false ) |
long libdap::DMR::request_size | ( | bool | constrained | ) |
Get the estimated response size, in kilobytes.
Get the size of a response, in kilobytes. This method looks at the variables in the DMR a computes the number of bytes in the response.
constrained | Should the size of the whole DMR be used or should the current constraint be taken into account? |
uint64_t libdap::DMR::request_size_kb | ( | bool | constrained | ) |
Compute the estimated response size, in kilobytes.
constrained |
Get the size of a response, in kilobytes. This method looks at the variables in the DMR a computes the number of bytes in the response.
constrained | Should the size of the whole DMR be used or should the current constraint be taken into account? |
|
inline |
|
inline |
|
inline |
D4Group * libdap::DMR::root | ( | ) |
Return the root group of this Dataset. If no root group has been set, use the D4BaseType factory to make it.
Get the root group for this DMR. This accessor allocates the root group if one does not exist using the factory class bound to this DMR
|
inline |
void libdap::DMR::set_dap_version | ( | const std::string & | version_string | ) |
|
inline |
|
inlinevirtual |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |