BESContainer Class Reference

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

#include <BESContainer.h>

Inheritance diagram for BESContainer:

Inheritance graph
[legend]
Collaboration diagram for BESContainer:

Collaboration graph
[legend]

List of all members.

Public Member Functions

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

Protected Member Functions

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


Detailed Description

A container is something that holds data. I.E. 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.

See also:
BESContainerStorage

Constructor & Destructor Documentation

BESContainer::BESContainer (  )  [inline, protected]

BESContainer::BESContainer ( const string &  sym_name,
const string &  real_name,
const string &  type 
) [inline, protected]

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

Parameters:
sym_name symbolic name
real_name real name of the container, such as a file name
type type of data represented by this container, such as netcdf

BESContainer::BESContainer ( const BESContainer copy_from  )  [protected]

make a copy of the passed container

Parameters:
copy_from The container to copy

virtual BESContainer::~BESContainer (  )  [inline, virtual]


Member Function Documentation

void BESContainer::_duplicate ( BESContainer copy_to  )  [protected]

duplicate this instance into the passed container

Parameters:
copy_to The container to copy this instance into

Reimplemented in BESFileContainer.

References _attributes, _constraint, _container_type, _real_name, and _symbolic_name.

Referenced by BESFileContainer::_duplicate(), and BESFileContainer::ptr_duplicate().

virtual BESContainer* BESContainer::ptr_duplicate (  )  [pure virtual]

pure abstract method to duplicate this instances of BESContainer

Implemented in BESFileContainer.

Referenced by BESContainerStorageVolatile::look_for().

void BESContainer::set_constraint ( const string &  s  )  [inline]

set the constraint for this container

Parameters:
s constraint

Referenced by BESDefineCommand::parse_request().

void BESContainer::set_real_name ( const string &  real_name  )  [inline]

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

Parameters:
real_name real name, such as the file name

void BESContainer::set_container_type ( const string &  type  )  [inline]

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

Parameters:
type type of data, such as cedar or netcdf

void BESContainer::set_attributes ( const string &  attrs  )  [inline]

set desired attributes for this container

Parameters:
attrs attributes desired to access for this container

Referenced by BESDefineCommand::parse_request().

string BESContainer::get_real_name (  )  const [inline]

string BESContainer::get_constraint (  )  const [inline]

retrieve the constraint expression for this container

Returns:
constraint expression for this execution for the symbolic name

Referenced by BESConstraintFuncs::post_append().

string BESContainer::get_symbolic_name (  )  const [inline]

retrieve the symbolic name for this container

Returns:
symbolic name for this container

Referenced by BESContainerStorageVolatile::add_container(), BESDefineCommand::parse_request(), BESConstraintFuncs::post_append(), and BESContainerStorageVolatile::show_containers().

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

Referenced by BESContainerStorageVolatile::add_container(), BESRequestHandlerList::execute_current(), and BESContainerStorageVolatile::show_containers().

string BESContainer::get_attributes (  )  const [inline]

retrieve the attributes desired from this container

Returns:
attributes desired from this container

virtual 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.

Referenced by BESStreamResponseHandler::execute().

virtual bool BESContainer::release (  )  [pure virtual]

Implemented in BESFileContainer.

Referenced by BESInterface::end_request().

void BESContainer::dump ( ostream &  strm  )  const [virtual]

dumps information about this object

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

Parameters:
strm C++ i/o stream to dump the information to

Implements BESObj.

Reimplemented in BESFileContainer.

References BESIndent::Indent(), BESIndent::LMarg(), and BESIndent::UnIndent().

Referenced by BESFileContainer::dump(), BESDefine::dump(), _BESDataHandlerInterface::dump(), and BESContainerStorageVolatile::dump().

Here is the call graph for this function:


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

Generated on Thu Sep 11 07:58:28 2008 for OPeNDAP Back End Server (BES) by  doxygen 1.5.6