bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
BESContainer Class Referenceabstract

A container is something that holds data. E.G., a netcdf file or a database entry. More...

#include <BESContainer.h>

Inheritance diagram for BESContainer:
Inheritance graph
Collaboration diagram for BESContainer:
Collaboration graph

Public Member Functions

virtual std::string access ()=0
 returns the true name of this container
 
void dump (std::ostream &strm) const override
 dumps information about this object
 
std::string get_attributes () const
 retrieve the attributes desired from this container
 
std::string get_constraint () const
 retrieve the constraint expression for this container
 
std::string get_container_type () const
 retrieve the type of data this container holds, such as cedar or netcdf.
 
std::string get_dap4_constraint () const
 retrieve the constraint expression for this container
 
std::string get_dap4_function () const
 retrieve the constraint expression for this container
 
std::string get_real_name () const
 retrieve the real name for this container, such as a file name.
 
std::string get_relative_name () const
 Get the relative name of the object in this container.
 
std::string get_symbolic_name () const
 retrieve the symbolic name for this container
 
BESContaineroperator= (const BESContainer &other)=delete
 
virtual BESContainerptr_duplicate ()=0
 pure abstract method to duplicate this instances of BESContainer
 
virtual bool release ()=0
 
void set_attributes (const std::string &attrs)
 set desired attributes for this container
 
void set_constraint (const std::string &s)
 set the constraint for this container
 
void set_container_type (const std::string &type)
 set the type of data that this container represents, such as cedar or netcdf.
 
void set_dap4_constraint (const std::string &s)
 set the constraint for this container
 
void set_dap4_function (const std::string &s)
 set the constraint for this container
 
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.
 
void set_relative_name (const std::string &relative)
 Set the relative name of the object in this container.
 

Protected Member Functions

void _duplicate (BESContainer &copy_to)
 duplicate this instance into the passed container
 
 BESContainer (const BESContainer &copy_from)
 make a copy of the passed container
 
 BESContainer (std::string sym_name, std::string real_name, std::string type)
 construct a container with the given symbolic name, real name and container type.
 

Detailed Description

A container is something that holds data. E.G., a netcdf file or a database entry.

A symbolic name is a name that represents a set of data, such as a file, and the type of data, such as cedar, netcdf, hdf, etc... Associated with this symbolic name during run time is a constraint expression used to constrain the data and attributes desired from the container.

The symbolic name is looked up in persistence, such as a MySQL database, a file, or in volatile memory. The information retrieved from the persistent source is saved in the BESContainer and is used to execute the request from the client.

Note
Many data items used with the BES are files and are referenced relative to a configured Data Root Directory. When a Container is added to a store, if that store uses the BESContainerStorageVolatile storage type, the 'real name' will be transformed to the full pathname of the file on disk for the current BES. It's useful to have access to the original relative pathname provided by the client/user so I've added a field (d_relative_name) to hold that information. jhrg 5/22/18
See also
BESContainerStorage

Definition at line 66 of file BESContainer.h.

Constructor & Destructor Documentation

◆ BESContainer() [1/2]

BESContainer::BESContainer ( std::string sym_name,
std::string real_name,
std::string type )
inlineprotected

construct a container with the given symbolic name, real name and container type.

Note
The relative name filed is set to "", which is the best this code can do, but not really very good. Child classes that know the data root should fix the value.
Parameters
sym_namesymbolic name
real_namereal name of the container, such as a file name
typetype of data represented by this container, such as netcdf

Definition at line 93 of file BESContainer.h.

◆ BESContainer() [2/2]

BESContainer::BESContainer ( const BESContainer & copy_from)
protected

make a copy of the passed container

Parameters
copy_fromThe container to copy

Definition at line 42 of file BESContainer.cc.

Member Function Documentation

◆ _duplicate()

void BESContainer::_duplicate ( BESContainer & copy_to)
protected

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()

virtual std::string BESContainer::access ( )
pure virtual

returns the true name of this container

The true name of this container might be an uncompressed file name from the compressed file name represented by the real name of this container. This method would uncompress the real name and return the uncompressed file name. Another example is where the real name represents a WCS request. The access method would make the WCS request and return the name of the resulting file.

Returns
name of file to access

Implemented in BESFileContainer, builddmrpp::NgapBuildDmrppContainer, cmr::CmrContainer, gateway::GatewayContainer, httpd_catalog::HttpdCatalogContainer, NCMLContainer, ngap::NgapOwnedContainer, and s3::S3Container.

◆ dump()

void BESContainer::dump ( std::ostream & strm) const
overridevirtual

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

Implements BESObj.

Reimplemented in BESFileContainer, builddmrpp::NgapBuildDmrppContainer, cmr::CmrContainer, gateway::GatewayContainer, httpd_catalog::HttpdCatalogContainer, ngap::NgapOwnedContainer, and s3::S3Container.

Definition at line 73 of file BESContainer.cc.

◆ get_attributes()

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

retrieve the attributes desired from this container

Returns
attributes desired from this container

Definition at line 243 of file BESContainer.h.

◆ get_constraint()

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

retrieve the constraint expression for this container

Returns
constraint expression for this execution for the symbolic name

Definition at line 195 of file BESContainer.h.

◆ get_container_type()

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

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 233 of file BESContainer.h.

◆ get_dap4_constraint()

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

retrieve the constraint expression for this container

Returns
constraint expression for this execution for the symbolic name

Definition at line 204 of file BESContainer.h.

◆ get_dap4_function()

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

retrieve the constraint expression for this container

Returns
constraint expression for this execution for the symbolic name

Definition at line 213 of file BESContainer.h.

◆ get_real_name()

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

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

Returns
real name, such as file name

Definition at line 181 of file BESContainer.h.

◆ get_relative_name()

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

Get the relative name of the object in this container.

Definition at line 187 of file BESContainer.h.

◆ get_symbolic_name()

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

retrieve the symbolic name for this container

Returns
symbolic name for this container

Definition at line 222 of file BESContainer.h.

◆ ptr_duplicate()

virtual BESContainer * BESContainer::ptr_duplicate ( )
pure virtual

◆ release()

◆ set_attributes()

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

set desired attributes for this container

Parameters
attrsattributes desired to access for this container

Definition at line 171 of file BESContainer.h.

◆ set_constraint()

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

set the constraint for this container

Parameters
sconstraint

Definition at line 119 of file BESContainer.h.

◆ set_container_type()

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

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 162 of file BESContainer.h.

◆ set_dap4_constraint()

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

set the constraint for this container

Parameters
sconstraint

Definition at line 128 of file BESContainer.h.

◆ set_dap4_function()

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

set the constraint for this container

Parameters
sconstraint

Definition at line 137 of file BESContainer.h.

◆ set_real_name()

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

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 147 of file BESContainer.h.

◆ set_relative_name()

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

Set the relative name of the object in this container.

Definition at line 153 of file BESContainer.h.


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