gov.nih.nci.caarray.common.data.fileupload2
Class ArrayDesignFileUploadGroupData
java.lang.Object
gov.nih.nci.caarray.common.data.fileupload2.SerializableFileUploadDataBean
gov.nih.nci.caarray.common.data.fileupload2.FileUploadGroupData
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
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
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.
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:
-
If there is only one file entry, the entry is assumed to contain
both array measurement data such as array width, length, etc. and
DesignElement data.
-
If there are more than one file entry, the first entry is assumed
to be the file containing array measurement data such as array width,
length, etc. The rest of the file entries in the array are assumed to
contain DesignElement data and from which DesignElements are to be extracted
in that order. All the file entries are expected to have the same format
including the column headings and their order.
- Parameters:
fileUploadEntries
- The fileUploadEntries to set.
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: