#include <BESCatalogList.h>
Inheritance diagram for BESCatalogList:
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 BESCatalog * | find_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 BESCatalogList * | TheCatalogList () |
returns the singleton BESCatalogList instance |
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/";
Definition at line 67 of file BESCatalogList.h.
typedef map<string,BESCatalog *>::iterator BESCatalogList::catalog_iter |
Definition at line 73 of file BESCatalogList.h.
typedef map<string,BESCatalog *>::const_iterator BESCatalogList::catalog_citer |
Definition at line 74 of file BESCatalogList.h.
BESCatalogList::BESCatalogList | ( | ) | [inline] |
Definition at line 76 of file BESCatalogList.h.
BESCatalogList::~BESCatalogList | ( | ) | [virtual] |
list destructor deletes all registered catalogs
Definition at line 44 of file BESCatalogList.cc.
bool BESCatalogList::add_catalog | ( | BESCatalog * | catalog | ) | [virtual] |
adds the speciifed catalog to the list
catalog | new catalog to add to the list |
Definition at line 63 of file BESCatalogList.cc.
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.
catalog_name | name of the catalog to delete |
Definition at line 91 of file BESCatalogList.cc.
BESCatalog * BESCatalogList::find_catalog | ( | const string & | catalog_name | ) | [virtual] |
find the catalog in the list with the specified name
catalog_name | name of the catalog to find |
Definition at line 114 of file BESCatalogList.cc.
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 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.
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 |
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. |
Definition at line 159 of file BESCatalogList.cc.
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.
strm | C++ i/o stream to dump the information to |
Implements BESObj.
Definition at line 247 of file BESCatalogList.cc.
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
Definition at line 230 of file BESCatalogList.cc.
Referenced by BESCatalogResponseHandler::execute().