Package nl.knaw.dans.bagit.writer
Class MetadataWriter
java.lang.Object
nl.knaw.dans.bagit.writer.MetadataWriter
Responsible for writing out the bag
Metadata to the filesystem-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.slf4j.Loggerprivate static final ResourceBundleprivate static final Version -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidwriteBagMetadata(Metadata metadata, Version version, Path outputDir, Charset charsetName) Write the bag-info.txt (or package-info.txt) file to the specified outputDir with specified encoding (charsetName)
-
Field Details
-
logger
private static final org.slf4j.Logger logger -
VERSION_0_95
-
messages
-
-
Constructor Details
-
MetadataWriter
private MetadataWriter()
-
-
Method Details
-
writeBagMetadata
public static void writeBagMetadata(Metadata metadata, Version version, Path outputDir, Charset charsetName) throws IOException Write the bag-info.txt (or package-info.txt) file to the specified outputDir with specified encoding (charsetName)- Parameters:
metadata- the key value pair info in the bag-info.txt fileversion- the version of the bag you are writingoutputDir- the root of the bagcharsetName- the name of the encoding for the file- Throws:
IOException- if there was a problem writing a file
-