gov.nih.nci.caarray.common.data.fileupload2
Class ArrayDesignFileUploadGroupData

java.lang.Object
  extended by gov.nih.nci.caarray.common.data.fileupload2.SerializableFileUploadDataBean
      extended by gov.nih.nci.caarray.common.data.fileupload2.FileUploadGroupData
          extended by gov.nih.nci.caarray.common.data.fileupload2.ArrayDesignFileUploadGroupData
All Implemented Interfaces:
java.io.Serializable

public class ArrayDesignFileUploadGroupData
extends FileUploadGroupData

This class groups one or more files that belong to one type, e.g. made by one creating software, that collectively represent an array design. Consequently, all the files in the group will be parsed. This class allows for the set of array list data that may be divided in multiple files, the first of which contains array measurement data and the rest contain the DesignElements data.

Author:
TranP
See Also:
Serialized Form

Field Summary
 
Fields inherited from class gov.nih.nci.caarray.common.data.fileupload2.FileUploadGroupData
acceptableFileTypes_
 
Fields inherited from class gov.nih.nci.caarray.common.data.fileupload2.SerializableFileUploadDataBean
id_
 
Constructor Summary
ArrayDesignFileUploadGroupData(FileType[] acceptableFileTypes)
          Constructs an instance of this class with an array of FileTypes which can be accepted for the files to be uploaded.
 
Method Summary
 void addFile(java.lang.String fileName, FileType fileType, java.lang.String originalFileName, java.lang.String validatorCode, java.lang.String userId)
           
 boolean addFileByGuessingType(java.lang.String fileName, java.lang.String originalFileName, java.lang.String validatorCode, java.lang.String userId)
          Adds a file which type is to be discovered based on its extension.
 ArrayDesignDesc getArrayDesign()
           
 java.lang.String[] getFileNamesFromFileUploadEntries()
           
 ArrayDesignFileUploadEntryData[] getFileUploadEntries()
           
 void setArrayDesign(ArrayDesignDesc arrayDesign)
           
 void setFileUploadEntries(ArrayDesignFileUploadEntryData[] fileUploadEntries)
          Sets the fileUploadEntries from which DesignElements are extracted and populated into the ArrayDesign set for this fileUploadGroup.
 
Methods inherited from class gov.nih.nci.caarray.common.data.fileupload2.FileUploadGroupData
findFileTypeOther, getParsingEndDate, getParsingStartDate, getParsingSucceeded, guessFileType, setParsingEndDate, setParsingStartDate, setParsingSucceeded
 
Methods inherited from class gov.nih.nci.caarray.common.data.fileupload2.SerializableFileUploadDataBean
getId, setId, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ArrayDesignFileUploadGroupData

public ArrayDesignFileUploadGroupData(FileType[] acceptableFileTypes)
Constructs an instance of this class with an array of FileTypes which can be accepted for the files to be uploaded.

Parameters:
acceptableFileTypes - - The array of acceptable FileTypes
Throws:
java.lang.IllegalArgumentException - - When the acceptableFileTypes argument is null or empty.
Method Detail

getArrayDesign

public ArrayDesignDesc getArrayDesign()
Returns:
Returns the arrayDesign.

setArrayDesign

public void setArrayDesign(ArrayDesignDesc arrayDesign)
Parameters:
arrayDesign - The arrayDesign to set.

getFileUploadEntries

public ArrayDesignFileUploadEntryData[] getFileUploadEntries()
Returns:
Returns the fileUploadEntries.

setFileUploadEntries

public void setFileUploadEntries(ArrayDesignFileUploadEntryData[] fileUploadEntries)
Sets the fileUploadEntries from which DesignElements are extracted and populated into the ArrayDesign set for this fileUploadGroup.

The order of the fileUploadEntries to be set is important as it will be the order in which the data for array measurements and DesignElements are extracted. Here's how to specify the file entries:


getFileNamesFromFileUploadEntries

public java.lang.String[] getFileNamesFromFileUploadEntries()
Returns:
Returns the fileUploadEntries.

addFile

public void addFile(java.lang.String fileName,
                    FileType fileType,
                    java.lang.String originalFileName,
                    java.lang.String validatorCode,
                    java.lang.String userId)
Parameters:
fileName -
fileType - - If null, the file is assumed to be "other" file and will be simply stored but not parsed.

addFileByGuessingType

public boolean addFileByGuessingType(java.lang.String fileName,
                                     java.lang.String originalFileName,
                                     java.lang.String validatorCode,
                                     java.lang.String userId)
Adds a file which type is to be discovered based on its extension. Although non-parseable/stored-only files are accepted, there must a type defined for them.

Parameters:
fileName -
Returns: