Module org.jpo

Class JpoWriter

java.lang.Object
org.jpo.datamodel.JpoWriter

public class JpoWriter extends Object
Writes the JPO Collection to a xml formatted file
  • Method Details

    • writeInThread

      public static void writeInThread(ExportGroupToCollectionRequest request)
      Writes the collection to the file as per the request but starts a new Thread to do this.
      Parameters:
      request - The request
    • write

      public static void write(ExportGroupToCollectionRequest request)
      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

      @TestOnly public static void writeXmlHeaderTestOnly(BufferedWriter xmlOutput) throws IOException
      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 collection
      xmlOutput - 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 PictureInfo
      bufferedWriter - The buffered writer
      highresTargetDir - The highres target directory
      copyPics - whether to copy the pictures
      Throws:
      IOException - throws an IOException when things go wrong
    • writeCollectionDTDTestOnly

      @TestOnly public static void writeCollectionDTDTestOnly(File directory)
      Only to be used in the unit tests
      Parameters:
      directory - the directory to use