bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
dmrpp::DMZ Class Reference

Interface to hide the DMR++ information storage format. More...

#include <DMZ.h>

Collaboration diagram for dmrpp::DMZ:
Collaboration graph

Public Member Functions

virtual void build_thin_dmr (libdap::DMR *dmr)
 populate the DMR instance as a 'thin DMR'
 
 DMZ ()=default
 Build a DMZ without simultaneously parsing an XML document.
 
 DMZ (const std::string &file_name)
 Build a DMZ object and initialize it using a DMR++ XML document.
 
virtual void load_attributes (libdap::BaseType *btp)
 
virtual void load_attributes (libdap::Constructor *constructor)
 
void parse_xml_doc (const std::string &filename)
 Build the DOM tree for a DMR++ XML document.
 
void parse_xml_string (const std::string &contents)
 Build a DOM tree for a DMR++ using content from a string.
 
virtual bool set_up_all_direct_io_flags_phase_1 (libdap::DMR *dmr)
 
virtual void set_up_all_direct_io_flags_phase_2 (libdap::DMR *dmr)
 
virtual bool set_up_direct_io_flag_phase_1 (libdap::BaseType *btp)
 
virtual bool set_up_direct_io_flag_phase_1 (libdap::D4Group *group)
 
virtual void set_up_direct_io_flag_phase_2 (libdap::BaseType *btp)
 
virtual void set_up_direct_io_flag_phase_2 (libdap::D4Group *group)
 
Attributes

These are functions specific to loading attributes. Originally intended to be part of a lazy-load scheme, this code is used to load attribute data into a 'thin DMR.' jhrg 11/23/21

virtual void load_attributes (libdap::D4Group *group)
 
virtual void load_all_attributes (libdap::DMR *dmr)
 

Friends

class DMZTest
 

Chunks

These are the functions specific to loading chunk data. They implement the lazy-load feature for DMR++ chunk information.

virtual void load_chunks (libdap::BaseType *btp)
 Load the chunk information into a variable.
 

Detailed Description

Interface to hide the DMR++ information storage format.

This class uses an XML library that uses the document text for all the string values (tag/element names, attribute names and values, etc.) so the text of the XML document must persist for as long as the xml_document object itself. For files, the class uses the pugixml load function.

Note
This class holds a pugi::xml_document and a shared_ptr<http::url> but does not define its own copy ctor or assignment operator, so copies of an instance of DMZ will share those objects

Definition at line 74 of file DMZ.h.

Constructor & Destructor Documentation

◆ DMZ() [1/2]

dmrpp::DMZ::DMZ ( )
default

Build a DMZ without simultaneously parsing an XML document.

◆ DMZ() [2/2]

dmrpp::DMZ::DMZ ( const std::string & file_name)
explicit

Build a DMZ object and initialize it using a DMR++ XML document.

Parameters
file_nameThe DMR++ XML document to parse.
Exceptions
BESInternalErrorif file_name cannot be parsed

Definition at line 174 of file DMZ.cc.

Member Function Documentation

◆ build_thin_dmr()

void dmrpp::DMZ::build_thin_dmr ( libdap::DMR * dmr)
virtual

populate the DMR instance as a 'thin DMR'

Note
Assume the DMZ holds valid DMR++ metadata.
Parameters
dmrPointer to a DMR instance that should be populated

Definition at line 773 of file DMZ.cc.

◆ load_all_attributes()

void dmrpp::DMZ::load_all_attributes ( libdap::DMR * dmr)
virtual

Definition at line 1348 of file DMZ.cc.

◆ load_attributes()

void dmrpp::DMZ::load_attributes ( libdap::D4Group * group)
virtual

Definition at line 1318 of file DMZ.cc.

◆ load_chunks()

void dmrpp::DMZ::load_chunks ( libdap::BaseType * btp)
virtual

Load the chunk information into a variable.

Process the chunks, chunk, etc., elements from the DMR++ information. Once this is called, the variable's read() method should be able to read the data for this variable.

Parameters
btpThe variable

Definition at line 2230 of file DMZ.cc.

◆ parse_xml_doc()

void dmrpp::DMZ::parse_xml_doc ( const std::string & filename)

Build the DOM tree for a DMR++ XML document.

Parameters
file_name

Definition at line 185 of file DMZ.cc.

◆ parse_xml_string()

void dmrpp::DMZ::parse_xml_string ( const std::string & contents)

Build a DOM tree for a DMR++ using content from a string.

Note
This method was added to support parsing DMR++ 'documents' that are cached as strings. The caching nominally takes place in the NgapContainer code over in the ngap_module (but it doesn't have to). See DmrppRequestHandler.cc for places where this method is called.
Parameters
sourceThe string that contains the DMR++ content.

Definition at line 290 of file DMZ.cc.

◆ set_up_all_direct_io_flags_phase_1()

bool dmrpp::DMZ::set_up_all_direct_io_flags_phase_1 ( libdap::DMR * dmr)
virtual

Definition at line 805 of file DMZ.cc.

◆ set_up_all_direct_io_flags_phase_2()

void dmrpp::DMZ::set_up_all_direct_io_flags_phase_2 ( libdap::DMR * dmr)
virtual

Definition at line 864 of file DMZ.cc.

◆ set_up_direct_io_flag_phase_1()

bool dmrpp::DMZ::set_up_direct_io_flag_phase_1 ( libdap::D4Group * group)
virtual

Definition at line 818 of file DMZ.cc.

◆ set_up_direct_io_flag_phase_2()

void dmrpp::DMZ::set_up_direct_io_flag_phase_2 ( libdap::D4Group * group)
virtual

Definition at line 874 of file DMZ.cc.

Friends And Related Symbol Documentation

◆ DMZTest

friend class DMZTest
friend

Definition at line 138 of file DMZ.h.


The documentation for this class was generated from the following files: