BESCatalogList Class Reference

List of all registered catalogs. More...

#include <BESCatalogList.h>

Inheritance diagram for BESCatalogList:

Inheritance graph
[legend]
Collaboration diagram for BESCatalogList:

Collaboration graph
[legend]

List of all members.

Public Types

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

Public Member Functions

 BESCatalogList ()
virtual ~BESCatalogList ()
 list destructor deletes all registered catalogs
virtual bool add_catalog (BESCatalog *catalog)
 adds the speciifed catalog to the list
virtual bool del_catalog (const string &catalog_name)
 remove from the list and delete the specified catalog
virtual BESCatalogfind_catalog (const string &catalog_name)
 find the catalog in the list with the specified name
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 void dump (ostream &strm) const
 dumps information about this object

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

Member Typedef Documentation

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

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


Constructor & Destructor Documentation

BESCatalogList::BESCatalogList (  )  [inline]

BESCatalogList::~BESCatalogList (  )  [virtual]

list destructor deletes all registered catalogs

See also:
BESCatalog


Member Function Documentation

bool BESCatalogList::add_catalog ( BESCatalog catalog  )  [virtual]

adds the speciifed catalog to the list

Parameters:
catalog new 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

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

Here is the call graph for this function:

bool BESCatalogList::del_catalog ( const string &  catalog_name  )  [virtual]

remove from the list and delete the specified catalog

Search the list for the catalog with the given name. If the catalog exists, remove it from the list and delete it.

Parameters:
catalog_name name of the catalog to delete
Returns:
true if successfully removed and deleted, false otherwise
See also:
BESCatalog

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

find the catalog in the list with the specified name

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

Referenced by add_catalog().

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:
container node to display, empty means root
coi is the request to include collections or just the specified container
info informational object to add information to
Exceptions:
BESSyntaxUserError if more than one catalog and no catalog specified; if the specified catalog does not exist; if the container within the catalog does not exist.

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

Referenced by BESCatalogResponseHandler::execute().

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:
strm C++ i/o stream to dump the information to

Implements BESObj.

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

Here is the call graph for this function:

BESCatalogList * BESCatalogList::TheCatalogList (  )  [static]

returns the singleton BESCatalogList instance

Referenced by BESCatalogResponseHandler::execute().


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

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