| Modifier and Type | Field and Description |
|---|---|
static String |
BAGIT_VERSION
Version of the BagIt specification implemented
|
| Constructor and Description |
|---|
BagWriter(File bagDir,
Set<String> algorithms)
Create a new, empty Bag
|
| Modifier and Type | Method and Description |
|---|---|
void |
addTags(String key,
Map<String,String> values)
Add tags (metadata) to the Bag
|
File |
getRootDir()
Get the Bag's root directory
|
Map<String,String> |
getTags(String key)
Get the current tag (metadata) of the Bag
|
void |
registerChecksums(String algorithm,
Map<File,String> filemap)
Register checksums of payload (data) files
|
void |
write()
Write metadata and finalize Bag
|
public static String BAGIT_VERSION
public File getRootDir()
public void registerChecksums(String algorithm, Map<File,String> filemap)
algorithm - Checksum digest algorithm name (e.g., "SHA-1")filemap - Map of Files to checksum valuespublic void addTags(String key, Map<String,String> values)
key - Filename of the tag file (e.g., "bag-info.txt")values - Map containing field/value pairspublic Map<String,String> getTags(String key)
key - Filename of the tag file (e.g., "bag-info.txt")public void write() throws IOException
IOException - when an I/O error occursCopyright © 2020. All rights reserved.