24#ifndef I_CatalogItem_h
25#define I_CatalogItem_h 1
41 Item_count (number of nodes or leaves it holds)
42 Items (zero or more Item instances)
75 enum item_type {unknown, node, leaf};
81 bool d_is_data{
false};
83 std::string d_description;
84 std::string d_dap_service_url;
87 CatalogItem &operator=(
const CatalogItem &rhs);
107 CatalogItem(
const std::string &name,
size_t size,
const std::string &lmt, item_type type)
108 : d_name(name), d_size(size), d_lmt(lmt), d_type(type) { }
126 CatalogItem(
const std::string &name,
size_t size,
const std::string &lmt,
bool is_data, item_type type)
127 : d_name(name), d_size(size), d_lmt(lmt), d_is_data(
is_data), d_type(type) { }
132 bool operator() (CatalogItem *i,CatalogItem *j) {
return (i->d_name < j->d_name); }
138 void set_name(
const std::string &n) { d_name = n; }
153 void set_lmt(
const std::string &lmt) { d_lmt = lmt; }
172 virtual void dump(std::ostream &strm)
const;
informational response object
top level BES object to house generic methods
void set_description(const std::string &n)
Set the name of the item.
void set_lmt(const std::string &lmt)
Set the LMT for this item.
std::string get_name() const
The name of this item in the node.
bool is_data() const
Is this item recognized as data?
void set_size(size_t s)
Set the size of the item.
void set_is_data(bool id)
Is this item data that the BES should interpret?
void encode_item(BESInfo *info) const
Encode this CatalogItem in an info object.
size_t get_size() const
The size (bytes) of the item.
std::string get_dap_service_url() const
The DAP Dataset URL for an external DAP service.
CatalogItem(const std::string &name, size_t size, const std::string &lmt, item_type type)
Hold information about an item in a BES Catalog.
virtual void dump(std::ostream &strm) const
void set_dap_service_url(const std::string &url)
Is this item data that the BES should interpret?
std::string get_description() const
The descrtiption of this item.
std::string get_lmt() const
Get the last modified time for this item.
item_type get_type() const
Get the type of this item (unknown, node or leaf)
CatalogItem(const std::string &name, size_t size, const std::string &lmt, bool is_data, item_type type)
Hold information about an item in a BES Catalog.
void set_type(item_type t)
Set the type for this item.
void set_name(const std::string &n)
Set the name of the item.
CatalogItem()
Make an empty instance.