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

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 More...
 
virtual string default_catalog ()
 
virtual bool deref_catalog (const string &catalog_name)
 de-reference the specified catalog and remove from list if no longer referenced More...
 
virtual void dump (ostream &strm) const
 dumps information about this object More...
 
virtual catalog_iter end_catalog ()
 
virtual BESCatalogfind_catalog (const string &catalog_name)
 find the catalog in the list with the specified name More...
 
virtual catalog_iter first_catalog ()
 
virtual int num_catalogs ()
 
virtual bool ref_catalog (const string &catalog_name)
 reference the specified catalog More...
 
virtual BESCatalogEntryshow_catalogs (BESDataHandlerInterface &dhi, BESCatalogEntry *entry, bool show_default=true)
 show the list of catalogs More...
 

Static Public Member Functions

static BESCatalogListTheCatalogList ()
 returns the singleton BESCatalogList instance. More...
 

Protected Member Functions

 BESCatalogList ()
 construct a catalog list More...
 

Friends

class BESCatalogListUnitTest
 

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 70 of file BESCatalogList.h.

Member Typedef Documentation

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

Definition at line 90 of file BESCatalogList.h.

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

Definition at line 89 of file BESCatalogList.h.

Constructor & Destructor Documentation

BESCatalogList::BESCatalogList ( )
protected

construct a catalog list

See also
BESCatalog

Definition at line 98 of file BESCatalogList.cc.

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

Here is the call graph for this function:

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 141 of file BESCatalogList.cc.

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

Referenced by DapModule::initialize().

Here is the call graph for this function:

virtual string BESCatalogList::default_catalog ( )
inlinevirtual
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 201 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 287 of file BESCatalogList.cc.

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

Here is the call graph for this function:

virtual catalog_iter BESCatalogList::end_catalog ( )
inlinevirtual

Definition at line 107 of file BESCatalogList.h.

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 227 of file BESCatalogList.cc.

Referenced by add_catalog(), and BESCatalogResponseHandler::execute().

virtual catalog_iter BESCatalogList::first_catalog ( )
inlinevirtual

Definition at line 106 of file BESCatalogList.h.

virtual int BESCatalogList::num_catalogs ( )
inlinevirtual

Definition at line 95 of file BESCatalogList.h.

Referenced by BESCatalogResponseHandler::execute().

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 174 of file BESCatalogList.cc.

References BESCatalog::reference_catalog().

Here is the call graph for this function:

BESCatalogEntry * BESCatalogList::show_catalogs ( BESDataHandlerInterface dhi,
BESCatalogEntry entry,
bool  show_default = true 
)
virtual

show the list of catalogs

This method adds information about the list of catalogs that exist

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
coiis the request to include collections or just the specified container
infoinformational object to add information to

Definition at line 252 of file BESCatalogList.cc.

References default_catalog(), 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.

The pthreads library insures that only one instance can be made in a process lifetime.

Definition at line 66 of file BESCatalogList.cc.

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

Friends And Related Function Documentation

friend class BESCatalogListUnitTest
friend

Definition at line 82 of file BESCatalogList.h.


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