bes
Updated for version 3.20.8
|
Extend libdap::Array so that a handler can read data using a DMR++ file. More...
#include <DmrppArray.h>
Public Member Functions | |
virtual unsigned long | add_chunk (const std::string &data_url, const std::string &byte_order, unsigned long long size, const unsigned long long offset, const std::vector< unsigned int > &position_in_array) |
virtual unsigned long | add_chunk (const std::string &data_url, const std::string &byte_order, unsigned long long size, unsigned long long offset, const std::string &position_in_array="") |
Add a new chunk as defined by an h4:byteStream element. More... | |
DmrppArray (const DmrppArray &rhs) | |
DmrppArray (const std::string &n, const std::string &d, libdap::BaseType *v) | |
DmrppArray (const std::string &n, libdap::BaseType *v) | |
virtual void | dump (ostream &strm) const |
virtual void | dump (std::ostream &strm) const |
virtual std::string | get_byte_order () 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 std::vector< std::shared_ptr< Chunk > > | get_immutable_chunks () const |
A const reference to the vector of chunks. More... | |
virtual std::vector< unsigned int > | get_shape (bool constrained) |
Get the array shape. More... | |
virtual unsigned long long | get_size (bool constrained=false) |
Return the total number of elements in this Array. More... | |
virtual void | ingest_byte_order (const std::string &byte_order_string) |
Parses the text content of the XML element chunks:byteOrder. More... | |
virtual void | ingest_compression_type (const 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_compact_layout () const |
Returns true if this object utilizes COMPACT layout. 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... | |
DmrppArray & | operator= (const DmrppArray &rhs) |
virtual void | parse_chunk_dimension_sizes (const 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_compact_element (libdap::XMLWriter &xml, const std::string &name_space="", const std::string &encoded="") |
Print the Compact base64-encoded information. More... | |
virtual void | print_dap4 (libdap::XMLWriter &writer, bool constrained=false) |
Shadow libdap::Array::print_dap4() - optionally prints DMR++ chunk information. More... | |
void | print_dmrpp (libdap::XMLWriter &writer, bool constrained=false) |
Print the DMR++ response for the Scalar types. More... | |
virtual libdap::BaseType * | ptr_duplicate () |
virtual bool | read () |
Read data for the array. 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_compact (bool value) |
Set the value of the compact property. 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... | |
virtual bool | twiddle_bytes () const |
Returns true if this object utilizes shuffle compression. 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< std::shared_ptr< Chunk > > | get_chunks () |
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 | |
void | process_one_chunk (std::shared_ptr< Chunk > chunk, DmrppArray *array, const vector< unsigned int > &constrained_array_shape) |
void | process_one_chunk_unconstrained (std::shared_ptr< Chunk > chunk, DmrppArray *array, const vector< unsigned int > &array_shape, const vector< unsigned int > &chunk_shape) |
void | process_super_chunk (const std::shared_ptr< SuperChunk > &super_chunk, DmrppArray *array) |
reads the super chunk, inflates/deshuffles chunks as required and copies the values into array More... | |
void | process_super_chunk_unconstrained (const std::shared_ptr< SuperChunk > &super_chunk, DmrppArray *array) |
Insert data from one chunk in this this array. More... | |
Extend libdap::Array so that a handler can read data using a DMR++ file.
Definition at line 64 of file DmrppArray.h.
|
virtualinherited |
Add a new chunk as defined by an h4:byteStream element.
Definition at line 199 of file DmrppCommon.cc.
|
inlinevirtualinherited |
Get the number of elements in this chunk.
Definition at line 166 of file DmrppCommon.h.
|
inlineprotectedvirtualinherited |
Returns a reference to the internal Chunk vector.
Definition at line 96 of file DmrppCommon.h.
|
inlinevirtualinherited |
A const reference to the vector of chunks.
Definition at line 153 of file DmrppCommon.h.
Get the array shape.
constrained | If true, return the shape of the constrained array. |
Definition at line 321 of file DmrppArray.cc.
|
virtual |
Return the total number of elements in this Array.
constrained | If true, use the constrained size of the array, otherwise use the full size. |
Definition at line 305 of file DmrppArray.cc.
|
virtualinherited |
Parses the text content of the XML element chunks:byteOrder.
byte_order_string | One of "LE", "BE" |
Definition at line 170 of file DmrppCommon.cc.
|
virtualinherited |
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 144 of file DmrppCommon.cc.
|
inlinevirtualinherited |
Returns true if this object utilizes COMPACT layout.
Definition at line 139 of file DmrppCommon.h.
|
inlinevirtualinherited |
Returns true if this object utilizes deflate compression.
Definition at line 119 of file DmrppCommon.h.
|
inlinevirtualinherited |
Returns true if this object utilizes shuffle compression.
Definition at line 129 of file DmrppCommon.h.
|
virtualinherited |
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 105 of file DmrppCommon.cc.
|
inherited |
Print the Chunk information.
Definition at line 302 of file DmrppCommon.cc.
|
inherited |
Print the Compact base64-encoded information.
Definition at line 384 of file DmrppCommon.cc.
|
virtual |
Shadow libdap::Array::print_dap4() - optionally prints DMR++ chunk information.
This version of libdap::BaseType::print_dap4() will print information about HDF5 chunks when the value of the static class filed dmrpp::DmrppCommon::d_print_chunks is true. The method DMRpp::print_dmrpp() will set the d_pprint_chunks field to true causing this method to include the chunks elements in its output. When the field's value is false, this method prints the same output as libdap::Array.
xml | Write the XML to this instance of XMLWriter |
constrained | True if the response should be constrained. False by default |
Definition at line 1788 of file DmrppArray.cc.
|
inherited |
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 407 of file DmrppCommon.cc.
|
virtual |
Read data for the array.
This reads data for a variable and loads it into memory. The software is specialized for reading data using HTTP for either arrays stored in one contiguous piece of memory or in a series of chunks.
BESError | Thrown when the data cannot be read, for a number of reasons, including various network I/O issues. |
Definition at line 1622 of file DmrppArray.cc.
|
protectedvirtualinherited |
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 284 of file DmrppCommon.cc.
|
inlineinherited |
Set the value of the chunk dimension sizes given a vector of HDF5 hsize_t.
Definition at line 183 of file DmrppCommon.h.
|
inlineinherited |
Set the value of the compact property.
Definition at line 144 of file DmrppCommon.h.
|
inlineinherited |
Set the value of the deflate property.
Definition at line 124 of file DmrppCommon.h.
|
inlineinherited |
Set the value of the shuffle property.
Definition at line 134 of file DmrppCommon.h.
|
inlinevirtualinherited |
Returns true if this object utilizes shuffle compression.
Definition at line 149 of file DmrppCommon.h.
|
friend |
reads the super chunk, inflates/deshuffles chunks as required and copies the values into array
super_chunk | |
array |
Definition at line 1296 of file DmrppArray.cc.
|
friend |
Insert data from one chunk in this this array.
This is a private 'friend function.' It's a function because the thread function one_chunk_unconstrained_thread() uses it. It's a friend so that it can get access to the class' private info.
Definition at line 831 of file DmrppArray.cc.
|
staticinherited |
The DMR++ XML namespace.
Definition at line 104 of file DmrppCommon.h.
|
staticinherited |
The XML namespace prefix to use.
Definition at line 105 of file DmrppCommon.h.
|
staticinherited |
if true, print_dap4() prints chunk elements
Definition at line 103 of file DmrppCommon.h.