bes  Updated for version 3.20.6
cmr::CmrContainer Class Reference

Container representing a remote request. More...

#include <CmrContainer.h>

Collaboration diagram for cmr::CmrContainer:
Collaboration graph

Public Member Functions

virtual std::string access ()
 access the remote target response by making the remote request More...
 
 CmrContainer (const CmrContainer &copy_from)
 
 CmrContainer (const std::string &sym_name, const std::string &real_name, const std::string &type)
 Creates an instances of CmrContainer with symbolic name and real name, which is the remote request. More...
 
virtual void dump (std::ostream &strm) const
 dumps information about this object More...
 
std::string get_attributes () const
 retrieve the attributes desired from this container More...
 
std::string get_constraint () const
 retrieve the constraint expression for this container More...
 
std::string get_container_type () const
 retrieve the type of data this container holds, such as cedar or netcdf. More...
 
std::string get_dap4_constraint () const
 retrieve the constraint expression for this container More...
 
std::string get_dap4_function () const
 retrieve the constraint expression for this container More...
 
std::string get_real_name () const
 retrieve the real name for this container, such as a file name. More...
 
std::string get_relative_name () const
 Get the relative name of the object in this container. More...
 
std::string get_symbolic_name () const
 retrieve the symbolic name for this container More...
 
virtual BESContainerptr_duplicate ()
 pure abstract method to duplicate this instances of BESContainer More...
 
virtual bool release ()
 release the resources More...
 
void set_attributes (const std::string &attrs)
 set desired attributes for this container More...
 
void set_constraint (const std::string &s)
 set the constraint for this container More...
 
void set_container_type (const std::string &type)
 set the type of data that this container represents, such as cedar or netcdf. More...
 
void set_dap4_constraint (const std::string &s)
 set the constraint for this container More...
 
void set_dap4_function (const std::string &s)
 set the constraint for this container More...
 
void set_real_name (const std::string &real_name)
 set the real name for this container, such as a file name if reading a data file. More...
 
void set_relative_name (const std::string &relative)
 Set the relative name of the object in this container. More...
 

Protected Member Functions

void _duplicate (BESContainer &copy_to)
 duplicate this instance into the passed container More...
 
void _duplicate (CmrContainer &copy_to)
 

Detailed Description

Container representing a remote request.

The real name of a CmrContainer is the actual remote request. When the access method is called the remote request is made, the response saved to file if successful, and the target response returned as the real container that a data handler would then open.

See also
GatewayContainerStorage

Definition at line 51 of file CmrContainer.h.

Constructor & Destructor Documentation

◆ CmrContainer() [1/2]

cmr::CmrContainer::CmrContainer ( const std::string &  sym_name,
const std::string &  real_name,
const std::string &  type 
)

Creates an instances of CmrContainer with symbolic name and real name, which is the remote request.

The real_name is the remote request URL.

Parameters
sym_namesymbolic name representing this remote container
real_namethe virtual CMR path to a dataset or file.
Exceptions
BESSyntaxUserErrorif the path does not validate
See also
CmrUtils

Definition at line 60 of file CmrContainer.cc.

◆ CmrContainer() [2/2]

cmr::CmrContainer::CmrContainer ( const CmrContainer copy_from)

TODO: I think this implementation of the copy constructor is incomplete/inadequate. Review and fix as needed.

Definition at line 112 of file CmrContainer.cc.

Member Function Documentation

◆ _duplicate()

void BESContainer::_duplicate ( BESContainer copy_to)
protectedinherited

duplicate this instance into the passed container

Parameters
copy_toThe container to copy this instance into

Definition at line 54 of file BESContainer.cc.

◆ access()

string cmr::CmrContainer::access ( )
virtual

access the remote target response by making the remote request

Returns
full path to the remote request response data file
Exceptions
BESErrorif there is a problem making the remote request

Implements BESContainer.

Definition at line 151 of file CmrContainer.cc.

◆ dump()

void cmr::CmrContainer::dump ( std::ostream &  strm) const
virtual

dumps information about this object

Displays the pointer value of this instance along with information about this container.

Parameters
strmC++ i/o stream to dump the information to

Reimplemented from BESContainer.

Definition at line 220 of file CmrContainer.cc.

◆ get_attributes()

std::string BESContainer::get_attributes ( ) const
inlineinherited

retrieve the attributes desired from this container

Returns
attributes desired from this container

Definition at line 242 of file BESContainer.h.

◆ get_constraint()

std::string BESContainer::get_constraint ( ) const
inlineinherited

retrieve the constraint expression for this container

Returns
constraint expression for this execution for the symbolic name

Definition at line 194 of file BESContainer.h.

◆ get_container_type()

std::string BESContainer::get_container_type ( ) const
inlineinherited

retrieve the type of data this container holds, such as cedar or netcdf.

Returns
type of data this container represents, such as cedar or netcdf

Definition at line 232 of file BESContainer.h.

◆ get_dap4_constraint()

std::string BESContainer::get_dap4_constraint ( ) const
inlineinherited

retrieve the constraint expression for this container

Returns
constraint expression for this execution for the symbolic name

Definition at line 203 of file BESContainer.h.

◆ get_dap4_function()

std::string BESContainer::get_dap4_function ( ) const
inlineinherited

retrieve the constraint expression for this container

Returns
constraint expression for this execution for the symbolic name

Definition at line 212 of file BESContainer.h.

◆ get_real_name()

std::string BESContainer::get_real_name ( ) const
inlineinherited

retrieve the real name for this container, such as a file name.

Returns
real name, such as file name

Definition at line 180 of file BESContainer.h.

◆ get_relative_name()

std::string BESContainer::get_relative_name ( ) const
inlineinherited

Get the relative name of the object in this container.

Definition at line 186 of file BESContainer.h.

◆ get_symbolic_name()

std::string BESContainer::get_symbolic_name ( ) const
inlineinherited

retrieve the symbolic name for this container

Returns
symbolic name for this container

Definition at line 221 of file BESContainer.h.

◆ ptr_duplicate()

BESContainer * cmr::CmrContainer::ptr_duplicate ( )
virtual

pure abstract method to duplicate this instances of BESContainer

Implements BESContainer.

Definition at line 134 of file CmrContainer.cc.

◆ release()

bool cmr::CmrContainer::release ( )
virtual

release the resources

Release the resource

Returns
true if the resource is released successfully and false otherwise

Implements BESContainer.

Definition at line 202 of file CmrContainer.cc.

◆ set_attributes()

void BESContainer::set_attributes ( const std::string &  attrs)
inlineinherited

set desired attributes for this container

Parameters
attrsattributes desired to access for this container

Definition at line 170 of file BESContainer.h.

◆ set_constraint()

void BESContainer::set_constraint ( const std::string &  s)
inlineinherited

set the constraint for this container

Parameters
sconstraint

Definition at line 118 of file BESContainer.h.

◆ set_container_type()

void BESContainer::set_container_type ( const std::string &  type)
inlineinherited

set the type of data that this container represents, such as cedar or netcdf.

Parameters
typetype of data, such as cedar or netcdf

Definition at line 161 of file BESContainer.h.

◆ set_dap4_constraint()

void BESContainer::set_dap4_constraint ( const std::string &  s)
inlineinherited

set the constraint for this container

Parameters
sconstraint

Definition at line 127 of file BESContainer.h.

◆ set_dap4_function()

void BESContainer::set_dap4_function ( const std::string &  s)
inlineinherited

set the constraint for this container

Parameters
sconstraint

Definition at line 136 of file BESContainer.h.

◆ set_real_name()

void BESContainer::set_real_name ( const std::string &  real_name)
inlineinherited

set the real name for this container, such as a file name if reading a data file.

Parameters
real_namereal name, such as the file name

Definition at line 146 of file BESContainer.h.

◆ set_relative_name()

void BESContainer::set_relative_name ( const std::string &  relative)
inlineinherited

Set the relative name of the object in this container.

Definition at line 152 of file BESContainer.h.


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