OPeNDAP Hyrax Back End Server (BES)  Updated for version 3.8.3
BESCatalogList Class Reference

List of all registered catalogs. More...

#include <BESCatalogList.h>

Inheritance diagram for BESCatalogList:
Inheritance graph
Collaboration diagram for BESCatalogList:
Collaboration graph

List of all members.

Public Types

typedef map< string,
BESCatalog * >::const_iterator 
catalog_citer
typedef map< string,
BESCatalog * >::iterator 
catalog_iter

Public Member Functions

virtual bool add_catalog (BESCatalog *catalog)
 adds the speciifed catalog to the list
 BESCatalogList ()
 construct a catalog list
virtual bool deref_catalog (const string &catalog_name)
 de-reference the specified catalog and remove from list if no longer referenced
virtual void dump (ostream &strm) const
 dumps information about this object
virtual BESCatalogfind_catalog (const string &catalog_name)
 find the catalog in the list with the specified name
virtual bool ref_catalog (const string &catalog_name)
 reference the specified catalog
virtual void show_catalog (const string &container, const string &catalog_or_info, BESInfo *info)
 show the contents of the catalog given the specified container
virtual ~BESCatalogList ()
 list destructor deletes all registered catalogs

Static Public Member Functions

static BESCatalogListTheCatalogList ()
 returns the singleton BESCatalogList instance

Detailed Description

List of all registered catalogs.

BESCatalog objecgts can be registered with this list. The BES allows for multiple catalogs. Most installations will have a single catalog registered.

Catalogs have a uniq name

If there is only one catalog then the display of the root will be the display of that catalogs root.

If there are more than one catalogs registered then the view of the root will display the list of catalogs registered. To view the contents of a specific catalog begin each container name with the name of the catalog followed by a colon.

show catalog for "cedar_catalog:/instrument/5340/year/2004/";

See also:
BESCatalog

Definition at line 69 of file BESCatalogList.h.


Member Typedef Documentation

typedef map<string,BESCatalog *>::const_iterator BESCatalogList::catalog_citer

Definition at line 77 of file BESCatalogList.h.

typedef map<string,BESCatalog *>::iterator BESCatalogList::catalog_iter

Definition at line 76 of file BESCatalogList.h.


Constructor & Destructor Documentation

BESCatalogList::BESCatalogList ( )

construct a catalog list

See also:
BESCatalog

Definition at line 50 of file BESCatalogList.cc.

References BES_DEFAULT_CATALOG, BESKeys::get_value(), and TheBESKeys::TheKeys().

Referenced by TheCatalogList().

Here is the call graph for this function:

BESCatalogList::~BESCatalogList ( )
virtual

list destructor deletes all registered catalogs

See also:
BESCatalog

Definition at line 72 of file BESCatalogList.cc.


Member Function Documentation

bool BESCatalogList::add_catalog ( BESCatalog catalog)
virtual

adds the speciifed catalog to the list

Parameters:
catalognew catalog to add to the list
Returns:
false if a catalog with the given catalog's name already exists. Returns true otherwise.
See also:
BESCatalog

Definition at line 91 of file BESCatalogList.cc.

References find_catalog(), and BESCatalog::get_catalog_name().

Here is the call graph for this function:

bool BESCatalogList::deref_catalog ( const string &  catalog_name)
virtual

de-reference the specified catalog and remove from list if no longer referenced

Search the list for the catalog with the given name. If the catalog exists, de-reference it. If there are no more references then remove the catalog from the list and delete it.

Parameters:
catalog_namename of the catalog to de-reference
Returns:
true if successfully de-referenced, false otherwise
See also:
BESCatalog

Definition at line 147 of file BESCatalogList.cc.

References BESCatalog::dereference_catalog().

Referenced by DapModule::terminate().

Here is the call graph for this function:

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

dumps information about this object

Displays the pointer value of this instance along with the catalogs registered in this list.

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

Implements BESObj.

Definition at line 314 of file BESCatalogList.cc.

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

Here is the call graph for this function:

BESCatalog * BESCatalogList::find_catalog ( const string &  catalog_name)
virtual

find the catalog in the list with the specified name

Parameters:
catalog_namename of the catalog to find
Returns:
a BESCatalog with the given name if found, 0 otherwise
See also:
BESCatalog

Definition at line 173 of file BESCatalogList.cc.

Referenced by add_catalog().

bool BESCatalogList::ref_catalog ( const string &  catalog_name)
virtual

reference the specified catalog

Search the list for the catalog with the given name. If the catalog exists, reference it and return true. If not found then return false.

Parameters:
catalog_namename of the catalog to reference
Returns:
true if successfully found and referenced, false otherwise
See also:
BESCatalog

Definition at line 120 of file BESCatalogList.cc.

References BESCatalog::reference_catalog().

Here is the call graph for this function:

void BESCatalogList::show_catalog ( const string &  container,
const string &  coi,
BESInfo info 
)
virtual

show the contents of the catalog given the specified container

This method adds information about the specified container to the informational object specified.

If there is only one catalog registered then the container must be a node within that one catalog.

if there are more than one catalog registered then:

  • if the specified container is empty, display the list of catalogs. tag attributes include "catalogRoot".
  • if not empty then the specified container must begin with the name of the catalog followed by a colon. The remainder of the container specified is the node within that catalog.

If coi is catalog then if the specified container is a collection then display the elements in the collection. If coi is info then display information about only the specified container and not its contents if a collection.

If there is a problem accessing the requested node then the reason for the problem must be included in the informational response, not an exception thrown. This method will not throw an exception.

Parameters:
containernode to display, empty means root
coiis the request to include collections or just the specified container
infoinformational object to add information to
Exceptions:
BESSyntaxUserErrorif more than one catalog and no catalog specified; if the specified catalog does not exist; if the container within the catalog does not exist.

Definition at line 218 of file BESCatalogList.cc.

References BESInfo::begin_tag(), BESInfo::end_tag(), BESCatalog::get_catalog_name(), BESCatalog::show_catalog(), and SHOW_INFO_RESPONSE.

Referenced by BESCatalogResponseHandler::execute().

Here is the call graph for this function:

BESCatalogList * BESCatalogList::TheCatalogList ( )
static

returns the singleton BESCatalogList instance

Definition at line 297 of file BESCatalogList.cc.

References BESCatalogList().

Referenced by BESCatalogResponseHandler::execute(), DapModule::initialize(), and DapModule::terminate().

Here is the call graph for this function:


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