Public Member Functions | |
int | getFormatVersion () const |
Returns CGI format version for this metadata set. | |
std::string | getSoftwareVersionString () const |
Returns the SRC_SOFTWARE_VERSION for this file metadata. | |
bool | hasKey (const std::string &key) const |
const std::string & | get (const std::string &key) const |
template<class T > | |
const T | get (const std::string &key) const |
void | set (const std::string &key, const std::string &value) |
void | add (const std::string &key, const std::string &value) |
void | removeAll (const std::string &key) |
const std::vector< std::pair < std::string, std::string > > & | getMap () const |
void | initDefaults (const DelimitedFileMetadata &meta=DelimitedFileMetadata()) |
Fills in GENERATED_BY, GENERATED_AT, CGATOOLS_VERSION (or SOFTWARE_VERSION, if this version of cgatools is being run in the pipeline), and FORMAT_VERSION. | |
void | transfer (const DelimitedFileMetadata &src, const std::string &keys, const std::string &prefix="") |
Transfer specified keys from another metadata store, optionally attaching a specified prefix to each key. | |
void | sort () |
Sorts the lines. | |
void | setFileName (const std::string &fn) |
const std::string & | getFileName () const |
Static Public Attributes | |
static const std::string | OUTPUT_FORMAT_VERSION |
Format version for the output files generated by this executable. | |
static std::string | PIPELINE_VERSION |
The value that goes into SOFTWARE_VERSION if this version of cgatools is being run in the pipeline. |
int cgatools::util::DelimitedFileMetadata::getFormatVersion | ( | ) | const |
Returns CGI format version for this metadata set.
The version is returned as MAJOR * 1000 + MINOR, that is, for format version "1.2" this returns 1002. When the version cannot be detected, throws an exception.
std::string cgatools::util::DelimitedFileMetadata::getSoftwareVersionString | ( | ) | const |
Returns the SRC_SOFTWARE_VERSION for this file metadata.
If there is no SRC_SOFTWARE_VERSION, returns the SOFTWARE_VERSION. If neither exists, returns the value for key BUILD. If none of these exists, returns "".
void cgatools::util::DelimitedFileMetadata::initDefaults | ( | const DelimitedFileMetadata & | meta = DelimitedFileMetadata() |
) |
Fills in GENERATED_BY, GENERATED_AT, CGATOOLS_VERSION (or SOFTWARE_VERSION, if this version of cgatools is being run in the pipeline), and FORMAT_VERSION.
Also transfers the SOFTWARE_VERSION and all the other keys not listed above from the input DelimitedFileMetadata object.
std::string cgatools::util::DelimitedFileMetadata::PIPELINE_VERSION [static] |
The value that goes into SOFTWARE_VERSION if this version of cgatools is being run in the pipeline.
Otherwise, this string is empty.