Package nl.knaw.dans.bagit.writer
Class FetchWriter
java.lang.Object
nl.knaw.dans.bagit.writer.FetchWriter
Responsible for writing out the list of
FetchItem
to the fetch.txt file on the filesystem-
Field Summary
Modifier and TypeFieldDescriptionprivate static final org.slf4j.Logger
private static final ResourceBundle
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate static String
formatFetchLine
(FetchItem fetchItem, Path bagitRootDir) static void
writeFetchFile
(List<FetchItem> itemsToFetch, Path outputDir, Path bagitRootDir, Charset charsetName) Write the fetch.txt file to the outputDir with the specified encoding (charsetName)
-
Field Details
-
logger
private static final org.slf4j.Logger logger -
messages
-
-
Constructor Details
-
FetchWriter
private FetchWriter()
-
-
Method Details
-
writeFetchFile
public static void writeFetchFile(List<FetchItem> itemsToFetch, Path outputDir, Path bagitRootDir, Charset charsetName) throws IOException Write the fetch.txt file to the outputDir with the specified encoding (charsetName)- Parameters:
itemsToFetch
- the list ofFetchItem
s to write into the fetch.txtoutputDir
- the root of the bagbagitRootDir
- the path to the root of the bagcharsetName
- the name of the encoding for the file- Throws:
IOException
- if there was a problem writing a file
-
formatFetchLine
-