33#include "CatalogItem.h"
55 map<string, string> props;
58 props[
"type"] =
get_type() == leaf ?
"leaf":
"node";
59 props[
"lastModified"] =
get_lmt();
63 props[
"size"] = oss.str();
64 props[
"isData"] =
is_data() ?
"true" :
"false";
67 info->begin_tag(
"item", &props);
69 info->end_tag(
"item");
73 list<string> services = entry->get_service_list();
74 if (services.size()) {
75 list<string>::const_iterator si = services.begin();
76 list<string>::const_iterator se = services.end();
77 for (; si != se; si++) {
78 info->add_tag(
"serviceRef", (*si));
92 strm << BESIndent::LMarg <<
"CatalogItem::dump - (" << (
void *)
this <<
")" << endl;
95 strm << BESIndent::LMarg <<
"name: " << d_name << endl;
96 strm << BESIndent::LMarg <<
"size: " << d_size << endl;
97 strm << BESIndent::LMarg <<
"last modified time: " << d_lmt << endl;
98 strm << BESIndent::LMarg <<
"is_data: " << d_is_data << endl;
99 strm << BESIndent::LMarg <<
"type: " << d_type << endl;
101 BESIndent::UnIndent();
informational response object
std::string get_name() const
The name of this item in the node.
bool is_data() const
Is this item recognized as data?
size_t get_size() const
The size (bytes) of the item.
virtual void dump(std::ostream &strm) const
void encode_item(BESInfo *info)
Encode this CatalogItem in an info object.
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)