C++ Library to handle BagIt structures. BagIt is a standard format to create transfer packages for digital preservation purposes. See https://en.wikipedia.org/wiki/BagIt for details
http://andreas-romeyke.de
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
804 B
41 lines
804 B
#ifndef LIBCBAG_BAGMETADATA
|
|
#define LIBCBAG_BAGMETADATA
|
|
#include <string>
|
|
#include <map>
|
|
#include <list>
|
|
#include "checksum.hpp"
|
|
using namespace std;
|
|
|
|
enum {
|
|
SourceOrganization,
|
|
OrganizationAddress,
|
|
ContactName,
|
|
ContactPhone,
|
|
ContactEmail,
|
|
ExternalDescription,
|
|
BaggingDate,
|
|
ExternalIdentifier,
|
|
BagSize,
|
|
PayloadOxum,
|
|
BagGroupIdentifier,
|
|
BagCount,
|
|
InternalSenderIdentifier,
|
|
InternalSenderDescription,
|
|
};
|
|
|
|
class Bagmetadata{
|
|
private:
|
|
map<string,string> metadata;
|
|
bool exist_bagmetadata_file;
|
|
|
|
public:
|
|
Bagmetadata( string basedir );
|
|
bool has_bagmetadata();
|
|
map<string,string> get_metadata();
|
|
bool validate( list<string> & log );
|
|
bool has_oxum();
|
|
oxum_t get_oxum();
|
|
};
|
|
|
|
#endif
|
|
// vim: set tabstop=4 softtabstop=0 expandtab shiftwidth=4 smarttab
|