bes Updated for version 3.20.13
cmr::CmrCatalog Class Reference

builds catalogs from a directory structure More...

#include <CmrCatalog.h>

Collaboration diagram for cmr::CmrCatalog:
Collaboration graph

Public Member Functions

 CmrCatalog (const std::string &name=CMR_CATALOG_NAME)
 A catalog based on NASA's CMR system.
 
virtual unsigned int dereference_catalog ()
 Decrement the count of clients that reference this catalog.
 
virtual void dump (std::ostream &strm) const
 dumps information about this object
 
virtual std::string get_catalog_name () const
 Get the name for this catalog.
 
virtual BESCatalogUtilsget_catalog_utils () const
 Get a pointer to the utilities, customized for this catalog.
 
virtual bes::CatalogNodeget_node (const std::string &path) const
 
virtual bes::CatalogNodeget_node_NEW (const std::string &path) const
 
virtual bes::CatalogNodeget_node_OLD (const std::string &path) const
 Get a CatalogNode for the given path in the current catalog.
 
virtual std::string get_root () const
 
virtual void get_site_map (const std::string &, const std::string &, const std::string &, std::ostream &, const std::string &) const
 
virtual void reference_catalog ()
 Increase the count of clients that reference this catalog.
 
virtual BESCatalogEntryshow_catalog (const std::string &container, BESCatalogEntry *)
 

Detailed Description

builds catalogs from a directory structure

Definition at line 50 of file CmrCatalog.h.

Constructor & Destructor Documentation

◆ CmrCatalog()

cmr::CmrCatalog::CmrCatalog ( const std::string &  name = CMR_CATALOG_NAME)

A catalog based on NASA's CMR system.

CMRCatalog is BESCatalog specialized for NASA's CMR system.

Note
Access to the host's file system is made using BESCatalogUtils, which is initialized using the catalog name.
Parameters
nameThe name of the catalog.
See also
BESCatalogUtils

Definition at line 85 of file CmrCatalog.cc.

◆ ~CmrCatalog()

cmr::CmrCatalog::~CmrCatalog ( )
virtual

Definition at line 101 of file CmrCatalog.cc.

Member Function Documentation

◆ dereference_catalog()

virtual unsigned int BESCatalog::dereference_catalog ( )
inlinevirtualinherited

Decrement the count of clients that reference this catalog.

Returns
The number of clients that reference this BESCatalog instance
See also
reference_catalog()

Definition at line 91 of file BESCatalog.h.

◆ dump()

void cmr::CmrCatalog::dump ( std::ostream &  strm) const
virtual

dumps information about this object

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

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

Implements BESCatalog.

Definition at line 579 of file CmrCatalog.cc.

◆ get_catalog_name()

virtual std::string BESCatalog::get_catalog_name ( ) const
inlinevirtualinherited

Get the name for this catalog.

Returns
The catalog.

Definition at line 102 of file BESCatalog.h.

◆ get_catalog_utils()

virtual BESCatalogUtils * BESCatalog::get_catalog_utils ( ) const
inlinevirtualinherited

Get a pointer to the utilities, customized for this catalog.

Returns
A BESCatalogUtils pointer.

Definition at line 112 of file BESCatalog.h.

◆ get_node()

bes::CatalogNode * cmr::CmrCatalog::get_node ( const std::string &  path) const
virtual

Implements BESCatalog.

Definition at line 105 of file CmrCatalog.cc.

◆ get_node_NEW()

bes::CatalogNode * cmr::CmrCatalog::get_node_NEW ( const std::string &  path) const
virtual

Definition at line 112 of file CmrCatalog.cc.

◆ get_node_OLD()

bes::CatalogNode * cmr::CmrCatalog::get_node_OLD ( const std::string &  path) const
virtual

Get a CatalogNode for the given path in the current catalog.

This is similar to show_catalog() but returns a simpler response. The

  • path must start with a slash and is used as a suffix to the Catalog's root directory.
Parameters
pathThe pathname for the node; must start with a slash
Returns
A CatalogNode instance or null if there is no such path in the current catalog.
Exceptions
BESInternalErrorIf the
  • path is not a directory
BESForbiddenErrorIf the
  • path is explicitly excluded by the bes.conf file

Definition at line 322 of file CmrCatalog.cc.

◆ get_root()

virtual std::string cmr::CmrCatalog::get_root ( ) const
inlinevirtual

This is a meaningless method for CMR so it returns empty string

Implements BESCatalog.

Definition at line 70 of file CmrCatalog.h.

◆ get_site_map()

virtual void cmr::CmrCatalog::get_site_map ( const std::string &  ,
const std::string &  ,
const std::string &  ,
std::ostream &  ,
const std::string &   
) const
inlinevirtual

Maybe someday...

Implements BESCatalog.

Definition at line 75 of file CmrCatalog.h.

◆ reference_catalog()

virtual void BESCatalog::reference_catalog ( )
inlinevirtualinherited

Increase the count of clients that reference this catalog.

This class maintains a count of the clients that reference the catalog. When count of clients drops to zero, the instance can be deleted.

Todo:
Revisit the reference counting behavior - maybe there's a better way to manage these catalogs?

Definition at line 80 of file BESCatalog.h.

◆ show_catalog()

virtual BESCatalogEntry * cmr::CmrCatalog::show_catalog ( const std::string &  container,
BESCatalogEntry  
)
inlinevirtual

@Deprecated

Implements BESCatalog.

Definition at line 63 of file CmrCatalog.h.


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