bes  Updated for version 3.20.5
BESFileContainer Class Reference

Holds real data, container type and constraint for symbolic name read from persistence. More...

#include <BESFileContainer.h>

Collaboration diagram for BESFileContainer:
Collaboration graph

Public Member Functions

virtual string access ()
 returns the name of a file to access for this container, uncompressing if necessary. More...
 
 BESFileContainer (const BESFileContainer &copy_from)
 make a copy of the container More...
 
 BESFileContainer (const string &sym_name, const string &real_name, const string &type)
 construct a container representing a file More...
 
virtual void dump (ostream &strm) const
 Displays debug information about this object. More...
 
string get_attributes () const
 retrieve the attributes desired from this container More...
 
string get_constraint () const
 retrieve the constraint expression for this container More...
 
string get_container_type () const
 retrieve the type of data this container holds, such as cedar or netcdf. More...
 
string get_dap4_constraint () const
 retrieve the constraint expression for this container More...
 
string get_dap4_function () const
 retrieve the constraint expression for this container More...
 
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...
 
string get_symbolic_name () const
 retrieve the symbolic name for this container More...
 
virtual BESContainerptr_duplicate ()
 duplicate this instances of BESFileContainer More...
 
virtual bool release ()
 release the file More...
 
void set_attributes (const string &attrs)
 set desired attributes for this container More...
 
void set_constraint (const string &s)
 set the constraint for this container More...
 
void set_container_type (const string &type)
 set the type of data that this container represents, such as cedar or netcdf. More...
 
void set_dap4_constraint (const string &s)
 set the constraint for this container More...
 
void set_dap4_function (const string &s)
 set the constraint for this container More...
 
void set_real_name (const 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...
 

Static Public Attributes

static const string UNCOMPRESS_CACHE_DIR_KEY
 
static const string UNCOMPRESS_CACHE_PREFIX_KEY
 
static const string UNCOMPRESS_CACHE_SIZE_KEY
 

Protected Member Functions

virtual void _duplicate (BESContainer &copy_to)
 

Detailed Description

Holds real data, container type and constraint for symbolic name read from persistence.

A symbolic name is a name that represents a certain set of data, usually a file, and the type of data, such as cedar, netcdf, hdf, etc... Associated with this symbolic name during run time is the constraint associated with the name.

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

See also
BESFileContainerStorage

Definition at line 59 of file BESFileContainer.h.

Constructor & Destructor Documentation

◆ BESFileContainer() [1/2]

BESFileContainer::BESFileContainer ( const string &  sym_name,
const string &  real_name,
const string &  type 
)

construct a container representing a file

Parameters
sym_namesymbolic name of the container
real_namereal name of the container, a file name in this case
typetype of the data represented in the file

Definition at line 50 of file BESFileContainer.cc.

◆ BESFileContainer() [2/2]

BESFileContainer::BESFileContainer ( const BESFileContainer copy_from)

make a copy of the container

Parameters
copy_fromThe container to copy

Definition at line 64 of file BESFileContainer.cc.

Member Function Documentation

◆ access()

string BESFileContainer::access ( )
virtual

returns the name of a file to access for this container, uncompressing if necessary.

Returns
name of file to access

Implements BESContainer.

Definition at line 90 of file BESFileContainer.cc.

◆ dump()

void BESFileContainer::dump ( ostream &  strm) const
virtual

Displays debug information about this object.

dumps information about this object

Parameters
strmoutput stream to use to dump the contents of 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 138 of file BESFileContainer.cc.

◆ get_attributes()

string BESContainer::get_attributes ( ) const
inlineinherited

retrieve the attributes desired from this container

Returns
attributes desired from this container

Definition at line 245 of file BESContainer.h.

◆ get_constraint()

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

◆ get_container_type()

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

◆ get_dap4_constraint()

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

◆ get_dap4_function()

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

◆ get_real_name()

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

◆ get_symbolic_name()

string BESContainer::get_symbolic_name ( ) const
inlineinherited

retrieve the symbolic name for this container

Returns
symbolic name for this container

Definition at line 224 of file BESContainer.h.

◆ ptr_duplicate()

BESContainer * BESFileContainer::ptr_duplicate ( )
virtual

duplicate this instances of BESFileContainer

Returns
a copy of this instance

Implements BESContainer.

Definition at line 78 of file BESFileContainer.cc.

◆ release()

bool BESFileContainer::release ( )
virtual

release the file

If the file was cached (uncompressed) then we need to release the lock on the cached entry

Todo:
Call this in the drot? jhrg 7/25/18
Returns
if successfully released, returns true, otherwise returns false

Implements BESContainer.

Definition at line 122 of file BESFileContainer.cc.

◆ set_attributes()

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

set desired attributes for this container

Parameters
attrsattributes desired to access for this container

Definition at line 173 of file BESContainer.h.

◆ set_constraint()

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

set the constraint for this container

Parameters
sconstraint

Definition at line 121 of file BESContainer.h.

◆ set_container_type()

void BESContainer::set_container_type ( const 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 164 of file BESContainer.h.

◆ set_dap4_constraint()

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

set the constraint for this container

Parameters
sconstraint

Definition at line 130 of file BESContainer.h.

◆ set_dap4_function()

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

set the constraint for this container

Parameters
sconstraint

Definition at line 139 of file BESContainer.h.

◆ set_real_name()

void BESContainer::set_real_name ( const 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 149 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 155 of file BESContainer.h.


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