Class PayloadWriter

java.lang.Object
nl.knaw.dans.bagit.writer.PayloadWriter

public final class PayloadWriter extends Object
Responsible for writing out the bag payload to the filesystem
  • Field Details

    • logger

      private static final org.slf4j.Logger logger
    • VERSION_2_0

      private static final Version VERSION_2_0
    • messages

      private static final ResourceBundle messages
  • Constructor Details

    • PayloadWriter

      private PayloadWriter()
  • Method Details

    • writeVersionDependentPayloadFiles

      static Path writeVersionDependentPayloadFiles(Bag bag, Path outputDir) throws IOException
      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 manifests
      fetchItems - the list of items to exclude from writing in the output directory because they will be fetched
      outputDir - the data directory of the bag
      bagDataDir - the data directory of the bag
      Throws:
      IOException - if there was a problem writing a file
    • getFetchPaths

      private static Set<Path> getFetchPaths(List<FetchItem> fetchItems, Path bagDataDir)