bes
Updated for version 3.20.6
|
Size and offset information of data included in DMR++ files. More...
#include <DmrppCommon.h>
Public Member Functions | |
virtual unsigned long | add_chunk (const std::string &data_url, unsigned long long size, unsigned long long offset, const std::vector< unsigned int > &position_in_array) |
virtual unsigned long | add_chunk (const std::string &data_url, unsigned long long size, unsigned long long offset, std::string position_in_array="") |
Add a new chunk as defined by an h4:byteStream element. More... | |
DmrppCommon (const DmrppCommon &dc) | |
virtual void | dump (std::ostream &strm) const |
virtual const std::vector< unsigned int > & | get_chunk_dimension_sizes () const |
virtual unsigned int | get_chunk_size_in_elements () const |
Get the number of elements in this chunk. More... | |
virtual const std::vector< Chunk > & | get_immutable_chunks () const |
virtual void | ingest_compression_type (std::string compression_type_string) |
Parses the text content of the XML element h4:chunkDimensionSizes into the internal vector<unsigned int> representation. More... | |
virtual bool | is_deflate_compression () const |
Returns true if this object utilizes deflate compression. More... | |
virtual bool | is_shuffle_compression () const |
Returns true if this object utilizes shuffle compression. More... | |
virtual void | parse_chunk_dimension_sizes (std::string chunk_dim_sizes_string) |
Set the dimension sizes for a chunk. More... | |
void | print_chunks_element (libdap::XMLWriter &xml, const std::string &name_space="") |
Print the Chunk information. More... | |
void | print_dmrpp (libdap::XMLWriter &writer, bool constrained=false) |
Print the DMR++ response for the Scalar types. More... | |
void | set_chunk_dimension_sizes (const std::vector< size_t > &chunk_dims) |
Set the value of the chunk dimension sizes given a vector of HDF5 hsize_t. More... | |
void | set_deflate (bool value) |
Set the value of the deflate property. More... | |
void | set_shuffle (bool value) |
Set the value of the shuffle property. More... | |
Static Public Attributes | |
static std::string | d_dmrpp_ns = "http://xml.opendap.org/dap/dmrpp/1.0.0#" |
The DMR++ XML namespace. More... | |
static std::string | d_ns_prefix = "dmrpp" |
The XML namespace prefix to use. More... | |
static bool | d_print_chunks = false |
if true, print_dap4() prints chunk elements More... | |
Protected Member Functions | |
virtual std::vector< Chunk > & | get_chunk_vec () |
Returns a reference to the internal Chunk vector. More... | |
void | m_duplicate_common (const DmrppCommon &dc) |
virtual char * | read_atomic (const std::string &name) |
read method for the atomic types More... | |
Friends | |
class | DmrppCommonTest |
class | DmrppParserTest |
Size and offset information of data included in DMR++ files.
A mixin class the provides common behavior for the libdap types when they are used with teh DMR++ handler. This includes instances of the Chunk object, code to help the parser break apart the info in the DMR++ XML documents, and other stuff.
Included in this class is the read_atomic() method that reads the atomic types like Byte, Int32, ... Str.
Definition at line 62 of file DmrppCommon.h.
|
virtual |
Add a new chunk as defined by an h4:byteStream element.
Definition at line 153 of file DmrppCommon.cc.
|
inlinevirtual |
Get the number of elements in this chunk.
Definition at line 139 of file DmrppCommon.h.
|
inlineprotectedvirtual |
Returns a reference to the internal Chunk vector.
Definition at line 82 of file DmrppCommon.h.
|
virtual |
Parses the text content of the XML element h4:chunkDimensionSizes into the internal vector<unsigned int> representation.
compression_type_string | One of "deflate" or "shuffle." |
Definition at line 128 of file DmrppCommon.cc.
|
inlinevirtual |
Returns true if this object utilizes deflate compression.
Definition at line 107 of file DmrppCommon.h.
|
inlinevirtual |
Returns true if this object utilizes shuffle compression.
Definition at line 117 of file DmrppCommon.h.
|
virtual |
Set the dimension sizes for a chunk.
The string argument holds a space-separated list of integers that represent the dimensions of a chunk. Parse that string and store the integers in this instance.
chunk_dims | The sizes as a list of integers separated by spaces, e.g., '50 50' |
Definition at line 90 of file DmrppCommon.cc.
void dmrpp::DmrppCommon::print_chunks_element | ( | libdap::XMLWriter & | xml, |
const std::string & | name_space = "" |
||
) |
Print the Chunk information.
Definition at line 205 of file DmrppCommon.cc.
void dmrpp::DmrppCommon::print_dmrpp | ( | libdap::XMLWriter & | writer, |
bool | constrained = false |
||
) |
Print the DMR++ response for the Scalar types.
xml | Write the XML to this instance of XMLWriter |
constrained | If true, print the constrained DMR. False by default. |
Definition at line 282 of file DmrppCommon.cc.
|
protectedvirtual |
read method for the atomic types
This method is used by the specializations of BaseType::read() in the 'atomic' type classes (libdap::Byte, libdap::In32, ...) to read data when those data are contained in a single chunk (i.e., using HDF5 contiguous storage).
name | The name of the variable, used for error messages |
BESInternalError | on error. |
Definition at line 187 of file DmrppCommon.cc.
|
inline |
Set the value of the chunk dimension sizes given a vector of HDF5 hsize_t.
Definition at line 155 of file DmrppCommon.h.
|
inline |
Set the value of the deflate property.
Definition at line 112 of file DmrppCommon.h.
|
inline |
Set the value of the shuffle property.
Definition at line 122 of file DmrppCommon.h.
|
static |
The DMR++ XML namespace.
Definition at line 90 of file DmrppCommon.h.
|
static |
The XML namespace prefix to use.
Definition at line 91 of file DmrppCommon.h.
|
static |
if true, print_dap4() prints chunk elements
Definition at line 89 of file DmrppCommon.h.