bes Updated for version 3.20.13
|
#include <CatalogItem.h>
Classes | |
struct | CatalogItemAscending |
Public Types | |
enum | item_type { unknown , node , leaf } |
Public Member Functions | |
CatalogItem () | |
Make an empty instance. | |
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. | |
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 | encode_item (BESInfo *info) |
Encode this CatalogItem in an info object. | |
std::string | get_lmt () const |
Get the last modified time for this item. | |
std::string | get_name () const |
The name of this item in the node. | |
size_t | get_size () const |
The size (bytes) of the item. | |
item_type | get_type () const |
Get the type of this item (unknown, node or leaf) | |
bool | is_data () const |
Is this item recognized as data? | |
void | set_is_data (bool id) |
Is this item data that the BES should interpret? | |
void | set_lmt (std::string lmt) |
Set the LMT for this item. | |
void | set_name (std::string n) |
Set the name of the item. | |
void | set_size (size_t s) |
Set the size of the item. | |
void | set_type (item_type t) |
Set the type for this item. | |
An item that is part of a BES Catalog. Catalogs are a simple abstraction for a hierarchical organization of data, equivalent to a tree where a node can have zero or more leaves and zero or more child nodes. in that model, the CatalogItem is a leaf or a node. However, the CatalogItem class does not support building a tree. It will return information about the contents of a node, but not about the contents of that nodes child nodes. See CatalogNode and BESCatalog for a more complete picture of how this class is used.
In the Catalog abstraction, a leaf may be either a simple file that the BES will not process other than to stream its bytes to the client, or it may be a data file that the BES can open, read, and interpret. A node is always just a node. It may be empty, have only other nodes, have only leaves or have a combination of the two.
Definition at line 72 of file CatalogItem.h.
enum bes::CatalogItem::item_type |
Definition at line 74 of file CatalogItem.h.
|
inline |
Make an empty instance.
Definition at line 88 of file CatalogItem.h.
|
inline |
Hold information about an item in a BES Catalog.
Store information about an item. Sets the id_data() property to false.
To determine if a leaf item is data, the name must match a regular expression that is used to identify data objects (typically files). See BESCatalogUtils for help in doing that.
name | |
size | |
lmt | |
type |
Definition at line 104 of file CatalogItem.h.
|
inline |
Hold information about an item in a BES Catalog.
Store information about an item. Sets the id_data() property to false.
To determine if a leaf item is data, the name must match a regular expression that is used to identify data objects (typically files). See BESCatalogUtils for help in doing that.
This const
name | |
size | |
lmt | |
is_data | |
type |
Definition at line 123 of file CatalogItem.h.
|
inlinevirtual |
Definition at line 126 of file CatalogItem.h.
|
virtual |
Dump out information about this object
strm | Write to this stream |
Implements BESObj.
Definition at line 90 of file CatalogItem.cc.
void CatalogItem::encode_item | ( | BESInfo * | info | ) |
Encode this CatalogItem in an info object.
A CatalogItem is encoded as XML using the following grammar, where XML attributes in square brackets are optional.
The element may hold information about leaves or nodes elements.
info | Add information to this instance of BESInfo. |
Definition at line 53 of file CatalogItem.cc.
|
inline |
Get the last modified time for this item.
Definition at line 143 of file CatalogItem.h.
|
inline |
The name of this item in the node.
Definition at line 133 of file CatalogItem.h.
|
inline |
The size (bytes) of the item.
Definition at line 138 of file CatalogItem.h.
|
inline |
Get the type of this item (unknown, node or leaf)
Definition at line 153 of file CatalogItem.h.
|
inline |
Is this item recognized as data?
Definition at line 148 of file CatalogItem.h.
|
inline |
Is this item data that the BES should interpret?
Definition at line 150 of file CatalogItem.h.
|
inline |
Set the LMT for this item.
Definition at line 145 of file CatalogItem.h.
|
inline |
Set the name of the item.
Definition at line 135 of file CatalogItem.h.
|
inline |
Set the size of the item.
Definition at line 140 of file CatalogItem.h.
|
inline |
Set the type for this item.
Definition at line 155 of file CatalogItem.h.