cst.adminTool.io
Class ImportTrialSubjectDataUsingWizards

java.lang.Object
  extended by cst.adminTool.io.ImportTrialSubjectDataUsingWizards

public class ImportTrialSubjectDataUsingWizards
extends java.lang.Object

Guides end-users through the process of importing activity data into the data repository.

  1. Show an instance of the DataSelectionEditor to allow users to specify features of the imported file. Properties include the file name, the type of delimiter, whether comments and blank values are allowed and the name of the activity for the data.
  2. Determine the first line of data using an instance of FindFirstLineDialog.
  3. Using an instance of PreviewSpreadsheetImportEditor, show a preview of the data in tabular form, beginning with the first row that was previously specified by the user.
  4. Map the table columns to date fields in the activity specified by the user in the DataSelectionEditor.
  5. Pass all of the settings gathered by the previous dialogs to an instance of TrialSubjectDataSpreadsheetParsingEngine. This class is responsible for successfully parsing the text file and adding records to the data repository.
  6. The TrialSubjectDataSpreadsheetParsingEngine class delegates parsing duties to two other classes. TrialSubjectDataHeaderParser is responsible for checking for duplicated or unrecognised header column values that don't fit with the mapping information passed to it by the PreviewSpreadsheetImportEditor.
  7. If no errors occur when the header is processed, the engine attempts to read the import file in two passes.
  8. In the first pass, it calls TrialSubjectDataSpreadsheetBodyParser to validate the data rows.
  9. If errors are encountered then an error file is generated.
  10. Otherwise if no errors are detected in the data, then the same class attempts to import the data and submit it to the data repository.

 Copyright 2010 Medical Research Council Unit for Lifelong Health and Ageing
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at
      http://www.apache.org/licenses/LICENSE-2.0
 Unless required by applicable law or agreed to in writing, software 
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License. 
 

Version:
1.0
Author:
Kevin Garwood (kgarwood@users.sourceforge.net)

Constructor Summary
ImportTrialSubjectDataUsingWizards(SessionProperties sessionProperties)
           
 
Method Summary
 void importCoreData()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImportTrialSubjectDataUsingWizards

public ImportTrialSubjectDataUsingWizards(SessionProperties sessionProperties)
Method Detail

importCoreData

public void importCoreData()