Package nl.knaw.dans.bagit.writer
Class PayloadWriter
java.lang.Object
nl.knaw.dans.bagit.writer.PayloadWriter
Responsible for writing out the bag payload 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 TypeMethodDescriptiongetFetchPaths(List<FetchItem> fetchItems, Path bagDataDir) static voidwritePayloadFiles(Set<Manifest> payloadManifests, List<FetchItem> fetchItems, Path outputDir, Path bagDataDir) Write the payload file(s) to the output directory(package private) static PathwriteVersionDependentPayloadFiles(Bag bag, Path outputDir)
-
Field Details
-
logger
private static final org.slf4j.Logger logger -
VERSION_2_0
-
messages
-
-
Constructor Details
-
PayloadWriter
private PayloadWriter()
-
-
Method Details
-
writeVersionDependentPayloadFiles
- Throws:
IOException
-
writePayloadFiles
public static void writePayloadFiles(Set<Manifest> payloadManifests, List<FetchItem> fetchItems, Path outputDir, Path bagDataDir) throws IOException Write the payload file(s) to the output directory- Parameters:
payloadManifests- the set of objects representing the payload manifestsfetchItems- the list of items to exclude from writing in the output directory because they will be fetchedoutputDir- the data directory of the bagbagDataDir- the data directory of the bag- Throws:
IOException- if there was a problem writing a file
-
getFetchPaths
-