gov.nih.nci.caarray.services.util.fileuploadapplet
Class SelectedFiles

java.lang.Object
  extended by gov.nih.nci.caarray.services.util.fileuploadapplet.SelectedFiles
All Implemented Interfaces:
java.io.Serializable

public class SelectedFiles
extends java.lang.Object
implements java.io.Serializable

The SelectedFiles class is basically a list of the files to be uploaded and validates that all the required files are present. This is way cut up from the NIEHS SelectedFiles, but it was easiest to just hack this up, since the FPTUploader and FileUploadApplet code uses the SelectedFiles object.

See Also:
Serialized Form

Constructor Summary
SelectedFiles()
           
 
Method Summary
 void clean()
          empty the list of files selected.
 java.util.TreeMap getFileNameMap()
          get a Map of the selected files (the key is the file name, the data is the file type)
 void parseFiles(java.lang.String fileList)
          parse the list of filename from the given string.
 boolean remove(java.io.File file)
          Removes a file from SelectedFiles.
 java.util.TreeMap setFileNameMap(java.util.TreeMap map)
          set the list of selected fiels using a map.
 java.lang.String toString()
          print a list of selectedFileMap contents: Name,
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SelectedFiles

public SelectedFiles()
Method Detail

parseFiles

public void parseFiles(java.lang.String fileList)
parse the list of filename from the given string. The expected format is "expId1,bioassayid1,name1,type1,expid2,bioassayid2,name2,type2..."

Parameters:
fileList - the list of file names

remove

public boolean remove(java.io.File file)
               throws java.lang.Exception
Removes a file from SelectedFiles.

Parameters:
file - File
Returns:
true boolean
Throws:
java.lang.Exception

getFileNameMap

public java.util.TreeMap getFileNameMap()
get a Map of the selected files (the key is the file name, the data is the file type)

Returns:
selected files map

setFileNameMap

public java.util.TreeMap setFileNameMap(java.util.TreeMap map)
set the list of selected fiels using a map.

Parameters:
map - list of files as a map
Returns:
the map?

toString

public java.lang.String toString()
print a list of selectedFileMap contents: Name,

Overrides:
toString in class java.lang.Object

clean

public void clean()
empty the list of files selected. (ie delete all files in the list)