libdap
Updated for version 3.17.2
|
#include <DMR.h>
Public Member Functions | |
virtual void | build_using_dds (DDS &dds) |
int | dap_major () const |
int | dap_minor () const |
string | dap_version () const |
DMR () | |
DMR (const DMR &dmr) | |
DMR (D4BaseTypeFactory *factory, const string &name="") | |
DMR (D4BaseTypeFactory *factory, DDS &dds) | |
Build a DMR using a DAP2 DDS. More... | |
string | dmr_version () const |
virtual void | dump (ostream &strm) const |
dumps information about this object More... | |
string | get_namespace () const |
Get the namespace associated with the DDS - likely set only by DDX responses. More... | |
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 kilo bytes. More... | |
string | request_xml_base () const |
Get the URL that will return this DMR/DDX/DataThing. More... | |
long | response_limit () |
Get the maximum response size, in KB. Zero indicates no limit. More... | |
D4Group * | root () |
void | set_dap_version (const string &version_string) |
void | set_dmr_version (const string &v) |
void | set_namespace (const string &ns) |
Set the namespace for this DDS/DDX object/response. More... | |
void | set_request_xml_base (const string &xb) |
void | set_response_limit (long size) |
virtual | ~DMR () |
string | name () const |
void | set_name (const string &n) |
virtual D4BaseTypeFactory * | factory () |
virtual void | set_factory (D4BaseTypeFactory *f) |
string | filename () const |
void | set_filename (const string &fn) |
Protected Member Functions | |
void | m_duplicate (const DMR &dmr) |
Friends | |
class | DMRTest |
DMR is root object for a DAP4 dataset. It holds a D4Group and other information about the dataset (DAP protocol number, DMR version, etc.).
libdap::DMR::DMR | ( | ) |
libdap::DMR::DMR | ( | const DMR & | rhs | ) |
libdap::DMR::DMR | ( | D4BaseTypeFactory * | factory, |
const string & | name = "" |
||
) |
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. |
|
virtual |
|
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 |
|
virtual |
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 or server's specialized types.
|
inline |
|
inline |
|
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 kilo bytes.
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 |
D4Group * libdap::DMR::root | ( | ) |
void libdap::DMR::set_dap_version | ( | const string & | v | ) |
|
inline |
|
inline |
|
inline |