|
|
@ -61,9 +61,16 @@ Bagmetadata::Bagmetadata( string basedir ) { |
|
|
|
// TODO: add check for results!
|
|
|
|
key = *(iter); |
|
|
|
value = (*++iter); |
|
|
|
// clean \n at the end of a multiline value
|
|
|
|
if (!value.empty()) |
|
|
|
{ |
|
|
|
if (value[value.length()-1] == '\n') |
|
|
|
value.erase(value.length()-1); |
|
|
|
} |
|
|
|
|
|
|
|
Bagmetadata::metadata[ key ] = value; |
|
|
|
// DEBUG:
|
|
|
|
cout << "KEY="<<key<<" value="<<value<<endl; |
|
|
|
cout << "KEY='"<<key<<"' value='"<<value << "'" <<endl; |
|
|
|
} |
|
|
|
} |
|
|
|
} else { // no file
|
|
|
@ -73,6 +80,10 @@ Bagmetadata::Bagmetadata( string basedir ) { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
bool Bagmetadata::has_bagmetadata() { |
|
|
|
return this->exist_bagmetadata_file; |
|
|
|
} |
|
|
|
|
|
|
|
map <string,string> Bagmetadata::get_metadata() { |
|
|
|
return this->metadata; |
|
|
|
} |
|
|
|