java.lang.Object
org.jpo.datamodel.JpoWriter
Writes the JPO Collection to a xml formatted file
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
write
(ExportGroupToCollectionRequest request) Writes the collection as per the request object using the tread it is called on.static void
writeCategoriesBlockTestOnly
(PictureCollection pictureCollection, BufferedWriter xmlOutput) Only to be used in the unit testsstatic void
writeCollectionDTDTestOnly
(File directory) Only to be used in the unit testsstatic void
writeCollectionHeaderTestOnly
(SortableDefaultMutableTreeNode startNode, BufferedWriter xmlOutput, Path baseDir) Accessor to write the xml header so that it can be unit testedstatic void
Writes the collection to the file as per the request but starts a new Thread to do this.static void
writePictureTestOnly
(PictureInfo pictureInfo, BufferedWriter bufferedWriter, File highresTargetDir, boolean copyPics, Path baseDir) Only to be used in the unit testsstatic void
writeXmlHeaderTestOnly
(BufferedWriter xmlOutput) Accessor to write the xml header so that it can be unit tested
-
Method Details
-
writeInThread
Writes the collection to the file as per the request but starts a new Thread to do this.- Parameters:
request
- The request
-
write
Writes the collection as per the request object using the tread it is called on.- Parameters:
request
- The request
-
writeCollectionHeaderTestOnly
@TestOnly public static void writeCollectionHeaderTestOnly(SortableDefaultMutableTreeNode startNode, BufferedWriter xmlOutput, Path baseDir) throws IOException Accessor to write the xml header so that it can be unit tested- Throws:
IOException
-
writeXmlHeaderTestOnly
Accessor to write the xml header so that it can be unit tested- Parameters:
xmlOutput
- the writer where the output goes- Throws:
IOException
- Can throw an IOException
-
writeCategoriesBlockTestOnly
@TestOnly public static void writeCategoriesBlockTestOnly(PictureCollection pictureCollection, BufferedWriter xmlOutput) throws IOException Only to be used in the unit tests- Parameters:
pictureCollection
- The picture collectionxmlOutput
- The buffered writer- Throws:
IOException
- if something goes wrong in the IO
-
writePictureTestOnly
@TestOnly public static void writePictureTestOnly(PictureInfo pictureInfo, BufferedWriter bufferedWriter, File highresTargetDir, boolean copyPics, Path baseDir) throws IOException Only to be used in the unit tests- Parameters:
pictureInfo
- The PictureInfobufferedWriter
- The buffered writerhighresTargetDir
- The highres target directorycopyPics
- whether to copy the pictures- Throws:
IOException
- throws an IOException when things go wrong
-
writeCollectionDTDTestOnly
Only to be used in the unit tests- Parameters:
directory
- the directory to use
-