edu.jhu.tmaj.client.importer
Class AriolFileRenamerHelper

java.lang.Object
  extended by edu.jhu.tmaj.client.importer.AriolFileRenamerHelper

public final class AriolFileRenamerHelper
extends java.lang.Object

Renames the jpeg files generated by the ARIOL machine to include an x and y coordinate at the front. This is a special step that is only required for importing images from the ARIOL scanning machine. This step would be required before importing ARIOL images into TMAJ. The other scanning machines that TMAJ uses (like the BLISS and ACIS) already have the x and y coordinates of the image in the jpeg file name. For example, the BLISS might have something like: 0_0_5_3_0_0_19.jpg. However the ARIOL machine does not have the x and y coordinates in their filenames. The ARIOL has something like this for its filenames: 33EIF-DFAE-41AA.jpg. Along with the jpeg images that are exported from the ARIOL, the ariol gives us a file called Export.xml. The XML contains information that allows us to map the filenames to a particular X and y coordinate. This file parses that xml file and renames the jpeg file to include both the x and y coordinates.


Method Summary
static void helpButtonPressed(java.awt.Component parentComponent)
          Display the help dialog.
static void renameFilesInDirectory(java.io.File directory, java.awt.Component component, SimpleProgressDialog simpleProgressDialog)
          Prepends the proper x and y coordinate information onto all the files in the directory.
static void undoRenaming(java.io.File directory, java.awt.Component component, SimpleProgressDialog simpleProgressDialog)
          Undoes the renaming this class performed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

undoRenaming

public static void undoRenaming(java.io.File directory,
                                java.awt.Component component,
                                SimpleProgressDialog simpleProgressDialog)
                         throws java.io.IOException
Undoes the renaming this class performed. This may be used in case a mistake was made.

Throws:
java.io.IOException

renameFilesInDirectory

public static void renameFilesInDirectory(java.io.File directory,
                                          java.awt.Component component,
                                          SimpleProgressDialog simpleProgressDialog)
                                   throws java.io.IOException,
                                          org.jdom.JDOMException
Prepends the proper x and y coordinate information onto all the files in the directory. Also,an indeterminate progress bar displayed to the user, since the task could take a while.

Throws:
java.io.IOException
org.jdom.JDOMException

helpButtonPressed

public static void helpButtonPressed(java.awt.Component parentComponent)
Display the help dialog.